0 Replies Latest reply on Sep 24, 2003 4:08 PM by schambers

    trouble setting global JNDI entries

    schambers Newbie

      Our group is new to JBoss, but we have been having few problems shifting to JBoss except for an inability to set up global JNDI entries that are visible to all webapps.

      We have read the documentation and have set up a jboss-web.xml in our webapp's WEB-INF directory as well as the following entry in the webapp's web.xml--

      -- web.xml --

      <resource-env-ref>
      <resource-env-ref-name>foo.bas.bar</resource-env-ref-name>
      <resource-env-ref-type>java.lang.String</resource-env-ref-type>
      </resource-env-ref>

      -- jboss-web.xml --

      <jboss-web>
      <resource-env-ref>
      <resource-env-ref-name>foo.bas.bar</resource-env-ref-name>
      <jndi-name>java:comp/env/foo.bas.bar</jndi-name>
      </resource-env-ref>
      </jboss-web>

      We also put the following entry in
      C:\jboss-3.2.2RC2\server\default\deploy\jbossweb-tomcat41.sar/web.xml

      <env-entry>

      <env-entry-name>foo.bas.bar</env-entry-name>
      <env-entry-value>foo.bas.bar.whatever</env-entry-value>
      <env-entry-type>java.lang.String</env-entry-type>
      </env-entry>

      We are getting the following exception:
      javax.naming.NamingException:
      Could not dereference object. Root exception is
      2003-09-24 16:15:32,968 ERROR [STDERR] javax.naming.NameNotFoundException: foo.bas.bar not bound

      How do we need to set up the JNDI entry so it is visible?

      We are on jboss-3.2.2RC2 with JDK1.4 and Wintel 2000.

      Thanks, Steve