Bug 1213749
| Summary: | Camel throwing java.lang.LinkageError for Remote Query when running in EAP | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Data Grid 6 | Reporter: | Martin Gencur <mgencur> | ||||
| Component: | Camel-JBossDataGrid | Assignee: | Adrian Nistor <anistor> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Martin Gencur <mgencur> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.5.0 | CC: | anistor, dmehra, jdg-bugs, pzapataf, rmarwaha, slaskawi, ttarrant | ||||
| Target Milestone: | ER4 | ||||||
| Target Release: | 6.5.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: |
When Remote Query feature is used through camel-jbossdatagrid component in EAP, and JDG modules for EAP are installed, the application throws java.lang.LinkageError and the Remote Query feature does not work properly. The workaround is to include all dependencies in the deployment (instead of EAP modules). The required dependencies are: camel-jbossdatagrid.jar,
camel-core.jar, infinispan-commons.jar, infinispan-core.jar, jboss-marshalling.jar, jboss-marshalling-river.jar, jgroups.jar
jboss-logging.jar, jboss-transaction-api_1.1_spec.jar, infinispan-client-hotrod.jar, commons-pool.jar, infinispan-query-dsl.jar, infinispan-remote-query-client.jar, protostream.jar.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-06-23 12:24:42 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created attachment 1016741 [details]
full-stacktrace
You probably need also:
<module name="org.infinispan.query.dsl" slot="${datagrid.slot}" />
Maybe, but it does not help in this case. I tried that. The camel-jbossdatagrid component requires both infinispan-embedded and infinispan-remote on classpath and when I package these libraries in the war file, the deployment into EAP fails due to https://bugzilla.redhat.com/show_bug.cgi?id=1175272. I'm not able to run the tests, logically. The workaround would be to use individual jar files (the old way), and not uber-jars. Yay! I was able to run all tests for camel-jbossdatagrid in EAP 6.4, including remote query and custom even listeners. The following set of dependencies has to be used instead of uber-jars (so it's a workaround): camel-jbossdatagrid.jar camel-core.jar infinispan-commons.jar infinispan-core.jar jboss-marshalling.jar jboss-marshalling-river.jar jgroups.jar jboss-logging.jar jboss-transaction-api_1.1_spec.jar infinispan-client-hotrod.jar commons-pool.jar infinispan-query-dsl.jar infinispan-remote-query-client.jar protostream.jar Would you mind opening a PR if you already have the changes ready and tested? What PR? This still needs to be fixed as the preferred way is to use uber-jars. What I described is basically a workaround. I have the modified tests in my local branch but don't want to push them to github. |
I'm running InfinispanRemoteQueryProducerIT inside EAP and root cause looks like this (full stacktrace attached: Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name "org/infinispan/query/dsl/QueryFactory" at org.apache.camel.component.infinispan.InfinispanRemoteQueryProducerIT$5$1.build(InfinispanRemoteQueryProducerIT.java:212) [camel-jbossdatagrid-tests.jar:6.5.0.ER2-redhat-1] at org.apache.camel.component.infinispan.InfinispanOperation$Operation.getQuery(InfinispanOperation.java:114) [camel-jbossdatagrid.jar:6.5.0.ER2-redhat-1] at org.apache.camel.component.infinispan.InfinispanOperation$Operation$5.execute(InfinispanOperation.java:84) [camel-jbossdatagrid.jar:6.5.0.ER2-redhat-1] at org.apache.camel.component.infinispan.InfinispanOperation.process(InfinispanOperation.java:39) [camel-jbossdatagrid.jar:6.5.0.ER2-redhat-1] at org.apache.camel.component.infinispan.InfinispanProducer.process(InfinispanProducer.java:42) [camel-jbossdatagrid.jar:6.5.0.ER2-redhat-1] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core.jar:2.12.0.redhat-610379] ... 124 more I'm using jboss-deployment-structure.xml: <jboss-deployment-structure> <deployment> <dependencies> <module name="org.infinispan" slot="${datagrid.slot}" /> <module name="org.jgroups" slot="${datagrid.slot}" /> <module name="org.infinispan.client.hotrod" slot="${datagrid.slot}" /> <module name="org.infinispan.protostream" slot="${datagrid.slot}" /> <module name="org.infinispan.query.remote.client" slot="${datagrid.slot}" /> <module name="org.infinispan.protostream.sample-domain-definition" slot="${datagrid.slot}" /> <module name="org.infinispan.protostream.sample-domain-implementation" slot="${datagrid.slot}" /> </dependencies> </deployment> </jboss-deployment-structure> and libraries such as camel-core, camel-jbossdatagrid are deployed inside the application.