欢迎来到天天文库
浏览记录
ID:8916478
大小:16.64 KB
页数:6页
时间:2018-04-12
《eclipse下配置hibernate用datasource连接数据库的问题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、eclipse下配置hibernate用datasource连接数据库的问题精彩对话:甲:我把hibernate.cfg.xml文件内容帖出来给大家看看:
2、te-configuration-3.0.dtd"> "java:comp/env/jdbc/oradb" org.hibernate.connecti
3、on.DatasourceConnectionProvider org.hibernate.dialect.Oracle9Dialect true 4、configuration>运行时包错如下:log4j:WARNNoappenderscouldbefoundforlogger(org.hibernate.cfg.Environment).log4j:WARNPleaseinitializethelog4jsystemproperly.org.hibernate.HibernateException:Couldnotfinddatasource atorg.hibernate.connection.DatasourceConnection5、Provider.configure(DatasourceConnectionProvider.java:56) atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Co6、nnectionProviderFactory.java:56) atorg.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414) atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) atorg.hibernate.cfg.Configuration.buildSettings7、(Configuration.java:2009) atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) athibernate.demo01.PersonOperate.(PersonOperate.java:21) athibernate.demo01.PersonTest.main(PersonTest.java:17)Causedby:javax.namin8、g.NoInitialContextException:Needtospecifyclassnameinenvironmentorsystemproperty,orasanappletparameter,orinanapplicationresourcefile: java.naming.factory.initial atjavax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
4、configuration>运行时包错如下:log4j:WARNNoappenderscouldbefoundforlogger(org.hibernate.cfg.Environment).log4j:WARNPleaseinitializethelog4jsystemproperly.org.hibernate.HibernateException:Couldnotfinddatasource atorg.hibernate.connection.DatasourceConnection
5、Provider.configure(DatasourceConnectionProvider.java:56) atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) atorg.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Co
6、nnectionProviderFactory.java:56) atorg.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414) atorg.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) atorg.hibernate.cfg.Configuration.buildSettings
7、(Configuration.java:2009) atorg.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) athibernate.demo01.PersonOperate.(PersonOperate.java:21) athibernate.demo01.PersonTest.main(PersonTest.java:17)Causedby:javax.namin
8、g.NoInitialContextException:Needtospecifyclassnameinenvironmentorsystemproperty,orasanappletparameter,orinanapplicationresourcefile: java.naming.factory.initial atjavax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
此文档下载收益归作者所有