JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-557  -  JPPF node with Xstream serialization.
Posted Nov 07, 2018 - updated Nov 11, 2018
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Closed
  • Assigned to
     lolo4j
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     ecx_q
  • Owned by
    Not owned by anyone
  • Category
    Customization
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Critical
  • Targetted for
    icon_milestones.png JPPF 6.0.1
Issue description
JPPF node with Xstream serialization fails to connect to JPPF driver. The following exception occurs:
2018-11-07 12:47:58,204 [DEBUG][org.jppf.node.NodeRunner.main(152)]: received reconnection notification : org.jppf.JPPFNodeReconnectionNotification: Could not reconnect to the server
        at org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle.init(AbstractJPPFClassLoaderLifeCycle.java:130)
        at org.jppf.classloader.JPPFClassLoader.<init>(JPPFClassLoader.java:41)
        at org.jppf.node.NodeRunner$2.run(NodeRunner.java:264)
        at org.jppf.node.NodeRunner$2.run(NodeRunner.java:261)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jppf.node.NodeRunner.getJPPFClassLoader(NodeRunner.java:267)
        at org.jppf.node.NodeRunner.createNode(NodeRunner.java:200)
        at org.jppf.node.NodeRunner.main(NodeRunner.java:147)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
        at org.jppf.classloader.RemoteClassLoaderConnection.performHandshake(RemoteClassLoaderConnection.java:127)
        at org.jppf.classloader.RemoteClassLoaderConnection.init(RemoteClassLoaderConnection.java:87)
        at org.jppf.classloader.AbstractJPPFClassLoaderLifeCycle.init(AbstractJPPFClassLoaderLifeCycle.java:128)
        ... 7 more
Caused by: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0
        at org.jppf.classloader.AbstractClassLoaderConnection.performCommonHandshake(AbstractClassLoaderConnection.java:79)
        at org.jppf.classloader.RemoteClassLoaderConnection.performHandshake(RemoteClassLoaderConnection.java:123)
        ... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
        at org.jppf.io.MultipleBuffersLocation.<init>(MultipleBuffersLocation.java:78)
        at org.jppf.io.IOHelper.serializeDataToMemory(IOHelper.java:275)
        at org.jppf.io.IOHelper.serializeData(IOHelper.java:255)
        at org.jppf.io.IOHelper.sendData(IOHelper.java:217)
        at org.jppf.classloader.RemoteResourceRequest.run(RemoteResourceRequest.java:69)
        at org.jppf.classloader.AbstractClassLoaderConnection.performCommonHandshake(AbstractClassLoaderConnection.java:66)
        ... 10 more
Steps to reproduce this issue
Cluster is made of one driver and one node instance. Both driver and a node have out-of-box configuration, except for one line jppf.object.serialization.class = org.jppf.serialization.XstreamSerialization which is uncommented on both entities.

Jars xstream-1.4.11.1.jar and xpp3-1.1.4c.jar were downloaded into the lib folder of a driver and a node.


#6
Comment posted by
 lolo4j
Nov 08, 11:33
In fact, from the latest XStream distro, I found that these 3 jars are required: xstream-1.4.11.1.jar, xpp3_min-1.1.4c.jar, xmlpull-1.1.3.1.jar

Flushing the ObjectOutputStream created by XStream, after writing the object in XstreamSerialization.serialize(), appears to fix the problem.

I will add non-regression tests for XStream (the same as for standard Java, JPPF and Kryo serializations) to ensure this kind of problem is detected ASAP.
#9
Comment posted by
 lolo4j
Nov 09, 13:41
It seems there is an issue with the deserialization of javax.management.Notification objects with XStream. I created xstream issue #135 for this.