tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat 7.0.30 JAR Scanner ClassCastException
Date Thu, 04 Oct 2012 10:26:17 GMT
On 03/10/2012 14:44, Jesse Farinacci wrote:
> Greetings,
> 
> I am using Apache Tomcat 7.0.30 on IBM Java 6. I have a @WebServlet
> inside a ROOT.war!/WEB-INF/lib/common-servlets.jar which forwards to a
> JSP located in common-servlets.jar!/META-INF/resources/some.jsp. When
> I reference the path for this @WebServlet Tomcat throws the following
> exception:
> 
> org.apache.jasper.JasperException: Unable to initialize
> TldLocationsCache: org.apache.tomcat.util.scan.StandardJarScanner
> cannot be cast to org.apache.tomcat.JarScanner
> 	org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:252)
> 	org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:205)
> 	org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:607)
> 	org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:409)
> 	org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
> 	org.apache.jasper.compiler.Parser.parseElements(Parser.java:1427)
> 	org.apache.jasper.compiler.Parser.parse(Parser.java:138)
> 	org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
> 	org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
> 	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
> 	org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
> 	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
> 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at com.acme.web.MyJspDelegatingServlet.doGet(MyJspDelegatingServlet.java:122)
> 
>  org.apache.catalina.core.ApplicationDispatcher.invoke
> Servlet.service() for servlet org.apache.jasper.servlet.JspServlet
> threw exception
>  java.lang.ClassCastException:
> org.apache.tomcat.util.scan.StandardJarScanner incompatible with
> org.apache.tomcat.JarScanner
>         at org.apache.jasper.compiler.JarScannerFactory.getJarScanner(JarScannerFactory.java:39)
>         at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:243)
>         at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:205)
>         at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:607)
>         at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:409)
>         at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
>         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1427)
>         at org.apache.jasper.compiler.Parser.parse(Parser.java:138)
>         at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
>         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
>         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
>         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
>         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
>         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
>         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
>         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
>         at com.acme.web.MyJspDelegatingServlet.doGet(MyJspDelegatingServlet.java:122)
> 
> I thought perhaps I had an old library somewhere, but grep and md5sum
> confirms that my deployed Tomcat 7.0.30 has the same libs that Apache
> is shipping in the official download. I went back to 7.0.29 and see
> the problem there as well. I haven't gone back farther.
> 
> Any help on this is appreciated. I make heavy use of modular Servlet
> 3.0 jar files bundled inside the war file, and so there is a lot of
> function missing for my applications..

Please list the jars that are in your webapps WEB-INF/lib.


p


-- 

[key:62590808]


Mime
View raw message