You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "JiriOndrusek (via GitHub)" <gi...@apache.org> on 2023/08/28 13:45:21 UTC

[GitHub] [camel-quarkus] JiriOndrusek opened a new issue, #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel

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

   ### Bug description
   
   Fix of https://issues.apache.org/jira/browse/CAMEL-19771 brought a reference to a resource into RouteDefinition instance.
   
   Problem is caused by several aspects together:
   
   1. Resource instance is loaded in Processor class (see https://github.com/apache/camel-quarkus/blob/main/extensions/kamelet/deployment/src/main/java/org/apache/camel/quarkus/component/kamelet/deployment/KameletProcessor.java#L81) and is represented by anonymous class (so no constructor is available)
   2. RouteDefinition contains Resource
   3. RouteDefinition is send to Recorder class (to customize Camel context)
   4. Quarkus internally serializes all parameters going from Processor to a Recorder
   5. Serialization fails on
   
   ```
   [error]: 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
   ```
   
   I introduced a small workaround and I removed resources from the RouteDefinition -> this only helps the CI to pass the issue -> proper solution has to be found.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

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


Re: [I] [camel-main] Kamelets require fix because of the ResourceSupport change in Camel [camel-quarkus]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek closed issue #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel
URL: https://github.com/apache/camel-quarkus/issues/5230


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-quarkus] JiriOndrusek commented on issue #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1728930582

   Hi @jamesnetherton , nice solution!
   TBH I tried to avoid serializing all of the resource as bytes. I was worried about the amount of data.
   I hope that users does not uses sever MBs of data, which could affect the size of the jar...
   Will you cherry-pick your solution to camel-nain or should I do it?
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


Re: [I] [camel-main] Kamelets require fix because of the ResourceSupport change in Camel [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1750162120

   Reopening because we should try to find a better solution for this. Ideally in Camel.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


Re: [I] [camel-main] Kamelets require fix because of the ResourceSupport change in Camel [camel-quarkus]

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1744754504

   Fixed in `camel-main`. Thanks @jamesnetherton !


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-quarkus] JiriOndrusek commented on issue #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1722899544

   Better solution prepared in the last 2 commits of https://github.com/JiriOndrusek/camel-quarkus/commits/cq5232-kamelet-serialize-resources
     - default resource are re-created in the runtime, custom resources are skipped (if they are not serializable)


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-quarkus] jamesnetherton commented on issue #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1727915179

   @JiriOndrusek I hacked up an alternate solution that can avoid resolving the Kamelet resources again at runtime:
   
   https://github.com/jamesnetherton/camel-quarkus/commit/22ce18064f4269af3ccbc826aab289bf756ac186 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-quarkus] JiriOndrusek commented on issue #5230: [camel-main] Kamelets require fix because of the ResourceSupport change in Camel

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on issue #5230:
URL: https://github.com/apache/camel-quarkus/issues/5230#issuecomment-1695730673

   Workaround is implemented in KameletProcessor


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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