5 Replies Latest reply on Jul 26, 2002 6:18 PM by sayers

    OracleDs Not Bound

    manojkumar



      I am trying to Connect to Oracle db Server , i am getting Error called Name Not Found Exception.
      OracleDs Not Bound.

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

      i am Using JBoss3.0.0 with Tomcat4.x what will be the problem .

      i have tried in two ways

      1. trying get the db connection thro JNDI from a jsp page
      Failed

      2. Trying to retrive the data through a Stateless Bean which is deployed perfectly.

      this one is also failed.

      but i can able to communicate to the bean for the other business logic except the getUserdata();


      if any one know how to solve this problem/ how to configure the datasource Connection Pool Manager in JBoss3.0 pl tell me


        • 1. Re: OracleDs Not Bound
          claude

          Maybe your OracleDS is not bound.
          Have you checked with the Web management interface?
          If not: go to:
          http://127.0.0.1:8082/ (where 127.0.0.1 is the address of my server)
          click on "Service=JNDIView"
          click on "List"
          Then, your "OracleDS" should be listed under the "Java: namespace". If it's not there, check the settings of you datasource and oracle driver.

          Hope it helps, Claude
          PS: I have done this on JBoss 2.4.4 (not on JBoss3.0)

          • 2. Re: OracleDs Not Bound
            davidjencks

            The advice for using jndiview is good and will work on jboss 3 also.
            Are you looking up "java:/OracleDs"? Check the case of all the letters.

            • 3. Re: OracleDs Not Bound
              jweis

              As of last nights CVS get, the following code snippet:

              //**********************************************
              // Get the initial context with given properties
              // Populate with needed properties
              Hashtable props = new Hashtable();
              props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
              props.put(Context.PROVIDER_URL, "localhost:1099");
              props.put("java.naming.rmi.security.manager", "yes");
              props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming");
              fContext = new InitialContext(props);

              // Create DataSource
              fDataSource = (DataSource)fContext.lookup("java:/DefaultDS");
              //**********************************************

              throws a not found exception:
              javax.naming.NameNotFoundException: DefaultDS not bound

              The list method of the JNDIView shows this datasource as bound:

              java: Namespace
              +- DefaultDS (class: org.jboss.resource.adapter.jdbc.local.LocalDataSource)
              +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
              +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
              +- OracleDS (class: org.jboss.resource.adapter.jdbc.local.LocalDataSource)
              +- DefaultJMSProvider (class: org.jboss.jms.jndi.JBossMQProvider)
              +- CounterService (class: org.jboss.varia.counter.CounterService)
              +- comp (class: javax.naming.Context)
              +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
              +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
              +- jaas (class: javax.naming.Context)
              | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
              | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
              +- timedCacheFactory (class: javax.naming.Context)
              Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
              +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
              +- Mail (class: javax.mail.Session)
              +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
              +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
              +- TransactionManager (class: org.jboss.tm.TxManager)

              For that matter I cannot retrieve any DataSource from JNDI. I can however get other objects. Any suggestions?

              • 4. Re: OracleDs Not Bound
                jweis

                Please disregard my last post. Problem was all mine.

                • 5. Re: OracleDs Not Bound
                  sayers

                  Claude,

                  I am having a problem with the jdbc connection is not bound as well in jboss 24. could you please let me know how you configured this.

                  thank shawn.