I defined a connection pool in weblogic, but in startup class
Configuration conf = new Configuration().addClass(ADTest.class);
SessionFactory sf = conf.buildSessionFactory();
<2004-09-08 21:48:03,598> <FATAL> <connection.DatasourceConnectionProvider> <Could not find datasource: orclPool>
javax.naming.NameNotFoundException: Unable to resolve 'orclPool' Resolved: '' Unresolved:'orclPool' ; remaining name 'orclPool'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:857)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:223)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:146)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:187)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:237)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:65)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
at com.angel.server.ADStartup.startup(ADStartup.java:72)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:139)
at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:130)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:102)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:97)
at weblogic.t3.srvr.StartupClassService.resume(StartupClassService.java:76)
at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:67)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
at weblogic.Server.main(Server.java:32)
net.sf.hibernate.HibernateException: Could not find datasource
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:48)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:65)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
at com.angel.server.ADStartup.startup(ADStartup.java:72)
at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:158)
at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:139)
at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:130)
at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:102)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:97)
at weblogic.t3.srvr.StartupClassService.resume(StartupClassService.java:76)
at weblogic.t3.srvr.ServerLifeCycleList.resume(ServerLifeCycleList.java:67)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:832)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:300)
at weblogic.Server.main(Server.java:32)
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'orclPool' Resolved: '' Unresolved:'orclPool' ; remaining name 'orclPool'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:857)
at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:223)
at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:146)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:187)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:237)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
... 16 more
=====Hibernate Startup Error!!!!!!!!!!!!!!======
=====Hibernate Startup completed successfully======
***************************************************
<2004-9-8
|