db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject RE: Initialization of JndiDataSourceFactory fails
Date Thu, 17 Nov 2005 14:39:46 GMT
First, what version of Torque are you using?

Second, what torque.dsfactory.<db>.datasource properties are set in your
Torque.properties file?

A couple of quick guesses would be:

You need to specify a torque.dsfactory.<dbname>.datasource.classname 
property in the Torque.properties file.

Or that your bind string doesn't match what BEA uses internally AFAIK,
there 
is no true "standard" for how a servlet engine structures JNDI tree
internally.
The one used by Tomcat is becoming the "defacto" standard, but BEA might
do
things differently.


> -----Original Message-----
> From: Vitzethum, Daniel [mailto:Daniel.Vitzethum@gigatronik.com] 
> Sent: Thursday, November 17, 2005 4:25 AM
> To: Apache Torque Users List
> Subject: Initialization of JndiDataSourceFactory fails
> 
> 
> Hello all,
> 
> we have a problem when initializing Torque with a DS from the 
> Container (which is BEA 8.1 in our case).
> 
> When we use the SharedPoolDataSourceFactory and put the DB 
> configuration in the Torque.properties, everything goes well.
> 
> When switching to JndiDataSourceFactory and specifying the DS 
> name by the 
>   torque.dsfactory.<project>.jndi.path=jdbc/ZeusDS
> property, we stubbornly get the Exception appended below.
> 
> Please note that the DS is configured and tested in the 
> container, so there is no need for Torque to create a new 
> one. As I don't fully understand what is happening here, I 
> need your help. Does Torque try to create a DS instead of 
> taking one from the container? Is it necessary to perform a 
> bind, as mentioned in the stack trace?
> 
> We did the same thing in other projects, so it is hardly 
> possible that the problem lies in the Torque.properties 
> (never say never, I know...)
> 
> 
> Many thanks in advance,
> 
> Daniel
> 
> 
> 
> -----
> DEBUG - initialize()
> DEBUG - 
> setConfiguration(org.apache.commons.configuration.SubsetConfig
> uration@1e
> 481c1)
> DEBUG - 
> initAdapters(org.apache.commons.configuration.SubsetConfigurat
> ion@1e481c
> 1)
> DEBUG - Adding oracle -> psm_zeus as Adapter
> DEBUG - 
> initDataSourceFactories(org.apache.commons.configuration.Subse
> tConfigura
> tion@1e481c1)
> DEBUG - handle: psm_zeus DataSourceFactory: 
> org.apache.torque.dsfactory.JndiDataSourceFactory
> DEBUG - Starting initJNDI
> DEBUG - JNDI path: jdbc/ZeusDS
> DEBUG - Created new InitialContext
> DEBUG - InitialContext -------------------------------
> DEBUG - Environment properties:2
> DEBUG -     java.naming.factory.initial:
> weblogic.jndi.WLInitialContextFactory
> DEBUG -     java.naming.factory.url.pkgs:
> weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
> DEBUG - ----------------------------------------------
> DEBUG - Starting initDataSources
> DEBUG - InitialContext -------------------------------
> DEBUG - Environment properties:2
> DEBUG -     java.naming.factory.initial:
> weblogic.jndi.WLInitialContextFactory
> DEBUG -     java.naming.factory.url.pkgs:
> weblogic.jndi.factories:weblogic.corba.j2ee.naming.url
> DEBUG - ----------------------------------------------
> DEBUG - Added sub context: jdbc
> ERROR - 
> java.lang.NullPointerException
>             at 
> weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNod
> e.java:328
> )
>             at 
> weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingN
> ode.java:1
> 24)
>             at
> weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
>             at 
> weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextI
> mpl.java:2
> 79)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi
> (JndiDataS
> ourceFactory.java:301)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSour
> ce(JndiDat
> aSourceFactory.java:221)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(J
> ndiDataSou
> rceFactory.java:126)
>             at 
> org.apache.torque.TorqueInstance.initDataSourceFactories(Torqu
> eInstance.
> java:284)
>             at
> org.apache.torque.TorqueInstance.initialize(TorqueInstance.java:185)
>             at
> org.apache.torque.TorqueInstance.init(TorqueInstance.java:362)
>             at org.apache.torque.Torque.init(Torque.java:174)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBABean.ini
> tialize(Ma
> sterdataBABean.java:82)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBA_cwi940_
> ELOImpl.in
> itialize(MasterdataBA_cwi940_ELOImpl.java:102)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBFBean.initi
> alize(Mast
> erdataBFBean.java:71)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl.initi
> alize(MasterdataBF_qdhg9i_EOImpl.java:100)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_WLSke
> l.invoke(Unknown Source)
>             at
> weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.
> java:166)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:284)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:244)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_813_W
> LStub.initialize(Unknown Source)
>             at 
> com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.ini
> tialize(EJ
> BMasterdataBCI.java:72)
>             at 
> com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServ
> let.java:4
> 3)
>             at
> javax.servlet.GenericServlet.init(GenericServlet.java:258)
>             at 
> weblogic.servlet.internal.ServletStubImpl$ServletInitAction.ru
> n(ServletS
> tubImpl.java:1018)
>             at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSu
> bject.java:321)
>             at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118
> )
>             at 
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.
> java:894)
>             at 
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImp
> l.java:873)
>             at 
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl
> .java:812)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> WebAppServ
> letContext.java:3281)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3238)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3224)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadResource
> s(WebAppSe
> rvletContext.java:3207)
>             at 
> weblogic.servlet.internal.HttpServer.preloadResources(HttpServ
> er.java:69
> 4)
>             at 
> weblogic.servlet.internal.WebService.preloadResources(WebServi
> ce.java:48
> 3)
>             at 
> weblogic.servlet.internal.ServletInitService.resume(ServletIni
> tService.j
> ava:30)
>             at
> weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
>             at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
>             at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
>             at weblogic.Server.main(Server.java:32)
> ERROR - Error reading adapter configuration 
> java.lang.NullPointerException
>             at 
> weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNod
> e.java:328
> )
>             at 
> weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingN
> ode.java:1
> 24)
>             at
> weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
>             at 
> weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextI
> mpl.java:2
> 79)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi
> (JndiDataS
> ourceFactory.java:301)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSour
> ce(JndiDat
> aSourceFactory.java:221)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(J
> ndiDataSou
> rceFactory.java:126)
>             at 
> org.apache.torque.TorqueInstance.initDataSourceFactories(Torqu
> eInstance.
> java:284)
>             at
> org.apache.torque.TorqueInstance.initialize(TorqueInstance.java:185)
>             at
> org.apache.torque.TorqueInstance.init(TorqueInstance.java:362)
>             at org.apache.torque.Torque.init(Torque.java:174)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBABean.ini
> tialize(Ma
> sterdataBABean.java:82)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBA_cwi940_
> ELOImpl.in
> itialize(MasterdataBA_cwi940_ELOImpl.java:102)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBFBean.initi
> alize(Mast
> erdataBFBean.java:71)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl.initi
> alize(MasterdataBF_qdhg9i_EOImpl.java:100)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_WLSke
> l.invoke(Unknown Source)
>             at
> weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.
> java:166)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:284)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:244)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_813_W
> LStub.initialize(Unknown Source)
>             at 
> com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.ini
> tialize(EJ
> BMasterdataBCI.java:72)
>             at 
> com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServ
> let.java:4
> 3)
>             at
> javax.servlet.GenericServlet.init(GenericServlet.java:258)
>             at 
> weblogic.servlet.internal.ServletStubImpl$ServletInitAction.ru
> n(ServletS
> tubImpl.java:1018)
>             at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSu
> bject.java:321)
>             at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118
> )
>             at 
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.
> java:894)
>             at 
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImp
> l.java:873)
>             at 
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl
> .java:812)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> WebAppServ
> letContext.java:3281)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3238)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3224)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadResource
> s(WebAppSe
> rvletContext.java:3207)
>             at 
> weblogic.servlet.internal.HttpServer.preloadResources(HttpServ
> er.java:69
> 4)
>             at 
> weblogic.servlet.internal.WebService.preloadResources(WebServi
> ce.java:48
> 3)
>             at 
> weblogic.servlet.internal.ServletInitService.resume(ServletIni
> tService.j
> ava:30)
>             at
> weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
>             at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
>             at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
>             at weblogic.Server.main(Server.java:32)
> rethrown as 
> org.apache.torque.TorqueException
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSour
> ce(JndiDat
> aSourceFactory.java:227)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(J
> ndiDataSou
> rceFactory.java:126)
>             at 
> org.apache.torque.TorqueInstance.initDataSourceFactories(Torqu
> eInstance.
> java:284)
>             at
> org.apache.torque.TorqueInstance.initialize(TorqueInstance.java:185)
>             at
> org.apache.torque.TorqueInstance.init(TorqueInstance.java:362)
>             at org.apache.torque.Torque.init(Torque.java:174)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBABean.ini
> tialize(Ma
> sterdataBABean.java:82)
>             at 
> com.bmw.zeus.business.masterdata.behavior.MasterdataBA_cwi940_
> ELOImpl.in
> itialize(MasterdataBA_cwi940_ELOImpl.java:102)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBFBean.initi
> alize(Mast
> erdataBFBean.java:71)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl.initi
> alize(MasterdataBF_qdhg9i_EOImpl.java:100)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_WLSke
> l.invoke(Unknown Source)
>             at
> weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.
> java:166)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:284)
>             at 
> weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAware
> RemoteRef.
> java:244)
>             at 
> com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EO
> Impl_813_W
> LStub.initialize(Unknown Source)
>             at 
> com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.ini
> tialize(EJ
> BMasterdataBCI.java:72)
>             at 
> com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServ
> let.java:4
> 3)
>             at
> javax.servlet.GenericServlet.init(GenericServlet.java:258)
>             at 
> weblogic.servlet.internal.ServletStubImpl$ServletInitAction.ru
> n(ServletS
> tubImpl.java:1018)
>             at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSu
> bject.java:321)
>             at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118
> )
>             at 
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.
> java:894)
>             at 
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImp
> l.java:873)
>             at 
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl
> .java:812)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlet(
> WebAppServ
> letContext.java:3281)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3238)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadServlets
> (WebAppSer
> vletContext.java:3224)
>             at 
> weblogic.servlet.internal.WebAppServletContext.preloadResource
> s(WebAppSe
> rvletContext.java:3207)
>             at 
> weblogic.servlet.internal.HttpServer.preloadResources(HttpServ
> er.java:69
> 4)
>             at 
> weblogic.servlet.internal.WebService.preloadResources(WebServi
> ce.java:48
> 3)
>             at 
> weblogic.servlet.internal.ServletInitService.resume(ServletIni
> tService.j
> ava:30)
>             at
> weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
>             at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
>             at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
>             at weblogic.Server.main(Server.java:32)
> Caused by: java.lang.NullPointerException
>             at 
> weblogic.jndi.internal.BasicNamingNode.bindHere(BasicNamingNod
> e.java:328
> )
>             at 
> weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingN
> ode.java:1
> 24)
>             at
> weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
>             at 
> weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextI
> mpl.java:2
> 79)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi
> (JndiDataS
> ourceFactory.java:301)
>             at 
> org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSour
> ce(JndiDat
> aSourceFactory.java:221)
>             ... 34 more
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message