incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske" <harry.met...@gmail.com>
Subject jsp's cannot find class from JSPWiki.jar
Date Wed, 26 Nov 2008 18:41:32 GMT
Hi devs,

this must be a stupid error, but I don't see it.
I'm working on https://issues.apache.org/jira/browse/JSPWIKI-376 (move from
log4j to slf4j), and created a few classes in package org.apache.jspwiki.log
Starting up JSPWiki shows that the LoggerFactory in this package is invoked
about 75 times by JSPWiki classes requesting loggers.
However, when I call the first jsp (Wiki.jsp), which has
org.apache.jspwiki.log.LoggerFactory imported, I get this
NoClassDefFoundError.
Strange, the JSP does compile ! (?)
Same results with other JSP's.
The class resides in JSPWiki.jar.
Why can the other jspwiki classes find this LoggerFactory, but JSP's can't ?
HTTP Status 500 -
------------------------------

*type* Exception report

*message*

*description* *The server encountered an internal error () that prevented it
from fulfilling this request.*

*exception*

javax.servlet.ServletException: java.lang.NoClassDefFoundError:
org/apache/jspwiki/log/LoggerFactory
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:175)
	com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:111)

*root cause*

java.lang.NoClassDefFoundError: org/apache/jspwiki/log/LoggerFactory
	org.apache.jsp.Wiki_jsp.<init>(Wiki_jsp.java:15)
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	java.lang.Class.newInstance0(Class.java:372)
	java.lang.Class.newInstance(Class.java:325)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:175)
	com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:111)

*root cause*

java.lang.ClassNotFoundException: org.apache.jspwiki.log.LoggerFactory
	java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
	org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
	java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
	org.apache.jsp.Wiki_jsp.<init>(Wiki_jsp.java:15)
	sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	java.lang.Class.newInstance0(Class.java:372)
	java.lang.Class.newInstance(Class.java:325)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:145)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	com.ecyrd.jspwiki.ui.WikiServletFilter.doFilter(WikiServletFilter.java:175)
	com.ecyrd.jspwiki.ui.WikiJSPFilter.doFilter(WikiJSPFilter.java:111)

*note* *The full stack trace of the root cause is available in the Apache
Tomcat/6.0.16 logs.*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message