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

Kamelet with bean definitions results in bytecode serialization issues at build time #6581

Closed
jamesnetherton opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
area/kamelet bug Something isn't working
Milestone

Comments

@jamesnetherton
Copy link
Contributor

Bug description

E.g if you have something like:

beans:
  - name: greetingString
    type: "#class:java.lang.String"
    constructors:
      0: "Hello World"

Then you get:

Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: Unable to serialize objects of type class org.apache.camel.impl.engine.DefaultResourceResolvers$ClasspathResolver$1 to bytecode as it has no default constructor
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$44.createValue(BytecodeRecorderImpl.java:1500)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredArrayStoreParameter$1.write(BytecodeRecorderImpl.java:2028)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$FixedMethodContext.writeInstruction(BytecodeRecorderImpl.java:2147)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$SplitMethodContext.writeInstruction(BytecodeRecorderImpl.java:2104)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredArrayStoreParameter.doPrepare(BytecodeRecorderImpl.java:2025)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$45.doPrepare(BytecodeRecorderImpl.java:1520)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$41.prepare(BytecodeRecorderImpl.java:1393)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$45.doPrepare(BytecodeRecorderImpl.java:1523)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$36.prepare(BytecodeRecorderImpl.java:1084)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$45.doPrepare(BytecodeRecorderImpl.java:1523)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$41.prepare(BytecodeRecorderImpl.java:1393)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$45.doPrepare(BytecodeRecorderImpl.java:1523)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$36.prepare(BytecodeRecorderImpl.java:1084)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$45.doPrepare(BytecodeRecorderImpl.java:1523)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl$DeferredParameter.prepare(BytecodeRecorderImpl.java:1978)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:516)
    at io.quarkus.deployment.steps.MainClassBuildStep.writeRecordedBytecode(MainClassBuildStep.java:511)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:211)
    at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
    at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
    at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
    at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
    at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
    at java.base/java.lang.Thread.run(Thread.java:1583)
    at org.jboss.threads.JBossThread.run(JBossThread.java:483)

@jamesnetherton jamesnetherton added the bug Something isn't working label Oct 3, 2024
@jamesnetherton jamesnetherton added this to the 3.16.0 milestone Oct 3, 2024
@jamesnetherton jamesnetherton self-assigned this Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 3, 2024
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Oct 4, 2024
JiriOndrusek pushed a commit to JiriOndrusek/camel-quarkus that referenced this issue Oct 4, 2024
JiriOndrusek pushed a commit to jboss-fuse/camel-quarkus that referenced this issue Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kamelet bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant