4 Replies Latest reply on Aug 23, 2019 2:37 AM by t0920008899

    EJB remote call failed on Wildfly 17

    t0920008899

      Hello, there,

       

      I hosted my server applications on WildFly 17, and had the remote application use "ejb:..." remote call to request the server for data retrieval. On the server side, the data were successfully retrieved and returned. However on the client side, the client application reported errors like:

      Caused by: javax.ejb.EJBException: Failed to read response

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.apply(EJBClientChannel.java:1298) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.apply(EJBClientChannel.java:1253) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:206) ~[wildfly-naming-client-1.0.10.Final.jar:1.0.10.Final]

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.getResult(EJBClientChannel.java:1305) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:607) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:148) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:124) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:85) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:212) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:963) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:191) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:125) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at com.sun.proxy.$Proxy136.getSQLDataSet(Unknown Source) ~[?:?]

      ... 10 more

      Caused by: java.io.EOFException: Read past end of file

      at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:151) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:294) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.SimpleDataInput.readIntDirect(SimpleDataInput.java:343) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.SimpleDataInput.readLongDirect(SimpleDataInput.java:325) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.SimpleDataInput.readLong(SimpleDataInput.java:320) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadClassDescriptor(RiverUnmarshaller.java:1019) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1355) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:220) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1853) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1767) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1395) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205) ~[jboss-marshalling-river-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41) ~[jboss-marshalling-2.0.7.Final.jar:2.0.7.Final]

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.apply(EJBClientChannel.java:1275) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.apply(EJBClientChannel.java:1253) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:206) ~[wildfly-naming-client-1.0.10.Final.jar:1.0.10.Final]

      at org.jboss.ejb.protocol.remote.EJBClientChannel$MethodInvocation$MethodCallResultProducer.getResult(EJBClientChannel.java:1305) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:607) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.protocol.remote.RemotingEJBClientInterceptor.handleInvocationResult(RemotingEJBClientInterceptor.java:56) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.TransactionPostDiscoveryInterceptor.handleInvocationResult(TransactionPostDiscoveryInterceptor.java:148) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.DiscoveryEJBClientInterceptor.handleInvocationResult(DiscoveryEJBClientInterceptor.java:124) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.NamingEJBClientInterceptor.handleInvocationResult(NamingEJBClientInterceptor.java:85) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.TransactionInterceptor.handleInvocationResult(TransactionInterceptor.java:212) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:609) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.getResult(EJBClientInvocationContext.java:543) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:963) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:191) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:125) ~[jboss-ejb-client-4.0.20.Final.jar:4.0.20.Final]

      at com.sun.proxy.$Proxy136.getSQLDataSet(Unknown Source) ~[?:?]

      Caused by: org.jboss.marshalling.TraceInformation

      On the client side I imported org.wildfly:wildfly-ejb-client-bom:17.0.1.Final:pom as the ejb-client library. Please kindly advise how to fix this.

       

      Best regards,

      Joey

        • 1. Re: EJB remote call failed on Wildfly 17
          jaikiran

          what exact version is the WildFly server? Do you have a simple application which reproduces this? Can you attach the source of that application?

          • 2. Re: EJB remote call failed on Wildfly 17
            t0920008899

            Hi, I am using 17.0.1Final. The source part of the client application which made the call is:

             

            DataSet lang = remoteAccessManager.getSQLDataSet( systemConnectionId , 201901 , new Object[0] , false );

             

            where DataSet is a custom class extending ArrayList< HashMap< String, Object > >.  I have other remote ejb method definitions like:

             

            String conn = remoteAccessManager.getSystemConnectionId( props ); //where props is a HashMap

             

            and this can be returned successfully. I have no clue why. Please kindly advise.

             

            Best regards,

            Joey

            • 3. Re: EJB remote call failed on Wildfly 17
              jaikiran

              Can you attach the code of that DataSet class (the one which extends ArrayList)? Was this ever working with previous version(s) of WildFly?

              • 4. Re: EJB remote call failed on Wildfly 17
                t0920008899

                Hi, I located the root cause. It turned out that one of the private field's type doesn't implement Serializable. Now the remote ejb can be executed well. Many thanks to you.

                 

                Best regards,

                Joey