This discussion is archived
1 Reply Latest reply: Dec 13, 2012 10:20 AM by Ben Wilcox RSS

Unable to lookup Data Source at context question

765202 Newbie
Currently Being Moderated
I'm currently having trouble with an automated process that needs to run in my Web app using ADF frame work. We're using JDeveloper 10.1.3.5 for development and Oracle Application Server 10.1.3.5 as the web server. This app connects to an Oracle 10g database but unsure of the version. The application is a web based app built on the ADF framework. It has two processes built in Java classes with main methods that are automated processes which need to run in the background; one runs at midnight and the other every hour.

the problem I'm experiencing when running these mains from a shell on the app server is Unable to lookup Data Source at context jdbc/sdrDS. the data source is identified in OAS and the web front works fine. these automated background processes aren't seeing the defined data source that's defined and I'm not sure why and don't really know what to do to fix this problem. Any help or thought would be greatly appreciated.

We call the main using a java.exe command which includes the classpath option and all paths to every class needed and the full package name of the class being excuted. Here's the stack trace that gets returned. Any thoughts and help is appreciated.

Exception in thread "main" JBO-30003: The application pool (mil.navy.navsup.sdr.SdrAppModuleLocal) failed to checkout an application module due to the following exception:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/sdrDS

     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)

     at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1546)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1504)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)

     at cronjobs.dodextinterface.voa.SystemPropertiesVOA.getProperties(SystemPropertiesVOA.java:25)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.<init>(SDRWorkFlowInitiator.java:143)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.main(SDRWorkFlowInitiator.java:481)


## Detail 0 ##
oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/sdrDS
     at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1453)
     at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:274)

     at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:184)

     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:478)

     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:367)

     at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7777)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2161)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)

     at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1546)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1504)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)

     at cronjobs.dodextinterface.voa.SystemPropertiesVOA.getProperties(SystemPropertiesVOA.java:25)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.<init>(SDRWorkFlowInitiator.java:143)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.main(SDRWorkFlowInitiator.java:481)


## Detail 0 ##
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)

     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

     at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)

     at javax.naming.InitialContext.lookup(InitialContext.java:351)

     at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1439)

     at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:274)

     at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:184)

     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:478)

     at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:367)

     at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:7777)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4074)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2161)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:1961)

     at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:2793)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:453)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:424)

     at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:419)

     at oracle.jbo.client.Configuration.getApplicationModule(Configuration.java:1546)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1504)

     at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1476)

     at cronjobs.dodextinterface.voa.SystemPropertiesVOA.getProperties(SystemPropertiesVOA.java:25)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.<init>(SDRWorkFlowInitiator.java:143)

     at cronjobs.workflowMgr.SDRWorkFlowInitiator.main(SDRWorkFlowInitiator.java:481)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points