This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am trying to deploy stateful session bean in the jboss-4.2.0.GA server. I want the bean to get bound to the java:comp/env namespace, so that i can lookup for the bean as Count objCount = (Count)ctx.lookup("java:comp/env/ejb/count")
But i get the following stack trace when i access the client, javax.naming.NameNotFoundException: comp not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) at sun.rmi.transport.Transport$1.run(Transport.java:153) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:149) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:595) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.nec.client.CountClient.main(CountClient.java:19)
Please clarify whether we can use <ejb-ref> with ejb 3.0 and jboss-4.2.0.GA server.
Please post the xml contents and the code where you are doing the lookup. Also, please post the output of the following steps:
- Go to http://localhost:8080/jmx-console - Search for service=JNDIView - Click on that link - On the page that comes up click on the Invoke button beside the list() method - The page that comes up will show the contents of the JNDI tree. Post that here.
Originally posted by Gurumurthy Ramamurthy: These are the xml contents:
The xml contents are missing.
Originally posted by Gurumurthy Ramamurthy: Global JNDI Namespace +- CountBean (class: org.jnp.interfaces.NamingContext) | +- remote (class: java.lang.Object) | +- remoteStatefulProxyFactory (proxy: $Proxy100 implements interface org.jboss.ejb3.ProxyFactory)
Look up code: Count objCount = (Count)ctx.lookup("java:comp/env/ejb/count")
Thanks, Guru
The jndi contents that you posted is for the Global JNDI namespace. If you want to use the java: namespace then you will have to look into the appropriate java: namespace of your application. You will find it on the same jndi tree view.
Emanuele Ghe
Ranch Hand
Joined: Feb 04, 2009
Posts: 111
posted
0
Hi Gurumurthy,
I am having the same issue. Did you solved this problem ? Can you tell me how?
SCJP6 with score 90%. I am conscious of my ignorance and ready to learn from everyone.