-
1. Re: Problems with server jar dependencies vs EAR dependencies
mortytenenbaum Jun 25, 2015 1:31 PM (in response to thomasnakken)1 of 1 people found this helpfulWildfly bundled module which load by default can be excluded with a jboss-deployment-structure file.
i.e.. my.ear\META-INF\jboss-deployment-structure.xml
This specifies exclusions for the ear.
e.g.
...
<exclusions>
<module name="org.apache.log4j" />
</exclusions>
If this conflicts with a .war as well then you add a sub-deployment exclusion as well.
-
2. Re: Problems with server jar dependencies vs EAR dependencies
thomasnakken Jun 26, 2015 5:08 AM (in response to mortytenenbaum)Hi
Tried that, but it looks like it's not picked up by the server. My file in the EAR looks like:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.joda.time"/>
</exclusions>
</deployment>
</jboss-deployment-structure>Does this looks ok?
-
3. Re: Problems with server jar dependencies vs EAR dependencies
mortytenenbaum Jun 26, 2015 7:25 AM (in response to thomasnakken)Do you see anything in the log as it's coming up that it recognizes the jboss-deployment-structure file at all?
I know the example which I followed to do this on JBoss7.1.1 had a second line of
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
which I had to modify to 1.1 to get it to work. So you may need this line or a variation on the version number at the end of the line to match yours.
Then there's the sub-deployment part which you'll need if you have a war which I mentioned.
But first try and get the file to be recognized.
-
4. Re: Problems with server jar dependencies vs EAR dependencies
pmm Jun 28, 2015 2:29 AM (in response to thomasnakken)Thomas Nakken wrote:
Hi
We have a application which dependes on jodatime 2.3. It looks like Wildly 8.2 loads jodatime 1.6 into the system classpath (by modules).
No, only the modules.jar is in the system classpath. What you mean is the class loader.
Thomas Nakken wrote:
Today we pack jodatime 2.3 into the EAR but jodatime 1.6 is loaded first by wildfly and then used.
Can you find out which module that is? This should not happen at all.