Reputation: 400
My Problem:
Hibernate-5.0.12-Final uses Jboss-Logging-3.3.1.Final
but wildfly8 supplies jboss-logging-3.1.4.GA
. Using 3.1.4.GA
with Hibernate5
leads to a NoSuchMethodException
.
I'm deploying a war
including Hibernate-5.0.12-Final
AND Jboss-Logging-3.3.1.Final
into a wildfly8 AS.
I tried the following:
By adding the add-logging-api-dependencies
in the standalone.xml
<add-logging-api-dependencies value="false"/>
<use-deployment-logging-config value="false"/>
Excluding the logging subsystem or just the org.jboss.logging
dependency in the jboss-deployment-structure.xml
which I placed in the WEB-INF
of the .war-file that is deployed into the wildfly AS.
<jboss-deployment-structure>
<deployment>
<exclusions>
<module name="org.jboss.logging" />
</exclusions>
</deployment>
</jboss-deployment-structure>
or
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="logging" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
Both did NOT work. It worked as there was no more logging from my application, BUT the provided Jboss-Logging-3.3.1.Final
wasnt not used.
So I ended up to updating the jar
of jboss-logging in the wildfly-modules folder (modules/system/layers/base/org/jboss/logging/
). This worked, but I think there must be a nicer solution, as exchanging/replacing the jar
can break dependencies of other modules that require jboss-logging in a certain version (3.1.4.GA).
TLDR; I just want to tell my wildfly8 that it should use the jboss-logging jar (provided by me, in the war file) instead of the jboss-logging.jar provided by the wildfly AS.
Upvotes: 2
Views: 386