Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot serialise field parent on object ... as setter and getters were different types #16954

Closed
lburgazzoli opened this issue May 3, 2021 · 6 comments · Fixed by #17279
Closed
Labels
kind/bug Something isn't working
Milestone

Comments

@lburgazzoli
Copy link
Contributor

lburgazzoli commented May 3, 2021

Env

Quarkus Version 1.13.2 on openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment 18.9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9, mixed mode, sharing)

Describe the bug

[ERROR] testKameletWithProperties  Time elapsed: 0.009 s  <<< ERROR!
java.lang.RuntimeException: 
java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: Failed to record call to method public io.quarkus.runtime.RuntimeValue org.apache.camel.quarkus.component.kamelet.KameletRecorder.createTemplateLoaderCustomizer(java.util.List)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:452)
        at io.quarkus.deployment.steps.MainClassBuildStep.writeRecordedBytecode(MainClassBuildStep.java:438)
        at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:170)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
        at java.base/java.lang.Thread.run(Thread.java:829)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: Cannot serialise field parent on object SetBody[exchangeProperty{CamelTimerCounter}] as setter and getters were different types
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadComplexObject(BytecodeRecorderImpl.java:1371)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadObjectInstanceImpl(BytecodeRecorderImpl.java:956)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadObjectInstance(BytecodeRecorderImpl.java:548)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadComplexObject(BytecodeRecorderImpl.java:1114)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadObjectInstanceImpl(BytecodeRecorderImpl.java:956)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.loadObjectInstance(BytecodeRecorderImpl.java:548)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:447)
        ... 12 more

To Reproduce

  1. clone https://github.com/lburgazzoli/apache-camel-quarkus/tree/kamelets
  2. build the project mvn install -Pquickly
  3. run the integrtion tests in integration-tests/kamelet
@lburgazzoli lburgazzoli added the kind/bug Something isn't working label May 3, 2021
@lburgazzoli lburgazzoli changed the title StackOverflowError: BytecodeRecorderImpl.loadObjectInstance Cannot serialise field parent on object SetBody[exchangeProperty{CamelTimerCounter}] as setter and getters were different types May 3, 2021
@lburgazzoli lburgazzoli changed the title Cannot serialise field parent on object SetBody[exchangeProperty{CamelTimerCounter}] as setter and getters were different types Cannot serialise field parent on object ... as setter and getters were different types May 3, 2021
@lburgazzoli
Copy link
Contributor Author

@gsmet can we get someone looking at this ?

@gsmet
Copy link
Member

gsmet commented May 18, 2021

#17279 fixes it but... then you have a StackOverflowError. I'll dig a bit more.

@lburgazzoli
Copy link
Contributor Author

lburgazzoli commented May 18, 2021

The stack overflow I think was an issue on my side, I don't see it anymore.
Will this fix be in a 1.x release ?

@gsmet
Copy link
Member

gsmet commented May 18, 2021

The stack overflow was this cycle:

field 'outputs' on object 'Route[From[timer:{{routeId}}?period={{delay}}] -> [SetBody[exchangeProperty{CamelTimerCounter}], To[kamelet:sink]]]' of type 'org.apache.camel.model.RouteDefinition
field 'parent' on object 'SetBody[exchangeProperty{CamelTimerCounter}]' of type 'org.apache.camel.model.SetBodyDefinition
field 'outputs' on object 'Route[From[timer:{{routeId}}?period={{delay}}] -> [SetBody[exchangeProperty{CamelTimerCounter}], To[kamelet:sink]]]' of type 'org.apache.camel.model.RouteDefinition
field 'parent' on object 'SetBody[exchangeProperty{CamelTimerCounter}]' of type 'org.apache.camel.model.SetBodyDefinition
field 'outputs' on object 'Route[From[timer:{{routeId}}?period={{delay}}] -> [SetBody[exchangeProperty{CamelTimerCounter}], To[kamelet:sink]]]' of type 'org.apache.camel.model.RouteDefinition
field 'parent' on object 'SetBody[exchangeProperty{CamelTimerCounter}]' of type 'org.apache.camel.model.SetBodyDefinition
field 'outputs' on object 'Route[From[timer:{{routeId}}?period={{delay}}] -> [SetBody[exchangeProperty{CamelTimerCounter}], To[kamelet:sink]]]' of type 'org.apache.camel.model.RouteDefinition
field 'parent' on object 'SetBody[exchangeProperty{CamelTimerCounter}]' of type 'org.apache.camel.model.SetBodyDefinition
field 'outputs' on object 'Route[From[timer:{{routeId}}?period={{delay}}] -> [SetBody[exchangeProperty{CamelTimerCounter}], To[kamelet:sink]]]' of type 'org.apache.camel.model.RouteDefinition

@gsmet
Copy link
Member

gsmet commented May 18, 2021

I marked #17279 for backport. Now I have no idea if we will release another 1.13.

@gsmet
Copy link
Member

gsmet commented May 18, 2021

Closing as the original issue is fixed by #17279 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
2 participants