8 Replies Latest reply on Sep 28, 2017 10:04 AM by dmlloyd

    Serialization of Throwable from server (jdk8) to client (jdk9) causes exception. Bug?

    sam.clunie

      Hi

       

      We have a Wildfly 10.1.0.Final server running on JDK 1.8.0u144, and are doing some testing of running our Swing client under the latest JDK9 Early Access release (currently 178). When an exception is thrown by one of our Stateless Session Beans back to our client, we get the attached exception.

       

      It would appear that in JDK9, StackTraceElement has several additional fields over what was in JDK8, and I suspect that this is causing issues for JBoss Marshalling River.

       

      Java 8:

       

      private String declaringClass;
      private String methodName;
      private String fileName;
      private int    lineNumber;
      

       

      Java 9:

       

      private String classLoaderName;
      private String moduleName;
      private String moduleVersion;
      private String declaringClass;
      private String methodName;
      private String fileName;
      private int    lineNumber;
      private byte   format = 0; // Default to show all
      

       

       

      A bit of debugging revealed that the org.jboss.as.ejb3.remote.protocol.versionone.ProtocolV1ClassTable class table from wildfly-ejb-10.1.0.Final.jar is being used for marshalling, and that there were similar issues reported before for JDK6/JDK7 compatibility issues with the Throwable Class, discussed here:

       

      1. Jboss AS 7.1, EJB exceptions and java.io.StreamCorruptedException
      2. [EJBCLIENT-46] Problem with Throwable in the class table - JBoss Issue Tracker

       

      Client side, we are using jboss-ejb-client-2.1.4.Final.jar, and both client and server are using jboss-marshalling-river-1.4.11.Final.jar and jboss-marshalling-1.4.11.Final.jar.

       

      Is anyone else experiencing the same, or able to confirm whether this is a problem in org.jboss.as.ejb3.remote.protocol.versionone.ProtocolV1ClassTable that needs to be resolved in a similar way?

       

      Thanks.