0

I'm developing a GWT web app. As well as GWT, I'm using a .jar that also uses logj4, which I will call "bob". If I don't add the log4j jar into my war/WEB-INF/lib folder, I get the error described here: java.lang.NoClassDefFoundError: org/apache/log4j/LogManager.

If I do put the .jar in the lib folder, I get another java.lang.NoClassDefFoundError, this time for org/apache/log4j/Appender. The error comes from within "bob", my other library. Bob.jar is on the classpath of the project, as well as in war/WEB-INF/lib.

Is there an obvious fix to this?

Community
  • 1
  • 1
ToxicTeacakes
  • 1,124
  • 1
  • 10
  • 19
  • Is "bob" used at client side too or only server side? If only server side, try putting it **only** in `WEB-INF/lib` (and specifically *not* on the classpath for GWT DevMode). Also, which version of GWT are you using? – Thomas Broyer Jan 25 '16 at 10:09
  • Like in http://stackoverflow.com/questions/26338387/unexpected-exception-java-lang-noclassdeffounderror-org-apache-log4j-logmanage does it help if you put BOTH log4j12 and log4j2 jars in WEB-INF/lib? – Rade_303 Jan 25 '16 at 11:39

0 Answers0