Hibernate问题
log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at net.sf.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:32)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:289)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3361)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3321)
at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2251)
at mypack.BusinessService.saveCustomer(BusinessService.java:47)
at mypack.BusinessService.test(BusinessService.java:183)
at mypack.BusinessService.main(BusinessService.java:209)
我的包结构
搜索更多相关主题的帖子:
Hibernate
----------------解决方案--------------------------------------------------------
给点意见啊
----------------解决方案--------------------------------------------------------