-
Bug
-
Resolution: Cannot Reproduce
-
Minor
-
None
-
JBoss AS7 7.2.0.Final
-
None
While experimenting with EJB remote access, I got confused with the proper configuration . This resulted in a NullPointerException in one of your EJB client classes, and I think this should be handled by a meaningful error message.
I performed a lookup for "ejb:Stateless/StatelessEJB//GeometricModelBean!de.fhw.komponentenarchitekturen.knauf.stateless.GeometricModelRemote" => this means I want to use the JNDI lookup.
But in "jndi.properties", I used this: "jboss.naming.client.ejb.context=true" => This should probably activate "jboss-remote naming", and the lookup should be done for "Stateless/StatelessEJB//GeometricModelBean...". (no "ejb:" prefix).
Instead of an error message, this resulted in this console output, followed by an exception:
Feb 05, 2013 10:43:57 PM org.xnio.Xnio <clinit> INFO: XNIO Version 3.0.7.GA Feb 05, 2013 10:43:57 PM org.xnio.nio.NioXnio <clinit> INFO: XNIO NIO Implementation Version 3.0.7.GA Feb 05, 2013 10:43:57 PM org.jboss.remoting3.EndpointImpl <clinit> INFO: JBoss Remoting version 3.2.14.GA Feb 05, 2013 10:43:58 PM org.jboss.ejb.client.remoting.VersionReceiver handleMessage INFO: EJBCLIENT000017: Received server version 1 and marshalling strategies [river] Feb 05, 2013 10:43:58 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate INFO: EJBCLIENT000013: Successful version handshake completed for receiver context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientContext@28ad5a, receiver=Remoting connection EJB receiver [connection=Remoting connection <c751fd>,channel=jboss.ejb,nodename=turbotante]} on channel Channel ID b93e696f (outbound) of Remoting connection 00411379 to localhost/127.0.0.1:4447 Feb 05, 2013 10:44:03 PM org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver associate INFO: EJBCLIENT000015: Initial module availability report for Remoting connection EJB receiver [connection=Remoting connection <c751fd>,channel=jboss.ejb,nodename=turbotante] wasn't received during the receiver context association Feb 05, 2013 10:44:03 PM org.jboss.ejb.client.EJBClient <clinit> INFO: JBoss EJB Client version 1.0.16.Final java.lang.NullPointerException at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.<init>(RemotingConnectionEJBReceiver.java:102) at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.<init>(RemotingConnectionEJBReceiver.java:90) at org.jboss.ejb.client.EJBClientContext.registerConnection(EJBClientContext.java:420) at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getContext(RemoteNamingEjbClientContextSelector.java:60) at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getCurrent(RemoteNamingEjbClientContextSelector.java:46) at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getCurrent(RemoteNamingEjbClientContextSelector.java:15) at org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:271) at org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:281) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:156) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:124) at sun.proxy.$Proxy0.computeCuboidVolume(Unknown Source) at de.fhw.komponentenarchitekturen.knauf.stateless.standaloneclient.GeometricModelApplicationClient.main(GeometricModelApplicationClient.java:38)
I will attach a sample. This is an Eclipse project. But i can also be run standalone: just modify "StatelessStandaloneClient\startclient.bat" to match your path to "jboss-client.jar" and start it (you need Java 1.7 for this). You don't even have to deploy the EAR app on the server to see the error. But if you want to do so: it is also part of the attachment: "Stateless.ear".