TitleJSPWiki does not work with Jetty 5.1.7
Date26-Jan-2006 17:56:37 EET
Version2.2.33
Submitter194.246.122.10
Bug criticalityBadBug
Browser versionFirefox
Bug statusClosedBug
PageProvider used
Servlet Containerjetty-5.1.7 to jetty-5.1.10
Operating SystemSolaris/HP-UX
URL
Java version1.4.2

After upgrading from Jetty 5.1.6 to 5.1.7 JSPWiki fails to start. Other webapps using Log4j work furthermore.


16:29:00.160 INFO   [main] org.mortbay.util.Container.start(Container.java:74) >15> Started org.mortbay.jetty.servlet.WebApplicationHandler
@11a75a2
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:476)
        at org.mortbay.start.Main.main(Main.java:94)
Caused by: java.lang.ExceptionInInitializerError
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:199)
        at org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:240)
        at org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:446)
        at org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:321)
        at org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:509)
        at org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.http.HttpServer.doStart(HttpServer.java:708)
        at org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.jetty.Server.main(Server.java:460)
        ... 7 more
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@3bc473 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log
4j/Category) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@3bc473 for org
.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Category))
        at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
        at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at org.apache.jasper.servlet.JspServlet.<clinit>(JspServlet.java:58)
        ... 22 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@3bc473 for org.apache.commo
ns.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)
        ... 26 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
        at java.lang.Class.getConstructor0(Class.java:2640)
        at java.lang.Class.getConstructor(Class.java:1629)
        at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
        ... 27 more

may be some usefull infos


This sounds like you have a too-new log4.jar (1.3) in your classpath somewhere. JSPWiki 2.2 will unfortunately work with log4j 1.2 only... You can try to upgrade to the latest alpha and see if your problem goes away. Or find the offending log4j...

-- JanneJalkanen


Jetty 5.1.x does not come with any log4j.jar archive and I had the same problem with 2.3.76.
But I could fix the issue by linking log4j.jar from JSPWiki into <jetty_dir>/ext directory. So this Bug can be closed.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-7) was last changed on 13-Jun-2007 11:13 by 81.171.224.194