Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.lang.ClassCastException: java.lang.NoClassDefFoundError

Status
Not open for further replies.

pir8ped

Programmer
Jun 7, 2005
4
GB
Hi,

I have Tomcat 5.5.9, JDK 1.5. I am trying to move a webapp that worked fine with JDK 1.4 (probably an earlier Tomcat too).

I get this when I try to access a page:
Code:
java.lang.ClassCastException: java.lang.NoClassDefFoundError at org.apache.jsp.WEB_002dINF.jsp.uncaughtException_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.uncaughtException_jsp:48) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at....

and see this in the log file:
Code:
2005-07-14 10:31:18,781 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/starfriend].[starfriend]] - <Servlet.service() for servlet starfriend threw exception>
java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
...

I have tried googling for an answer, and read and re-read docs - any pointers would be very much appreciated.

Thanks,
John Pedersen
 
STILL stuck on this one - it has been two days now. Followed ALL (!) the google search results on this one.

Any clues please?

All my JSP's use an include page for the tags which just has these two lines:

Code:
<%@ taglib prefix="spring" uri="[URL unfurl="true"]http://www.springframework.org/tags"[/URL] %>
<%@ taglib uri="[URL unfurl="true"]http://java.sun.com/jsp/jstl/core"[/URL] prefix="c" %>

Taking out the second line, the app starts OK, but of course the c: tags are not evaluated. The other tag library works fine.

If I include the second line, then I get the error:

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator

and the app won't start.


John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top