概述
我的项目是在tomcat6.0下开发的,没有甚么问题,但是最近移植到Jboss4.23GA后,每次启动完毕,第一次访问页面时都会出现Unable to initialize TldLocationsCache: null的问题,但是刷新一次就正常了,后面就再也不会有这个错误出现,一直没有找到什么原因,JBoss的版本4.0.4、4.2都试过了,都不行,请高手帮我看看啊!
页面的错误和控制台的错误分别如下:
页面错误:
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
org.jboss.web.tomcat.tc5.jasper.TagLibCache.init(TagLibCache.java:106)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.getLocation(TagLibCache.java:83)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:526)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.IllegalArgumentException
java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:304)
java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:243)
java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:73)
java.util.jar.JarInputStream.<init>(JarInputStream.java:58)
java.util.jar.JarInputStream.<init>(JarInputStream.java:43)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.scanJar(TagLibCache.java:315)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:268)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.processTldsInFileSystem(TagLibCache.java:261)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.init(TagLibCache.java:101)
org.jboss.web.tomcat.tc5.jasper.TagLibCache.getLocation(TagLibCache.java:83)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:526)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
org.apache.jasper.compiler.Parser.parse(Parser.java:126)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.extremecomponents.table.filter.AbstractExportFilter.doFilter(AbstractExportFilter.java:49)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:75)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
原因:
Jboss中提供对container-level taglibs的支持,与PAS应用中的TLD产生冲突。
解决方法:
修改$JBOSS_HOME/server/$SERVERNAME/deploy/jbossweb-tomcat55.sar/conf/web.xml,注释掉以下内容
<!--
<init-param>
<param-name>engineOptionsClass</param-name>
<param-value>org.jboss.web.tomcat.tc5.jasper.JspServletOptions</param-value>
</init-param>
-->
最后
以上就是俊逸歌曲为你收集整理的Tomcat移植到JBoss的错误:Unable to initialize TldLocationsCache的全部内容,希望文章能够帮你解决Tomcat移植到JBoss的错误:Unable to initialize TldLocationsCache所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复