Open chughts opened 3 years ago
I don't see it hang, but throw, coming directly from GraalVM being unable to do the needed ObjectOutputStream.writeObject() serialization operation:
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectOutputStream.writeObject()
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:68)
...
at org.apache.qpid.jms.message.JmsObjectMessage.setObject(JmsObjectMessage.java:47)
This is confirmed by https://github.com/oracle/graal/issues/460, though that does now indicate support is coming in GraalVM 21.0.0 via https://github.com/oracle/graal/pull/2730
I am currently on LLVM (GraalVM CE Native 20.2.0) Running on a Mac (Catalina)
I am not getting the exception, only a hang.
I was using GraalVM CE 20.3.0 and my own reproducer. Note that it isn't an [JMS]Exception that is thrown but an Error. The above code example wont catch it.
You are right. Adding a catch(Error e)
, shows up the thrown error.
I was expecting anything I didn't catch to bubble up through the Quarkus code and show up in the logs.
Serialization has been added into GraalVM. Worth rechecking with a recent version.
If you use "custom" objects, make sure they are annotated with @RegisterForReflection
I will give it a go.
I have code that creates and puts in turn TextMessage, BytesMessage, StreamMessage, ObjectMessage and MapMessage onto queues. It works when running under standard Quarkus, but when the code is compiled and run as a GraalVM executable it hangs, with no timeout on
code just enough to recreate: