2 Replies Latest reply on Feb 18, 2009 3:22 AM by Sachin Jain

    javax.naming.NameNotFoundException: OracleDS not bound error

    Abhishek Gupta Newbie

      I am trying to Connect to Oracle database through my webapplication and I am getting the following error

      14:41:46,536 INFO [ApplicationInitPlugin] Loading DataSource...
      14:41:46,536 INFO [ApplicationInitPlugin] Looking up: OracleDS
      14:41:46,536 ERROR [ApplicationInitPlugin] Unable to find DataSource
      14:41:46,536 ERROR [[/MyApplication]] Servlet /MyApplication threw load() exception
      javax.naming.NameNotFoundException: OracleDS not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
      at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
      at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext.java:347)
      at com.zsf.struts.plugin.ApplicationInitPlugin.loadDataSource(Unknown Source)
      at com.zsf.struts.plugin.ApplicationInitPlugin.init(Unknown Source)
      at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1105)
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)........

      when i am starting the server however my oracle-service.xml file is deployed and stating that the File is Deployed Successfully with the JNDINAME: OracleDs.

      14:39:48,528 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=OracleDS,service=DataSourceBinding' to JNDI name 'java:OracleDS'

      I am Using JBoss 4.0.3SP1.

      I checked in the jmx-console of my application server and OracleDS is listed under java:namespace. Still I am getting this error.

      Can any one help me with this error. I will be really thankful.