-
1. Re: Issue with incompatible versions of org.jboss.logging.Logger
kpiwko Jan 23, 2014 10:01 AM (in response to vjuranek)Hi Vojta,
if I understand the problem correctly, it raised from the fact that Infinispan depends on one jboss-logging version and Arquillian JBoss AS5/EAP5 adaptor depends on other one. While writing tests, there is a collision in between those two versions. Given that OSGI nor modular classloader is not supported by Arquillian, I see two ways how to try to overcome the problem:
1/ Add jboss-logging dependency of Infinispan to servers classpath and configure deployed archive to pick it from there: https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html/Microcontainer_User_Guide/sect-JBoss_Microcontainer_User_Guide-The_ClassLoading_Layer-ClassLoading.html . Also, I've found following documentation trying to fix very similar problem for JMS - Bridge JMS messages from AS 5 to AS 7
2/ Create a Arquillian EAP5 container with shaded jboss-logging
3/ Create a Infinispan distribution with shaded jboss-logging
Let me know whether any of these steps would help you.
Thanks,
Karel -
2. Re: Issue with incompatible versions of org.jboss.logging.Logger
vjuranek Jan 23, 2014 3:21 PM (in response to kpiwko)Hi Karel,
thanks for your reply.
1/ This would be the most easy way, unfortunately this is exactly not the case I need. The test scenario is to deploy ISPN server on EAP5 (this works fine), then create remote client and run some queries from client to server - here I hit the problem. Possible solution would be to run deployment to server and tests in separate threads, each with different classloader, but don't know how to achieve it (not sure if you meant by "modular classloader" exactly this, but I guess Arquillian doesn't support it anyway - maybe I'm wrong, I'm quite new to Arquillian).
2/ This is probably doable, only not sure how much effort is needed (JBoss client depends (directly or indirectly) on many JBoss components, so this may result into non-trivial effort)
3/ This is probably not an option, as we have to test bits as they are delivered to customers and I cannot do any custom changes there.
It also came to my mind
4/ inspires by ISPN Arquillian container which injects some ISPN resources into our tests, I could maybe create very simple adopter, which would create custom classloader at the beginning and later on inject this classloader into thread running the tests (just an idea, not sure if it can actually work).
So I'll investigate 2/ and 4/ and if I find some solution, I'll share it here.
Thanks again for your hints!
Vojta
-
3. Re: Issue with incompatible versions of org.jboss.logging.Logger
vjuranek Jan 24, 2014 9:37 AM (in response to vjuranek)Hi,
after some investigation, I found out that rewriting jboss-logging module is not so big problem, so I've chosen option 2/ and it works fine now (however, if I have some spare time, I'd like to take a look on it more carefully how to solve it in Arquillian core, as I'm obviously not the only one having such problems, see e.g. Separate client and server/container dependency and also fixing compatibility issues can be much harder next time).
Thanks again
Vojta
-
4. Re: Issue with incompatible versions of org.jboss.logging.Logger
kpiwko Jan 27, 2014 4:41 AM (in response to vjuranek)Hi Vojta,
for Arquillian 2.0, there is a plan to use modular classloader, so this issues should go away. aslak.aslak.conduct.no might shed more light on it.
Karel