This content has been marked as final.
Show 6 replies
-
1. Re: EJB3 Bean Access
hanyshafik Mar 18, 2009 6:12 AM (in response to ia96herz)it seems u have a misspelled projects instead of project according to ur jndi view.
ctx.lookup("project/ExperimentServiceEJB/remote"); -
2. Re: EJB3 Bean Access
ia96herz Mar 18, 2009 6:24 AM (in response to ia96herz)Hi, thanks for your answer.
I have checked this in my code again. There it is correct (i just substituted the name project for this post).
I have tried to access other resources listed in the JNDI tree. This is working without any problem. But the access on my ExperimentService is not working.
any other ideas?
regards,
Dave -
3. Re: EJB3 Bean Access
jaikiran Mar 18, 2009 6:46 AM (in response to ia96herz)Post the entire exception stacktrace
-
4. Re: EJB3 Bean Access
ia96herz Mar 18, 2009 7:31 AM (in response to ia96herz)Here ist the exception stacktrace:
javax.naming.NameNotFoundException: project/ExperimentServiceEJB/remote at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:242) at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:155) at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ha.framework.server.HARMIServerImpl.invoke(HARMIServerImpl.java:209) at sun.reflect.GeneratedMethodAccessor307.invoke(Unknown Source) 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:466) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707) 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.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source) at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:219) at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:321) at $Proxy0.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.roche.research.theraps.rmi.RmiTest.testRmi(RmiTest.java:72) 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 junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
-
5. Re: EJB3 Bean Access
jaikiran Mar 18, 2009 7:48 AM (in response to ia96herz)javax.naming.NameNotFoundException: project/ExperimentServiceEJB/remote
at org.jboss.ha.jndi.TreeHead.lookup(TreeHead.java:242)
at org.jboss.ha.jndi.HAJNDI.lookup(HAJNDI.java:155)
Looks like its picking up HAJNDI (=clustering). What are the hostname and port that you are passing for the lookup? And how do you start the server what parameters do you use with run.sh/run.bat -
6. Re: EJB3 Bean Access
ia96herz Mar 18, 2009 8:04 AM (in response to ia96herz)Hi
The URL is:properties.put(Context.PROVIDER_URL,"jnp://rbals72:10380");
The JBoss4.2.3 is started with the followign command:run.sh -c INSTANCE_NAME -b rbals72 &