You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Gary Slotnikov <ga...@mylocalstore.com> on 2004/08/04 21:13:45 UTC

javax.naming.NameNotFoundException

Hello, 

I'm very new to Cactus & J2EE, and I am trying to perform a simple unit test of an EJB with JBoss. When I run my Cactus unit test, I get the following error:


javax.naming.NameNotFoundException: entityPersonFacadeLocal not bound


In my test class, I have:


PersonLocalHome home = (PersonLocalHome)  PortableRemoteObject.narrow(ctx.lookup(JNDINames.PERSON_FACADE_LOCAL_HOME), PersonLocalHome.class);


In my JNDINames.java class, and I have the following mapping:


public static final String PERSON_FACADE_LOCAL_HOME = "entityPersonFacadeLocal";


In jboss.xml, I have:

<session>
<ejb-name>PersonFacade</ejb-name>
<jndi-name>entityPersonFacade</jndi-name>
<local-jndi-name>entityPersonFacadeLocal</local-jndi-name>
<ejb-local-ref>
<ejb-ref-name>Person</ejb-ref-name>
<local-jndi-name>entityPersonLocal</local-jndi-name>
<ejb-link>Person</ejb-link>
</ejb-local-ref>
</session>

Finally,  in my JNDI.properties file I have:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099


When I deploy my ear file with JBoss alone, the appropriate bindings appear in the JNDI namespace ( I checked this using jmx-console). However, when I use Cactus to start up JBoss, these bindings do not appear in the JNDI namespace. I believe I have all the relevant jars and classes specified in the build.xml classpaths. What am I missing? 

I am using Jboss 3.2.3 under win2K, and Cactus 1.6.1 for the unit testing.

Thanks in advance,
Gary Slotnikov
IDfusion Software