Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to read TLD Error  RSS feed

 
Jay Webster
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have designed a website with NetBeans/Tomcat on Windows 8 and when I deploy it, it works perfectly.

I moved it over to my web server on Ubuntu and it doesn't work, I get an error. I am not sure how to fix it as standard.jar is present at "/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/standard.jar". Having searched google, I can see that it could have something to do with incompatible JARs? But since it works on my Windows machine I can't see how that could be?

Thanks for any help.

The error is:

HTTP Status 500 - /index.jsp (line: 2, column: 60) Unable to read TLD "META-INF/c.tld" from JAR file "file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/standard.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
type Exception report
message: /index.jsp (line: 2, column: 60) Unable to read TLD "META-INF/c.tld" from JAR file "file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/standard.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
description: The server encountered an internal error that prevented it from fulfilling this request.
exception:
org.apache.jasper.JasperException: /index.jsp (line: 2, column: 60) Unable to read TLD "META-INF/c.tld" from JAR file "file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/standard.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:182)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)
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:728)
 
K. Tsang
Bartender
Posts: 3624
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Do check the version of your tomcat on Windows and Ubuntu. Are they identically the same?
 
Jay Webster
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,

I have checked tomcat version numbers.

Windows is on 7.0.47 and ubuntu is on 7.0.42.

I put 7.0.42 on the windows machine just to check and everything still worked fine though.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unable to read TLD "META-INF/c.tld" from JAR file "file:/var/lib/tomcat7/webapps/ROOT/WEB-INF/lib/standard.jar"


Then I would have a look at why that error message occurs. Does that JAR file exist? Does Tomcat have permission to read it? Does it actually contain that TLD file in the right place?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What jars are in your WEB-INF/lib? Sometimes this sort of weird error occurs when you copy the servlet and JSP API jars there. If you have done so, remove them immediately! Tomcat provides these jars and you should never copy them.
 
Jay Webster
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
The JAR file exists in the correct location, the TLD file is within the JAR file and the file has the correct permissions.


Bear,
I have the following JARs in my WEB-INF/lib folder:
javax.servlet.jsp.jstl-api-1.2.1.jar
joda-time-2.3.jar
mysql-connector-java-5.1.27-bin.jar
standard.jar

Should I remove "javax.servlet.jsp.jstl-api-1.2.1.jar" and "standard.jar" then? I did remove them to check and I get a File not found error
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like the jars I was worried about are not there. But that looks like an odd combination for the JSTL. Where did you get the JSTL and standard jar files?
 
Jay Webster
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I think I solved my problem.

I had <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

at the top of my code for some JSTL if statements, I took that line and the if statements out and the page loads now.

Not sure why that was a problem? but I am happy that its working...

Thanks for everyone's help :)
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that is the wrong URI...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!