1 Reply Latest reply on Sep 20, 2001 5:00 PM by elchory

    Getting NamingException : not bound

    elchory

      Hi, first of all, I did RTFM!
      http://www.jboss.org/documentation/HTML/ch07s22.html

      Followed it to the T, I still get an exception when trying to:

      Object ref = jndiContext.lookup("CCDataSource");
      

      It works fine if I:
      Object ref = jndiContext.lookup("java:/CCDataSource");
      

      My web.xml and jboss-web.xml follow, any ideas?

      <web-app>

      <servlet-name>CCDispatcher</servlet-name>
      <servlet-class>
      CCDispatcherServlet
      </servlet-class>

      <resource-ref>
      just a DataSource
      <res-ref-name>CCDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </web-app>

      <jboss-web>
      <resource-ref>
      <res-ref-name>CCDataSource</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <jndi-name>java:/CCDataSource</jndi-name>
      </resource-ref>
      </jboss-web>