JiriOndrusek opened a new issue #2693:
URL: https://github.com/apache/camel-quarkus/issues/2693


   During fixation of https://github.com/apache/camel-quarkus/issues/2623, I 
found an issue with sql aggregator in native mode.
   
   Firstly, simple `Caused by: java.lang.ClassNotFoundException: 
org.apache.camel.support.DefaultExchangeHolder` is thrown.
   Fix (by addition of `ReflectiveClassBuildItem`) uncovers more serious issue. 
Problem is happening during serialization/deserialization of 
`DefaultExchangeHolder`.
   
   ````
   Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: The offset of 
private java.lang.Exception 
org.apache.camel.support.DefaultExchangeHolder.exception is accessed without 
the field being first registered as unsafe accessed. Please register the field 
as unsafe accessed. You can do so with a reflection configuration that contains 
an entry for the field with the attribute "allowUnsafeAccess": true. Such a 
configuration file can be generated for you. Read BuildConfiguration.md and 
Reflection.md for details.
        at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
        at jdk.internal.misc.Unsafe.objectFieldOffset(Unsafe.java:50)
        at 
java.io.ObjectStreamClass$FieldReflector.<init>(ObjectStreamClass.java:2002)
        at java.io.ObjectStreamClass.getReflector(ObjectStreamClass.java:2266)
        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:534)
        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:381)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1135)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:349)
        at 
org.apache.camel.processor.aggregate.jdbc.JdbcCamelCodec.encode(JdbcCamelCodec.java:98)
   ````
   
   I've tried suggested solution and I've also tried to register class for 
serialization (using native approach 
https://github.com/oracle/graal/pull/2730), but it didn't help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to