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 2021/07/30 13:55:51 UTC

[GitHub] [camel-quarkus] gnieser opened a new issue #2965: Automatically register for reflection: org.apache.camel.converter.jaxb.mapper.SunJaxb21NamespacePrefixMapper

gnieser opened a new issue #2965:
URL: https://github.com/apache/camel-quarkus/issues/2965


   Hello,
   
   When using namespace prefixes with JAXB the following error occurs with natively compiled application:
   ```
   ERROR [io.qua.run.Application] (main) [] () Failed to start application (with profile prod): java.lang.IllegalStateException: Cannot load CamelNamespacePrefixMapper class
       at org.apache.camel.converter.jaxb.NamespacePrefixMapperFactory.newNamespacePrefixMapper(NamespacePrefixMapperFactory.java:43)
       at org.apache.camel.converter.jaxb.JaxbDataFormat.doStart(JaxbDataFormat.java:525)
       at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
       at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113)
       at org.apache.camel.impl.engine.AbstractCamelContext.internalAddService(AbstractCamelContext.java:1462)
       at org.apache.camel.impl.engine.AbstractCamelContext.addService(AbstractCamelContext.java:1383)
       at org.apache.camel.support.processor.MarshalProcessor.doStart(MarshalProcessor.java:122)
   ```
   
   Workaround:
   Manually register the class SunJaxb21NamespacePrefixMapper for reflection (eg. on the RouteBuilder)
   ```
   @ApplicationScoped
   @RegisterForReflection(targets = {org.apache.camel.converter.jaxb.mapper.SunJaxb21NamespacePrefixMapper.class})
   public class MyRouteBuilder extends RouteBuilder {
   ```
   
   Version:
   Quarkus 2.1.0.Final
   
   Zulip topic:
   https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/When.20native.3A.20Cannot.20load.20CamelNamespacePrefixMapper
   
   Many Thanks!
   Kind regards.


-- 
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] ppalaga closed issue #2965: Automatically register for reflection: org.apache.camel.converter.jaxb.mapper.SunJaxb21NamespacePrefixMapper

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


   


-- 
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] zhfeng commented on issue #2965: Automatically register for reflection: org.apache.camel.converter.jaxb.mapper.SunJaxb21NamespacePrefixMapper

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


   I also raise https://issues.apache.org/jira/browse/CAMEL-16891 to see if we can avoid the reflection of ```SunJaxb21NamespacePrefixMapper``` 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