db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitzethum, Daniel" <Daniel.Vitzet...@gigatronik.com>
Subject Initialization of JndiDataSourceFactory fails
Date Thu, 17 Nov 2005 09:25:22 GMT
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.SubsetConfiguration@1e
481c1)
DEBUG -
initAdapters(org.apache.commons.configuration.SubsetConfiguration@1e481c
1)
DEBUG - Adding oracle -> psm_zeus as Adapter
DEBUG -
initDataSourceFactories(org.apache.commons.configuration.SubsetConfigura
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(BasicNamingNode.java:328
)
            at
weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:1
24)
            at
weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
            at
weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:2
79)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi(JndiDataS
ourceFactory.java:301)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSource(JndiDat
aSourceFactory.java:221)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(JndiDataSou
rceFactory.java:126)
            at
org.apache.torque.TorqueInstance.initDataSourceFactories(TorqueInstance.
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.initialize(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.initialize(Mast
erdataBFBean.java:71)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl.initi
alize(MasterdataBF_qdhg9i_EOImpl.java:100)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_WLSke
l.invoke(Unknown Source)
            at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:284)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:244)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_813_W
LStub.initialize(Unknown Source)
            at
com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.initialize(EJ
BMasterdataBCI.java:72)
            at
com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServlet.java:4
3)
            at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
            at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletS
tubImpl.java:1018)
            at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
            at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
            at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.
java:894)
            at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp
l.java:873)
            at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.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.preloadResources(WebAppSe
rvletContext.java:3207)
            at
weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:69
4)
            at
weblogic.servlet.internal.WebService.preloadResources(WebService.java:48
3)
            at
weblogic.servlet.internal.ServletInitService.resume(ServletInitService.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(BasicNamingNode.java:328
)
            at
weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:1
24)
            at
weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
            at
weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:2
79)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi(JndiDataS
ourceFactory.java:301)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSource(JndiDat
aSourceFactory.java:221)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(JndiDataSou
rceFactory.java:126)
            at
org.apache.torque.TorqueInstance.initDataSourceFactories(TorqueInstance.
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.initialize(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.initialize(Mast
erdataBFBean.java:71)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl.initi
alize(MasterdataBF_qdhg9i_EOImpl.java:100)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_WLSke
l.invoke(Unknown Source)
            at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:284)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:244)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_813_W
LStub.initialize(Unknown Source)
            at
com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.initialize(EJ
BMasterdataBCI.java:72)
            at
com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServlet.java:4
3)
            at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
            at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletS
tubImpl.java:1018)
            at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
            at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
            at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.
java:894)
            at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp
l.java:873)
            at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.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.preloadResources(WebAppSe
rvletContext.java:3207)
            at
weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:69
4)
            at
weblogic.servlet.internal.WebService.preloadResources(WebService.java:48
3)
            at
weblogic.servlet.internal.ServletInitService.resume(ServletInitService.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.initDataSource(JndiDat
aSourceFactory.java:227)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initialize(JndiDataSou
rceFactory.java:126)
            at
org.apache.torque.TorqueInstance.initDataSourceFactories(TorqueInstance.
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.initialize(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.initialize(Mast
erdataBFBean.java:71)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl.initi
alize(MasterdataBF_qdhg9i_EOImpl.java:100)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_WLSke
l.invoke(Unknown Source)
            at
weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:284)
            at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.
java:244)
            at
com.bmw.zeus.business.masterdata.facade.MasterdataBF_qdhg9i_EOImpl_813_W
LStub.initialize(Unknown Source)
            at
com.bmw.zeus.business.masterdata.spec.ejb.EJBMasterdataBCI.initialize(EJ
BMasterdataBCI.java:72)
            at
com.bmw.zeus.web.servlet.InitalizerServlet.init(InitalizerServlet.java:4
3)
            at
javax.servlet.GenericServlet.init(GenericServlet.java:258)
            at
weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletS
tubImpl.java:1018)
            at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
            at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118
)
            at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.
java:894)
            at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImp
l.java:873)
            at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl
.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.preloadResources(WebAppSe
rvletContext.java:3207)
            at
weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:69
4)
            at
weblogic.servlet.internal.WebService.preloadResources(WebService.java:48
3)
            at
weblogic.servlet.internal.ServletInitService.resume(ServletInitService.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(BasicNamingNode.java:328
)
            at
weblogic.jndi.internal.ServerNamingNode.bindHere(ServerNamingNode.java:1
24)
            at
weblogic.jndi.internal.BasicNamingNode.bind(BasicNamingNode.java:291)
            at
weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:2
79)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.bindDStoJndi(JndiDataS
ourceFactory.java:301)
            at
org.apache.torque.dsfactory.JndiDataSourceFactory.initDataSource(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


Mime
View raw message