Hi!
Kenneth Reed wrote:
> 1) create and deploy my bean (at least it shows up in the server log),
> including setting up the CMP fields.
>
> 2) put jnpserver.jar into \jre\lib\ext
>
> 3) Created an initial context using the following code (is there some magic
> place where I can put jndi.properties so that I can just create the
> initialize context using the default constructor for InitialContext?):
Place jndi.properties in the root of your classpath. This is defined in
the JNDI spec. The default constructor of InitialContext will try to
load jndi.proprties from the classloader, so putting it in classpath is
enough.
> 4) When I do the following two lines:
>
> Context jndiContext = getInitialContext();
> CabinHome home = (CabinHome)jndiContext.lookup("CabinHome");
>
> I get the following stack trace:
>
> javax.naming.NameNotFoundException: CabinHome not bound
> at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:167)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:152)
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
> at com.titan.cabin.Client_1.main(Client_1.java:33)
> at sun.tools.agent.MainThread.runMain(Native Method)
> at sun.tools.agent.MainThread.run(MainThread.java:45)
You must define the JNDI-name of your bean. If you load up the EJX GUI
(run /bin/ejx.jar) and open your ejb-jar.xml/.jar file by using the
"jBoss" filter, and select your bean, what do you see as "JNDI name"? If
it's not "CabinHome", then you need to fix this.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]