[
https://issues.apache.org/jira/browse/CAMEL-22696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039151#comment-18039151
]
Cameron Fitzwater commented on CAMEL-22696:
-------------------------------------------
It isn't the export itself that fails with this error, it is when you build and
run it via a container from the export. Re-opening.
I don't understand why it is erroring for requiring this dependency as just
that basic `camel init main.yaml` was used, nothing else.
If it makes any difference (don't think it will, I use jib) – here are some
commands to make this quicker for you to re-test:
{code:java}
export QUARKUS_CONTAINER_IMAGE_GROUP=group
export QUARKUS_CONTAINER_IMAGE_NAME=abcd
export QUARKUS_CONTAINER_IMAGE_REGISTRY=ghcr.io
export QUARKUS_CONTAINER_IMAGE_TAG=1.0.0
./mvnw quarkus:add-extension -Dextensions="quarkus-container-image-jib"
./mvnw clean package \ -Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=false \ -DskipTests=true
docker run -p 8080:8080 \
-e JAVA_OPTS="-Dquarkus.log.level=INFO" \
--rm -it \
ghcr.io/group/abcd:1.0.0 -profile dev
{code}
> 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)