JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-213  -  ClassCastException in Kryo serializer
Posted Jan 22, 2014 - updated Mar 28, 2016
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
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     lolo4j
  • Owned by
    Not owned by anyone
  • Category
    Samples
  • Resolution
    RESOLVED
  • Priority
    Normal
  • Reproducability
    Always
  • Severity
    Normal
  • Targetted for
    icon_milestones.png JPPF 4.0.x
Issue description
When using the Kryo serialization from the related sample, the server throws the following exception when a node connects to it:
2014-01-21 13:49:54,201 [NodeClassServer-8] DEBUG org.jppf.nio.StateTransitionTask {} - error on channel SelectionKeyWrapper[id=16, readyOps=1, interestOps=0, context=channel=SelectionKeyWrapper[id=16], state=WAITING_INITIAL_NODE_REQUEST, resource=null, pendingResponses=0, type=node, peer=false, uuid=null, secure=false, ssl=false] : com.esotericsoftware.kryo.KryoException: java.lang.ClassCastException: class org.jppf.classloader.ResourceIdentifier != null
Serialization trace:
dataMap (org.jppf.classloader.JPPFResourceWrapper)
  at com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.read(FieldSerializer.java:626)
  at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:221)
  at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:729)
  at test.KryoSerialization.deserialize(KryoSerialization.java:84)
  at org.jppf.utils.ObjectSerializerImpl.deserialize(ObjectSerializerImpl.java:154)
  at org.jppf.utils.ObjectSerializerImpl.deserialize(ObjectSerializerImpl.java:140)
  at org.jppf.io.IOHelper.unwrappedData(IOHelper.java:215)
  at org.jppf.io.IOHelper.unwrappedData(IOHelper.java:187)
  at org.jppf.server.nio.classloader.ClassContext.deserializeResource(ClassContext.java:120)
  at org.jppf.server.nio.classloader.node.WaitingInitialNodeRequestState.performTransition(WaitingInitialNodeRequestState.java:72)
  at org.jppf.server.nio.classloader.node.WaitingInitialNodeRequestState.performTransition(WaitingInitialNodeRequestState.java:33)
  at org.jppf.nio.StateTransitionTask.run(StateTransitionTask.java:82)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
  at java.lang.Thread.run(Thread.java:722)
Steps to reproduce this issue
  • configure a ndde and server forKryo serialization, based on the sample
  • launch the server, then the node
  • ==> you get the exception

#4
Comment posted by
 lolo4j
Jan 24, 09:59