[
https://issues.apache.org/jira/browse/CAMEL-22696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039303#comment-18039303
]
Claus Ibsen commented on CAMEL-22696:
-------------------------------------
Okay I can reproduce this too, but its a camel-quarkus situation.
It seems that CEQ attempts to inject a noop modeline if the JAR is not on
classpath at
[https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelContextRecorder.java#L125]
But that seems to be pre-built so when you switch profile at runtime via
`-profile dev` then CEQ has not done that, as it seems to be a feature only
when dev mode is enabled during build-step
in
[https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/devmode/CamelDevModeProcessor.java#L41]
> camel-jbang: export for quarkus runtime causes camel-dsl-modeline error
> -----------------------------------------------------------------------
>
> Key: CAMEL-22696
> URL: https://issues.apache.org/jira/browse/CAMEL-22696
> Project: Camel
> Issue Type: Bug
> Reporter: Cameron Fitzwater
> Priority: Major
>
> When performing a camel export with --runtime=quarkus on a basic shell (e.g.
> using camel init), when running the container:
> {code:java}
> camel init main.yaml
> camel export * --dir=../export --clean-dir --build-tool=maven
> --runtime=quarkus --gav=com.mnpower.integrations:ABCD:1.0.0{code}
> ... it is failing with:
> {code:java}
> 2025-11-17 21:05:03,328 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main)
> Failed to start application: java.lang.IllegalArgumentException: Cannot find
> ModelineFactory on classpath. Add camel-dsl-modeline to classpath.
> at
> org.apache.camel.impl.engine.SimpleCamelContext.createModelineFactory(SimpleCamelContext.java:268)
> at
> org.apache.camel.impl.engine.DefaultCamelContextExtension.lazyInitAndAdd(DefaultCamelContextExtension.java:1132)
> at
> org.apache.camel.impl.engine.DefaultCamelContextExtension.lambda$lazyAddContextPlugin$0(DefaultCamelContextExtension.java:1128)
> at
> org.apache.camel.impl.engine.DefaultContextPluginManager.getContextPlugin(DefaultContextPluginManager.java:43)
> at
> org.apache.camel.impl.engine.DefaultCamelContextExtension.getContextPlugin(DefaultCamelContextExtension.java:1108){code}
> Running with camel run / quarkus runtime does work, no errors for the
> dependency:
> {code:java}
> camel run * --fresh --runtime=quarkus{code}
> The behavior recently changed, as I didn't previously need to manually
> include the camel-dsl-modeline dependency.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)