This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSP and the fly likes JasperException: Unable to initialize TldLocationsCache: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

JasperException: Unable to initialize TldLocationsCache:

Ajoy Sharma
Greenhorn

Joined: Feb 24, 2004
Posts: 9
Iam facing problem when i am deploying my files on j2ee 1.4 server it give following erroer::
my .tld file and jsp are given below
any body can help me;
mytaglib.tld file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//
DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/
web-jsptaglibrary_1_1.dtd">
<!-- a tag library descriptor -->
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>first</shortname>
<uri></uri>
<info>A simple tab library for the
examples</info>
<tag>
<name>hello</name>
<tagclass>tags.HelloTag</tagclass>
<bodycontent>empty</bodycontent>
<info>Say Hi</info>
</tag>
</taglib>

MY JSP file :::
<%@ taglib uri="/WEB-INF/mytaglib.tld"
prefix="first" %>
<HTML>
<HEAD>
<TITLE>Hello Tag</TITLE>
</HEAD>
<BODY bgcolor="#ffffcc">
<B>My first tag prints</B>:
<first:hello/>
</BODY>
</HTML>
Error :::
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
org.apache.jasper.compiler.Parser.parse(Parser.java:174)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
You just posted this question before where you had an error in your xml (double << .
I see you removed your extra character. Did you TRY to recompile or did you just remove the line in the stacktrace pointing to the first line in your xml?
Usually when you get xml parsing errors you will get a line and character location where it had problems.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61298
    
  66

Please do not ask the same question twice. Any further discussion of this problem will occur in the original topic.
bear
JSP Forum Bartender
[ March 18, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
GeeCON Prague 2014
 
subject: JasperException: Unable to initialize TldLocationsCache: