Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Unable to obtain datasource

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When my JBoss 4.0.5 server starts, the datasource specified (with JNDI name DB2DS) in the db2-ds.xml is shown to be bound to JNDI but however when my code executes an initialContext.lookup method, i get an exception saying that the particular database has not been bound to the JNDI. Can anyone please tell me what can possibly be the reason for this?

14:53:21,549 INFO [Server] Starting JBoss (MX MicroKernel)...
14:53:21,549 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
14:53:21,549 INFO [Server] Home Dir: D:\BankFusion123Platform\jboss
14:53:21,549 INFO [Server] Home URL: file:/D:/BankFusion123Platform/jboss/
14:53:21,549 INFO [Server] Patch URL: null
14:53:21,549 INFO [Server] Server Name: default
14:53:21,549 INFO [Server] Server Home Dir: D:\BankFusion123Platform\jboss\server\default
14:53:21,549 INFO [Server] Server Home URL: file:/D:/BankFusion123Platform/jboss/server/default/
14:53:21,549 INFO [Server] Server Log Dir: D:\BankFusion123Platform\jboss\server\default\log
14:53:21,549 INFO [Server] Server Temp Dir: D:\BankFusion123Platform\jboss\server\default\tmp
14:53:21,549 INFO [Server] Root Deployment Filename: jboss-service.xml
14:53:21,783 INFO [ServerInfo] Java version: 1.5.0_15,Sun Microsystems Inc.
14:53:21,783 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_15-b04,Sun Microsystems Inc.
14:53:21,783 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
14:53:22,158 INFO [Server] Core system initialized
14:53:28,095 INFO [WebService] Using RMI server codebase: http://BLRUB186:8083/
14:53:28,111 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
14:53:31,002 INFO [ServiceEndpointManager] WebServices: jbossws-1.0.3.SP1 (date=200609291417)
14:53:31,970 INFO [Embedded] Catalina naming disabled
14:53:32,002 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
14:53:32,002 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
14:53:32,267 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
14:53:32,267 INFO [Catalina] Initialization processed in 265 ms
14:53:32,267 INFO [StandardService] Starting service jboss.web
14:53:32,267 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
14:53:32,299 INFO [StandardHost] XML validation disabled
14:53:32,330 INFO [Catalina] Server startup in 63 ms
14:53:32,502 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
14:53:32,970 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
14:53:33,127 INFO [[/invoker]] JMXInvokerServlet: init
14:53:33,142 INFO [[/invoker]] default: init
14:53:33,142 INFO [[/invoker]] EJBInvokerServlet: init
14:53:33,142 INFO [[/invoker]] ReadOnlyJNDIFactory: init
14:53:33,158 INFO [[/invoker]] JNDIFactory: init
14:53:33,158 INFO [[/invoker]] jsp: init
14:53:33,267 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
14:53:33,345 INFO [[/]] default: init
14:53:33,345 INFO [[/]] jsp: init
14:53:33,424 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp19029jbossws-context-exp.war/
14:53:33,502 INFO [[/jbossws]] default: init
14:53:33,502 INFO [[/jbossws]] jsp: init
14:53:33,564 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
14:53:33,658 INFO [[/jbossmq-httpil]] default: init
14:53:33,658 INFO [[/jbossmq-httpil]] jsp: init
14:53:34,549 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
14:53:34,658 INFO [[/web-console]] HTTP Invocation: init
14:53:34,658 INFO [[/web-console]] Clear Monitor Alerts: init
14:53:34,658 INFO [[/web-console]] MonitorsFolder: init
14:53:34,658 INFO [[/web-console]] UCLs: init
14:53:34,674 INFO [[/web-console]] Acknowledge Active Alarms: init
14:53:34,674 INFO [[/web-console]] Manage String Threshold Monitor: init
14:53:34,674 INFO [[/web-console]] Create String Threshold Monitor: init
14:53:34,674 INFO [[/web-console]] default: init
14:53:34,674 INFO [[/web-console]] JMS Message: init
14:53:34,689 INFO [[/web-console]] JSR77 WebModule: init
14:53:34,705 INFO [[/web-console]] J2EEFolder: init
14:53:34,892 INFO [[/web-console]] AOPFolder: init
14:53:34,908 INFO [[/web-console]] SystemFolder: init
14:53:34,939 INFO [[/web-console]] Create Threshold Monitor: init
14:53:34,955 INFO [[/web-console]] Manage Threshold Monitor: init
14:53:34,955 INFO [[/web-console]] Manage Snapshot: init
14:53:34,955 INFO [[/web-console]] MBeans: init
14:53:34,955 INFO [[/web-console]] JSR77 Domains and Servers: init
14:53:34,970 INFO [[/web-console]] JSR77 EJBModules and EJBs: init
14:53:34,970 INFO [[/web-console]] JSR77 J2EE Apps: init
14:53:34,986 INFO [[/web-console]] Create Snapshot: init
14:53:34,986 INFO [[/web-console]] jsp: init
14:53:35,127 INFO [MailService] Mail Service bound to java:/Mail
14:53:35,361 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
14:53:35,408 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
14:53:35,424 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
14:53:35,455 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
14:53:35,502 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
14:53:35,533 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
14:53:35,814 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2DS' to JNDI name 'java:DB2DS'
14:53:35,970 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2XUB' to JNDI name 'java:DB2XUB'
14:53:36,002 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2XUB2' to JNDI name 'java:DB2XUB2'

14:53:36,174 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
14:53:36,236 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
14:53:36,330 INFO [[/jmx-console]] default: init
14:53:36,330 INFO [[/jmx-console]] jsp: init
14:53:36,330 INFO [[/jmx-console]] ClusterView: init
14:53:36,330 INFO [[/jmx-console]] DisplayOpResult: init
14:53:36,330 INFO [[/jmx-console]] InspectMBean: init
14:53:36,330 INFO [[/jmx-console]] DisplayMBeans: init
14:53:36,361 INFO [EARDeployer] Init J2EE application: file:/D:/BankFusion123Platform/jboss/server/default/deploy/UBInsideEAR.ear
14:53:36,861 INFO [EjbModule] Deploying UBInside
14:53:37,064 INFO [BaseLocalProxyFactory] Bound EJB LocalHome 'UBInside' to jndi 'UBInsideLocal'
14:53:37,080 INFO [ProxyFactory] Bound EJB Home 'UBInside' to jndi 'UBInside'
14:53:37,080 INFO [EJBDeployer] Deployed: file:/D:/BankFusion123Platform/jboss/server/default/tmp/deploy/tmp19062UBInsideEAR.ear-contents/UBInsideEJB.jar
14:53:37,283 INFO [TomcatDeployer] deploy, ctxPath=/UB, warUrl=.../tmp/deploy/tmp19062UBInsideEAR.ear-contents/UBInsideWeb-exp.war/
14:53:37,345 INFO [[/UB]] default: init
14:53:37,345 INFO [[/UB]] jsp: init
14:53:37,377 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2
14:53:37,392 WARN [TomcatDeployer] Failed to setup clustering, clustering disabled. NoClassDefFoundError: org/jboss/cache/CacheException
14:53:37,423 INFO [EARDeployer] Started J2EE application: file:/D:/BankFusion123Platform/jboss/server/default/deploy/UBInsideEAR.ear
14:53:37,423 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.ejb:service=EJBTimerService,persistencePolicy=database
State: CONFIGURED
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS

ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker
jboss.web:service=WebServer

ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
State: CONFIGURED
I Depend On:
jboss:service=TransactionManager
jboss.jca:service=DataSourceBinding,name=DefaultDS

ObjectName: jboss.mq:service=StateManager
State: CONFIGURED
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq:service=DestinationManager
State: CONFIGURED
I Depend On:
jboss.mq:service=MessageCache
jboss.mq:service=PersistenceManager
jboss.mq:service=StateManager
jboss.mq:service=ThreadPool
jboss:service=Naming
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq.destination:service=Queue,name=A
jboss.mq.destination:service=Queue,name=B
jboss.mq.destination:service=Queue,name=C
jboss.mq.destination:service=Queue,name=D
jboss.mq.destination:service=Queue,name=ex
jboss.mq:service=SecurityManager
jboss.mq.destination:service=Queue,name=DLQ

ObjectName: jboss.mq:service=PersistenceManager
State: CONFIGURED
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
Depends On Me:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq.destination:service=Topic,name=testTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager

ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager

ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager

ObjectName: jboss.mq.destination:service=Queue,name=testQueue
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager

ObjectName: jboss.mq.destination:service=Queue,name=A
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq.destination:service=Queue,name=B
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq.destination:service=Queue,name=C
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq.destination:service=Queue,name=D
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq.destination:service=Queue,name=ex
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager

ObjectName: jboss.mq:service=Invoker
State: CONFIGURED
I Depend On:
jboss.mq:service=TracingInterceptor
jboss:service=Naming
Depends On Me:
jboss.mq:service=InvocationLayer,type=HTTP
jboss.mq:service=InvocationLayer,type=JVM
jboss.mq:service=InvocationLayer,type=UIL2

ObjectName: jboss.mq:service=TracingInterceptor
State: CONFIGURED
I Depend On:
jboss.mq:service=SecurityManager
Depends On Me:
jboss.mq:service=Invoker

ObjectName: jboss.mq:service=SecurityManager
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
Depends On Me:
jboss.mq.destination:service=Topic,name=testTopic
jboss.mq.destination:service=Topic,name=securedTopic
jboss.mq.destination:service=Topic,name=testDurableTopic
jboss.mq.destination:service=Queue,name=testQueue
jboss.mq:service=TracingInterceptor
jboss.mq.destination:service=Queue,name=DLQ

ObjectName: jboss.mq.destination:service=Queue,name=DLQ
State: CONFIGURED
I Depend On:
jboss.mq:service=DestinationManager
jboss.mq:service=SecurityManager

ObjectName: jboss.mq:service=InvocationLayer,type=JVM
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker

ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
State: CONFIGURED
I Depend On:
jboss.mq:service=Invoker

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.jca:service=DataSourceBinding,name=DefaultDS
State: NOTYETINSTALLED
Depends On Me:
jboss.ejb:service=EJBTimerService,persistencePolicy=database
jboss:service=KeyGeneratorFactory,type=HiLo
jboss.mq:service=StateManager
jboss.mq:service=PersistenceManager


14:53:37,517 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
14:53:37,642 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
14:53:37,658 INFO [JkMain] Jk running ID=0 time=0/63 config=null
14:53:37,673 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 16s:124ms
14:54:20,298 INFO [[/UB]] UBInside: init
14:54:20,423 INFO [[/UB]] jsp: init
14:58:09,155 ERROR [UBInsideException] Unable to obtain the Initial Context Database Connection.
14:58:17,139 INFO [[/UB]] jsp: init
16:05:43,796 ERROR [STDERR] javax.naming.NameNotFoundException: DB2DS not bound
16:05:43,796 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
16:05:43,796 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
16:05:43,796 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
16:05:43,796 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
16:05:43,796 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
16:05:43,796 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
16:05:43,796 ERROR [STDERR] at javax.naming.InitialContext.lookup(Unknown Source)

16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.persist.PersistConnection.getDataSource(PersistConnection.java:111)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.persist.PersistConnection.getConnection(PersistConnection.java:65)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.persist.PersistSelect.findResource(PersistSelect.java:225)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.persist.PersistSelect.findResourceByResourceTypeID(PersistSelect.java:333)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.main.SearchResources.getRequestedSearch(SearchResources.java:43)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.ejbs.UBInsideBean.executeUBInsideMethod(UBInsideBean.java:68)
16:05:43,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:05:43,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
16:05:43,796 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
16:05:43,796 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:954)
16:05:43,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16:05:43,796 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
16:05:43,796 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
16:05:43,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
16:05:43,796 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
16:05:43,796 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
16:05:43,796 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
16:05:43,796 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
16:05:43,796 ERROR [STDERR] at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
16:05:43,796 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
16:05:43,796 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
16:05:43,796 ERROR [STDERR] at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
16:05:43,796 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
16:05:43,796 ERROR [STDERR] at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
16:05:43,796 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
16:05:43,796 ERROR [STDERR] at $Proxy55.executeUBInsideMethod(Unknown Source)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.servlets.UBInsideServlet.processDefaultSearch(UBInsideServlet.java:251)
16:05:43,796 ERROR [STDERR] at com.misys.ub.inside.servlets.UBInsideServlet.doPost(UBInsideServlet.java:122)
16:05:43,796 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
16:05:43,796 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
16:05:43,796 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
16:05:43,796 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
16:05:43,796 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
16:05:43,796 ERROR [STDERR] at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
16:05:43,796 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
16:05:43,796 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
16:05:43,796 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
16:05:43,796 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
16:05:43,796 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
16:05:43,796 ERROR [STDERR] at java.lang.Thread.run(Unknown Source)
 
Rohan Honwade
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My db2-ds.xml contents are as follows -

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>DB2DS</jndi-name>
<connection-url>jdbc:db2://localhost:50000/newinsd</connection-url>
<driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
<user-name>RHonwade</user-name>
<password>password</password>
<min-pool-size>5</min-pool-size>
<max-pool-size>100</max-pool-size>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<idle-timeout-minutes>15</idle-timeout-minutes>
<metadata>
<type-mapping>DB2</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
 
Rohan Honwade
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finally understood why I was getting the ‘unable to get initial context exception’. This was because by default, the XX-ds.xml file adds a datasource in the local java namespace of JNDI. So when a client running on a different JVM looks up for this JNDI name, it wont be able to get it. It will only look for names in the global namespace. So if we add a tag <use-java-context>false</use-java-context> in the XX-ds.xml, it will add the datasource in the global namespace.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic