0 Replies Latest reply on Aug 30, 2010 6:42 PM by cloudstrife

    Logger exception when using symlinked exploded WAR

    cloudstrife

      Hi,

       

      I'm using release 5.1.0 and I'm having this problem where I'm trying to use an exploded inplace war for web development. But when I do this I get an exception during deployment (but NOT with a hard war file.)

       

      {quote}

      ERROR [[/portal]] Servlet /portal threw load() exception
      org.apache.commons.logging.LogConfigurationException: User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable.
          at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:874)
          at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604)
          at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336)
          at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:704)
          at org.springframework.web.servlet.DispatcherServlet.<clinit>(DispatcherServlet.java:254)

      {quote}

       

      I'm using maven to create the exploded war:

      mvn -Dmaven.test.skip=true  war:inplace

       

      Another interesting thing is: the inplace war was working UNTIL I added the commons-validator dependency:

      {noformat}

      <dependency>
                      <groupId>commons-validator</groupId>
                      <artifactId>commons-validator</artifactId>
                      <version>1.3.0</version>
      </dependency>

      {noformat}

       

      My project has many dependencies on both commons-logging 1.1.1 and log4j 1.2.14, however, I do not get this error without this dependency. Actually, it appears I also have a dependency on log4j 1.2.15 somewhere, but only 1.2.14 jar is put in my war.

       

      So it must be some sort of classpath problem. Any idea what?