You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2024/01/16 09:10:42 UTC

[I] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   ### Bug description
   
   A recent change was committed to the Quarkus `main` branch in the jaxb extension that has started registering the full type hierarchy for JAXB annotated types for reflection:
   
   https://github.com/quarkusio/quarkus/commit/24b321e29b9b96f4731ec8bddc76a876c57c8dac
   
   This has led to native build failures due to `ClassNotFoundException` in integration test modules:
   
   * azure-grouped
   * cxf-grouped
   * http-grouped
   * soap
   * xmlsecurity


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   Yeah so the problem is with the getters. I'll try to come up with something more sophisticated...


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   Any chance you could give more details about why types are leaking? I suspect some class should be ignored somehow but it’s hard to know with the information provided in the issue. 


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   > Any chance you could give more details about why types are leaking? I suspect some class should be ignored somehow but it’s hard to know with the information provided in the issue.
   
   I've not really done much a deep dive into it all yet, but, various parts of the Camel core model have JAXB annotations. With `ReflectiveHierarchyBuildItem` now being used, I guess the scope of what's registered for reflection is widened somewhat.
   
   For example, I now see classes like `org.apache.camel.spi.Registry`and `org.apache.camel.TypeConverter`being registered for reflection. I don't think that should be necessary, because the Camel registry setup and type converter discovery is done at build time.
   
   I also see some third party classes being registered for reflection like `com.azure.storage.queue.QueueServiceClient` & `com.azure.storage.blob.BlobServiceClient`, which I also don't think is necessary.
   
   Taking the Azure tests as an example, here's what I see being registered for reflection from the processing of `ReflectiveHierarchyBuildItem`:
   
   https://gist.github.com/jamesnetherton/8d00791f61c610a89b30e67a79c4d23b
   
   On the flipside, maybe this change has uncovered some potential issues in CQ. E.g the failure in the azure-grouped test is:
   
   ```
   java.lang.ClassNotFoundException: io.micrometer.core.instrument.Tags
   ```
   
   Micrometer is an optional dependency of reactor-core (transitive of azure-core), so I'm surprised we've not run into this previously.
   
   What worries me a bit is that only a small fraction of the CQ itests have jaxb on the classpath. I wonder what other failures would be uncovered if all of the test modules had it as a dependency....


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   Confirmed as fixed in the recent nightly builds.


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   > @jamesnetherton could you try with: [quarkusio/quarkus#38217](https://github.com/quarkusio/quarkus/pull/38217) ?
   
   It seems to fix our soap integration test. The others I mentioned above still fail.
   
   Taking the Azure itest as an example again. There's the output:
   
   ```
   [WARNING] [io.quarkus.deployment.steps.ReflectiveHierarchyStep] Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
   	- com.azure.core.amqp.AmqpRetryOptions (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.AmqpTransportType (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.ProxyOptions (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.implementation.AmqpChannelProcessor (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.implementation.AmqpReceiveLink (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.implementation.ConnectionOptions (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.implementation.ErrorContextProvider (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.implementation.MessageSerializer (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.core.amqp.models.AmqpAnnotatedMessage (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.storage.blob.changefeed.BlobChangefeedClient (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.storage.blob.changefeed.models.BlobChangefeedEvent (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- com.azure.storage.common.StorageSharedKeyCredential (sources: JaxbProcessor > org.apache.camel.model.FromDefinition, JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- javax.crypto.spec.SecretKeySpec (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- javax.management.MBeanServer (source: JaxbProcessor > org.apache.camel.model.RoutesDefinition)
   	- javax.naming.Context (source: JaxbProcessor > org.apache.camel.model.RouteDefinition)
   	- javax.net.ssl.KeyManager (source: JaxbProcessor > org.apache.camel.model.cloud.ServiceCallServiceDiscoveryConfiguration)
   	- javax.net.ssl.SNIServerName (source: JaxbProcessor > org.apache.camel.model.cloud.ServiceCallServiceDiscoveryConfiguration)
   	- javax.net.ssl.TrustManager (source: JaxbProcessor > org.apache.camel.model.cloud.ServiceCallServiceDiscoveryConfiguration)
   	- javax.xml.xpath.XPathFactory (sources: JaxbProcessor > org.apache.camel.model.RoutesDefinition, JaxbProcessor > org.apache.camel.model.language.ExpressionDefinition)
   	- org.apache.camel.tooling.model.MainModel (source: JaxbProcessor > org.apache.camel.model.RoutesDefinition)
   	- org.apache.qpid.proton.engine.SslDomain$VerifyMode (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- org.apache.qpid.proton.message.Message (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- org.w3c.dom.Element (source: JaxbProcessor > org.apache.camel.model.app.BeansDefinition)
   	- reactor.core.CoreSubscriber (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.core.Disposable (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.core.publisher.Flux (sources: JaxbProcessor > org.apache.camel.model.FromDefinition, JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.core.publisher.FluxProcessor (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.core.publisher.Mono (sources: JaxbProcessor > org.apache.camel.model.FromDefinition, JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.core.publisher.Sinks$One (source: JaxbProcessor > org.apache.camel.model.FromDefinition)
   	- reactor.core.scheduler.Scheduler (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- reactor.util.context.Context (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   ```
   
   


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton closed issue #5650: [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath
URL: https://github.com/apache/camel-quarkus/issues/5650


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   A *lot* of the Camel core (and various other third party stuff) now gets registered for reflection with this change. Taking the azure-grouped test as an example:
   
   Before:
   
   ```
   7,979 types, 3,981 fields, and 18,055 methods registered for reflection
   ```
   
   After:
   
   ```
   10,684 types, 9,888 fields, and 34,668 methods registered for reflection
   ```
   


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   So a ton of things are leaking from `ToDynamicDefinition`. Let me have a look.


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   Not sure if the Quarkus JAXB fix is flawed, or whether it has uncovered some issues on our side. It need to be investigated.


-- 
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] [quarkus-main] Native build may fail with ClassNotFoundException when quarkus-jaxb is on the classpath [camel-quarkus]

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

   @jamesnetherton could you try with: https://github.com/quarkusio/quarkus/pull/38217 ?
   
   The important information is this output you can see in the log:
   
   ```
   2024-01-16 02:55:51,275 WARN  [io.qua.dep.ste.ReflectiveHierarchyStep] (build-29) Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
   	- com.sun.istack.FinalArrayList (sources: JaxbProcessor > jakarta.xml.ws.wsaddressing.W3CEndpointReference, JaxbProcessor > org.apache.camel.model.FromDefinition)
   	- com.sun.istack.Pool (source: JaxbProcessor > jakarta.xml.ws.wsaddressing.W3CEndpointReference)
   	- com.sun.xml.fastinfoset.stax.StAXDocumentSerializer (source: JaxbProcessor > org.apache.camel.model.FromDefinition)
   	- io.netty.buffer.ByteBuf (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.netty.buffer.ByteBufAllocator (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.netty.buffer.CompositeByteBuf (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.quarkus.vertx.http.runtime.VertxInputStream (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.vertx.core.http.HttpServerRequest (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.vertx.core.http.HttpServerResponse (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- io.vertx.ext.web.RoutingContext (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.jws.WebService (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.AsyncContext (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.DispatcherType (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.ServletConnection (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.ServletContext (sources: JaxbProcessor > org.apache.camel.model.FromDefinition, JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.ServletInputStream (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.ServletOutputStream (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.http.Cookie (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.http.HttpServletRequest (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.http.HttpServletResponse (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.http.HttpSession (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.servlet.http.Part (source: JaxbProcessor > org.apache.camel.model.ToDynamicDefinition)
   	- jakarta.validation.Validator (source: JaxbProcessor > org.apache.camel.model.FromDefinition)
   	- jakarta.xml.bind.Binder (source: JaxbProcessor > jakarta.xml.ws.wsaddressing.W3CEndpointReference)
   	- jakarta.xml.bind.JAXBContext (sources: JaxbProcessor > jakarta.xml.ws.wsaddressing.W3CEndpointReference, JaxbProcessor > org.apache.camel.model.FromDefinition)
   ```
   
   


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