JPPF Issue Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report JPPF-556  -  DefaultJPPFSerialization fails to serialize JPPF task execution notification
Posted Oct 30, 2018 - updated Oct 30, 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 JPF 6.0.1
Issue description
DefaultJPPFSerialization fails to serialize JPPF task execution notification, throws java.io.IOException: Can not set boolean field org.jppf.management.OffloadableNotification.userDataOffloaded to javax.management.ObjectName. The problem can lead to unexpected task cancellations in case, when DefaultJPPFSerialization is used.
Steps to reproduce this issue
TaskExecutionNotification taskExecutionNotification = new TaskExecutionNotification(new ObjectName("domain:name=a"),
	1,
	new TaskInformation("a", "a", "a", 1, 1, true, 1),
	null,
	true);
System.out.println("Default Java serialization:");
(new DefaultJavaSerialization()).serialize(taskExecutionNotification, System.out);
System.out.println();
System.out.println("Default JPPF serialization:");
(new DefaultJPPFSerialization()).serialize(taskExecutionNotification, System.out);

#4
Comment posted by
 ecx_q
Oct 30, 15:39
Could you please give some recommendations which serialization scheme should be used?
#7
Comment posted by
 lolo4j
Oct 30, 22:43
ecx_q wrote:
Could you please give some recommendations which serialization scheme
should be used?


The JPPF serialization was designed to serialize/deserialize classes that do not implement Serializable, unlike the standard Java serialization. This can happen when your application uses classes (for example in a 3rd-party library) for which you don't have the source code. If you want faster serialization with smaller serialized format, you could use the Kryo serialization sample (which I had to fix too).