9.15.2006

 

Unable to initialize TldLocationsCache: no !/ in spec

For about a day and a half, I received the following Tomcat error:
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: no !/ in spec
at org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:253)
at org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:224)
at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:526)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
...
Apparently there is only one other person on the Internet who has run across this, and rebooting Tomcat fixed it for him, but not for me. Occasionally, I would also get this error:
java.lang.ClassNotFoundException: org.apache.jsp.testtld_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
...
Somehow, this error was caused by an invalid context path. Here is the entry I had in my server.xml:
<Context path="/ui-portlet-admin"
docBase="myproject\#build\webapp" debug="0" reloadable="true"/>
The problem was that Tomcat didn't like the # sign in the document path, so it wasn't generating work files. As a result, it couldn't generate the work files, and so something about the TldLocationsCache wasn't working. In any case, once I renamed the "#build" directory to "build" and changed the path entry, it worked fine.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?