Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12886

Stack trace of NoSuchEJBException doesn't show the line where the error happened

    XMLWordPrintable

Details

    Description

      EJB client invokes an EJB which doesn't exist on the server.
      With CR1 client, the thrown exception swallows all information indicating the line of the client code where the issue happened:

      Exception in thread "main" javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      	at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation.handleResponse(EJBClientChannel.java:1005)
      	at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation.handleResponse(EJBClientChannel.java:945)
      	at org.jboss.remoting3.util.InvocationTracker.signalResponse(InvocationTracker.java:167)
      	at org.jboss.ejb.protocol.remote.EJBClientChannel.processMessage(EJBClientChannel.java:176)
      	at org.jboss.ejb.protocol.remote.EJBClientChannel.access$100(EJBClientChannel.java:106)
      	at org.jboss.ejb.protocol.remote.EJBClientChannel$1$1.handleMessage(EJBClientChannel.java:659)
      	at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
      	at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:926)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		... 11 more
      

      With ER3 client, the exception is much more informative, and doesn't repeat 8 times that a NoSuchEJBException was suppressed:

      Exception in thread "main" javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/server/HelloBeanz", view is interface ejb.HelloBeanRemote, affinity is URI<remote+http://127.0.0.1:8080>
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:570)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:98)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:86)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:572)
      	at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:507)
      	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:913)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:174)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:107)
      	at com.sun.proxy.$Proxy2.hello(Unknown Source)
      	at client.Client.main(Client.java:23)   <------- THIS IS WHERE THE ISSUE HAPPENED IN APPLICATION CODE
      	Suppressed: javax.ejb.NoSuchEJBException: No such EJB: /server/HelloBeanz @ remote+http://127.0.0.1:8080
      		at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation.handleResponse(EJBClientChannel.java:1005)
      		at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation.handleResponse(EJBClientChannel.java:945)
      		at org.jboss.remoting3.util.InvocationTracker.signalResponse(InvocationTracker.java:167)
      		at org.jboss.ejb.protocol.remote.EJBClientChannel.processMessage(EJBClientChannel.java:176)
      		at org.jboss.ejb.protocol.remote.EJBClientChannel.access$100(EJBClientChannel.java:106)
      		at org.jboss.ejb.protocol.remote.EJBClientChannel$1$1.handleMessage(EJBClientChannel.java:659)
      		at org.jboss.remoting3.remote.RemoteConnectionChannel.lambda$handleMessageData$3(RemoteConnectionChannel.java:430)
      		at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:898)
      		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      		at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            rhn-cservice-bbaranow Bartosz Baranowski
            jmartisk@redhat.com Jan Martiska
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: