tags:

views:

35

answers:

1

While running my report on the Sever I'm getting this Exception"

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport
 java.lang.ClassLoader.defineClass1(Native Method)
 java.lang.ClassLoader.defineClass(ClassLoader.java:621)
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 java.net.URLClassLoader.access$000(URLClassLoader.java:56)
 java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 java.security.AccessController.doPrivileged(Native Method)
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
 java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 java.lang.ClassLoader.defineClass1(Native Method)
 java.lang.ClassLoader.defineClass(ClassLoader.java:621)
 java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
 java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
 java.net.URLClassLoader.access$000(URLClassLoader.java:56)
 java.net.URLClassLoader$1.run(URLClassLoader.java:195)
 java.security.AccessController.doPrivileged(Native Method)
 java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
 java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 java.lang.ClassLoader.loadClass(ClassLoader.java:300)
 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1302)
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
 org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1237)
 org.apache.jasper.compiler.Parser.parseElements(Parser.java:1462)
 org.apache.jasper.compiler.Parser.parse(Parser.java:137)
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
 org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
 org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:170)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:332)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
 org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Can anyone tell me what could be the cause and solution to this problem?

+4  A: 

Most likely you have some unnecessary JAR files in your WEB-INF/lib which are clashing with the ones already available with Tomcat. Specifically this class javax/servlet/jsp/tagext/TagSupport is found in jsp-api.jar

But at runtime, the tomcat server is finding a different version and this leads to NoClassDefFound error. Check to see if these JARS are duplciated. and remove them from the WEB-INF/lib

JoseK
Thanx for considering my problem but the problem is still there.
Raj
@Raj, did you find any duplicate jars between WEB-INF/lib and Tomcat's lib directory?
JoseK
Raj
I've only got mail-1.4.jar and mailapi.jar additionally but that wont make a difference here. The error class complains on jsp-api.jar so check throughout the tomcat directory for any duplicates in any path.
JoseK