JBoss marshalling fail if java.util.concurrent.PriorityBlockingQueue is used in custom objects which need to be serialized in EAP
Question
java.util.concurrent.PriorityBlockingQueueimplements Serializable from the API but if object should be serialized for an EAP application it throws a NullPointerException with the cause like below.
ERROR [stderr] (EJB default - 2) Caused by: java.lang.NullPointerException
ERROR [stderr] (EJB default - 2) at java.util.concurrent.PriorityBlockingQueue.readObject(PriorityBlockingQueue.java:943)
ERROR [stderr] (EJB default - 2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ERROR [stderr] (EJB default - 2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
ERROR [stderr] (EJB default - 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
ERROR [stderr] (EJB default - 2) at java.lang.reflect.Method.invoke(Method.java:498)
ERROR [stderr] (EJB default - 2) at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)
Environnement
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4
- 7.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.