RuedigerMoeller / fast-serialization

FST: fast java serialization drop in-replacement
Apache License 2.0
1.59k stars 247 forks source link

Cannot serialize a JPDL template object due to java.util.timestamp references. #167

Closed supertoy closed 7 years ago

supertoy commented 7 years ago

When i try to serialize a JBPM template object, i got the below error, any suggestion ? And It can work when i use default serialization ,but when the node number in workflows > 200 , got a stackoverflow error. any suggestion ?

: (128) errors in serializing template objects to byte arrays, template id is 8: java.lang.RuntimeException: cannot support legacy JDK serialization methods in crossplatform mode. Define a serializer for this class java.sql.Timestamp at org.nustaq.serialization.FSTClazzInfo.(FSTClazzInfo.java:174) at org.nustaq.serialization.FSTClazzInfoRegistry.getCLInfo(FSTClazzInfoRegistry.java:130) at org.nustaq.serialization.FSTObjectOutput.getFstClazzInfo(FSTObjectOutput.java:514) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:408) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:361) at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:639) at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:526) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:446) at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:319) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:275) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:193) at org.nustaq.serialization.FSTConfiguration.asByteArray(FSTConfiguration.java:1143) java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

supertoy commented 7 years ago

The error happened when i used a min-js format.

RuedigerMoeller commented 7 years ago

reason is (from the output) "cannot support legacy JDK serialization methods in crossplatform mode". JSon format does not support this. You need to either use binary serialization or register a serializer for this class.

supertoy commented 7 years ago

It can work when i use default serialization ,but when the node number in workflows > 200 , got a stackoverflow error. any suggestion ? working in jvm 8.

RuedigerMoeller commented 7 years ago

see my comment int #170