cannot access sessionLocal

I am using WSAD 5.1 and create HelloWorld stateless session bean with local interface, but WSAD does not allow me to create reference to access the local and local home.It only has remote one. How should I do to fix this problem?

javax.naming.ConfigurationException: NamingManager.getURLContext cannot find the factory for this scheme: local at com.ibm.ws.naming.jndicos.CNContextImpl.checkForUrlContext(CNContextImpl.java:2770) at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1220) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132) at javax.naming.InitialContext.lookup(InitialContext.java:359) at helloworld.ejb.clients.HelloWorldEJBTestClient.main(HelloWorldEJBTestClient.java:41) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616) at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420) at java.lang.reflect.Method.invoke(Native Method) at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)

Dave Jian
Greenhorn

Joined: Apr 13, 2005
Posts: 6

posted Apr 18, 2005 12:14:00

0

I tried local:ejb/ejb/HolloWorldSessionLocalHome, it still the same error.

This is a session bean and I cannot create client reference for local. I believe server did it. When I use UTC, I can see the jndi tree from jndi explorer as: [Local EJB beans] ejb helloworld ejb HelloWorldSessionHome(helloworld.ejb.EJSLocalStatelessHelloWorldSessionHome_293bfcaf)

but how can I use it to do the lookup code?

I tried "local:ejb/ejb/helloworld/ejb/HelloWorldSessionLocalHome", it does not work eighter.

Dave, You still need the java:comp/env part before using the local path.

What type of client is this? Remember that only clients running on the server can access local interfaces. I've used local interfaces from servlets and EJBs. From the client, you have to use the application assembly tool to truly run on the server. It was more trouble than it was worth, so I just used a remote interface.