You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/13 14:30:08 UTC

[GitHub] [camel-quarkus] gus-maurizio opened a new issue #1474: Running a Camel-main batch application

gus-maurizio opened a new issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474


   Hi. I have been trying to run a simple camel-main (new in CR3) application in java and kotlin. No luck.
   Any examples or pointers highly appreciated (in java or kotlin, both better hehehe).
   
   `
   Exception in thread "main" java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @7068f7ca wants to load class io.quarkus.bootstrap.model.AppModel. A different class with the same name was previously loaded by 'app'. (io.quarkus.bootstrap.model.AppModel is in unnamed module of loader 'app')
   	at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:130)
   	at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:56)
   Caused by: java.lang.LinkageError: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @7068f7ca wants to load class io.quarkus.bootstrap.model.AppModel. A different class with the same name was previously loaded by 'app'. (io.quarkus.bootstrap.model.AppModel is in unnamed module of loader 'app')
   `


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

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



[GitHub] [camel-quarkus] lburgazzoli commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657645744


   camel-quarkus 1.0.0-CR3 is based on quarkus 1.6.0.Final so I think the only think you need to do is changing the quarkus versionsin the pom


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

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



[GitHub] [camel-quarkus] gus-maurizio commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657708725


   Aha!!! wonderful, might be good to [add that in the documentation](https://camel.apache.org/camel-quarkus/latest/user-guide/cdi.html). 
   your next Chianti is on me!


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

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



[GitHub] [camel-quarkus] lburgazzoli edited a comment on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657701957


   you need camel-quarkus-bean extension, forgo to tell you that before


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

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



[GitHub] [camel-quarkus] lburgazzoli edited a comment on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli edited a comment on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657645744


   camel-quarkus 1.0.0-CR3 is based on quarkus 1.6.0.Final so I think the only think you need to do is changing the quarkus versions the pom


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

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



[GitHub] [camel-quarkus] gus-maurizio commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657607765


   Ciao Luca. It is basically that example (with a few embellishments). Added the camel-main, camel-log, camel-timer to the pom.xml and it compiles ok. The problems are trying to do mvn clean quarkus:dev (I get the messages above) and java -jar ....-runner.jar when I get the messages below:
   
   `
   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/camel/quarkus/core/CamelConfig$$accessor
   	at io.quarkus.runtime.generated.Config.<clinit>(Config.zig:590)
   	at io.quarkus.runner.ApplicationImpl.<clinit>(ApplicationImpl.zig:45)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
   	at java.base/java.lang.Class.newInstance(Class.java:584)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:60)
   	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
   	at com.example.Main.main(Main.java:11)
   Caused by: java.lang.ClassNotFoundException: org.apache.camel.quarkus.core.CamelConfig$$accessor
   	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
   	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
   	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
   	... 10 more
   `
   
   The main class is simple:
   `
   package com.example;
   
   import io.quarkus.runtime.Quarkus;
   import io.quarkus.runtime.annotations.QuarkusMain;
   import org.apache.camel.quarkus.main.CamelMainApplication;
   
   @QuarkusMain
   public class Main {
       public static void main(String... args) {
           Quarkus.run(CamelMainApplication.class, args);
       }
   }
   `


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

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



[GitHub] [camel-quarkus] gus-maurizio closed issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio closed issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474


   


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

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



[GitHub] [camel-quarkus] gus-maurizio closed issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio closed issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474


   


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

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



[GitHub] [camel-quarkus] lburgazzoli commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657610595


   do you mind sharing the entire project ? just to be sure I'm testing the same thing


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

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



[GitHub] [camel-quarkus] lburgazzoli commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657701957


   you need camel-quarku-bean extension, forget to tell you that before


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

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



[GitHub] [camel-quarkus] lburgazzoli commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
lburgazzoli commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657604135


   can you share an example ? 
   we have [this](https://github.com/apache/camel-quarkus/tree/master/examples/timer-log-main) small example but may not be what you were looking for


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

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



[GitHub] [camel-quarkus] gus-maurizio commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657701035


   Just one more question.It seems like the bean used in some examples (pasted here below) is compiling fine but cannot be found. Has something changed in CR3 regarding CDI and injections?
   
   `
   package com.example;
   
   import javax.enterprise.context.ApplicationScoped;
   import javax.inject.Named;
   import io.quarkus.runtime.annotations.RegisterForReflection;
   
   @ApplicationScoped
   @Named("myNamedBean")
   @RegisterForReflection
   public class NamedBean {
       public String hello(String name) {
           return "Hello " + name + " from the NamedBean";
       }
   }
   `


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

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



[GitHub] [camel-quarkus] gus-maurizio commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657628297


   Sure! 
   https://github.com/gus-maurizio/data/tree/master/example-main


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

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



[GitHub] [camel-quarkus] gus-maurizio commented on issue #1474: Running a Camel-main batch application

Posted by GitBox <gi...@apache.org>.
gus-maurizio commented on issue #1474:
URL: https://github.com/apache/camel-quarkus/issues/1474#issuecomment-657687146


   That did it. Thanks!


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

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