Endi S. Dewata wrote:
Hi Alex,
As an immediate fix, you can just replace JBoss' copy of log4j with
NLOG4J. This should fix the problem as far as you are concerned.
Another perhaps better solution, is to replace nlog4j.jar which ships
with ApacheDS with slf4j-log4j12.jar without replacing any jar files
in JBoss. FYI, slf4j-log4j12.jar ships with the SLF4J distribution.
Note that we allow this to happen by making the scope of the slf4j API
provided. Meaning you decide which version to deploy. Take a look Endi
at the poms you will see the scope tag set on these dependencies.
I'm actually using the jar file created by running mvn assembly:assembly in
the server-main module and it automatically includes the nlog4j library. I
noticed that the pom.xml for server-main module doesn't specify the scope,
perhaps this needs to be fixed? Or maybe I shouldn't be using this jar file?
Oh yeah don't use that you're asking for serious issues if you did. Now
it makes sense to me why you've been having this problem. You need to
depend on the jars that the main depends on rather than this uber
nightmare jar. It's really for people to run apacheds standalone
without fancy installers and such.
I guess that this should be added to ApacheDS documentation in order
to avoid similar inconveniences to other JBoss+ApacheDS users. Maybe
that is already the case?
No we have not done this but we should. Sorry for the inconvenience to
both you Ceki and you Endi. We now though know how to work around this
problem.
No problem at all. I followed Ceki's advice to replace JBoss' log4j with
nlog4j and it seems to be working now. Thanks everyone!
That's great Endi but make sure you get off that uber jar. It will
create other problems for you in the future.
Alex