5 Replies Latest reply on Jan 20, 2013 9:12 AM by Leon Skeldon

    Problem with Resource Reference Mapping

    Leon Skeldon Newbie

      I am using JBoss 7.1in Eclipse.


      I have some code in an EJB:


      Context initCtx = new InitialContext();
      Context envCtx = (Context) initCtx.lookup("java:comp/env");
      // Look up our value

      jndiValue = (String) envCtx.lookup("test");   


      I have an jboss-ejb3.xml with the following in it:








      I though this would map by ejb jndi look-up to the correct jndi look-up but I get:


      20:41:56,234 ERROR [stderr] (EJB default - 6) javax.naming.NameNotFoundException: env/test -- service jboss.naming.context.java.comp.SimpleJNDILookUpBean.SimpleJNDILookUpBean.SimpleJNDILookUpBean.env.test


      Which suggests the mapping is not happening.  Can anyone help?