This is a classic, but really has nothing to do with Maven.

The root cause is that commons-logging and log4j are in different class loaders. The best way to track down what is going on is to install commons-logging 1.1 (if you are not already using that version) and to turn on diagnostics [1]. Commons-logging might be installed in the container and/or your webapp, so make sure you install 1.1 everywhere.

[1] http://commons.apache.org/logging/troubleshooting.html

Farrukh Najmi wrote:
Hello,

I am using cargo-maven2-plugin for deploying my webapp into my webcontainer. I have no problems using tomcat5x profile but when I use the jetty6x profile with:

                           <container>
                               <containerId>jetty6x</containerId>
                               <type>embedded</type>
                           </container>

I get the following exception...

Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@13ce64f6 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
       ... 28 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
       at java.lang.Class.getConstructor0(Class.java:2671)
       at java.lang.Class.getConstructor(Class.java:1629)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
       ... 29 more


Having scanned the web I find the following thread that looks similar and indicates some sort of classloader issue:

<http://www.nabble.com/Issue-stopping-Resin-3.0.23-with-Cargo-t3270890.html>

However, I cannot figure out what I need to do to fix the problem.

Thanks for any help on this show stopper issue as I would really like to use jetty6 for deployment.



--
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to