• Post Reply Bookmark Topic Watch Topic
  • New Topic

Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV  RSS feed

 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Again i need your help.
Currently my application is on Tomcat5.0.16.I use struts1.2, jstl 1.1 , jsp-api 2.0.
I tried to migrate my application from tomcat5.0 to tomcat 6.0.26.I didn't see any issue in deployment but when i tried to access jsp pages i got this exception.

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: /pbuilder/login/legacyLogin.jsp(6,4) Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:297)
org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:330)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:438)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1393)
org.apache.jasper.compiler.Parser.parse(Parser.java:130)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:347)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.doubleclick.pbuilder.ui.utils.CharsetFilter.doFilter(CharsetFilter.java:32)
com.doubleclick.pbuilder.ui.utils.gzipfilter.GZIPFilter.doFilter(GZIPFilter.java:20)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.


i found that jstl1.1 jar didn't have the above mentioned class.
I replaced jstl1.1 with jstl1.2 jar.i verified that jstl1.2 jar had JstlCoreTLV calss.
but even after this replacement of jar i am facing the same issue.
can somebody please suggest where i am going wrong..
Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error almost always means that you've screwed up the Servlet and JSP API jars. You didn't do something like copy them to your WEB-INF/lib did you?
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jsp and servlet api jars were already in my web-inf/lib. i didn't replace them.
 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kamlendra kumar wrote:... I replaced jstl1.1 with jstl1.2 jar.i verified that jstl1.2 jar had JstlCoreTLV calss.
but even after this replacement of jar i am facing the same issue.

Do you have those jars in the "lib" folder of the Tomcat too? Did you restart the server after the replacement?
jsp and servlet api jars were already in my web-inf/lib. i

But they are already there inside the "lib" of the Tomcat as Bear suggested above.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kamlendra kumar wrote:jsp and servlet api jars were already in my web-inf/lib. i didn't replace them.

Remove them. They do not belong there and will cause these types of problems. Tomncat will load them from its own library.
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Bear Bibeault
@Vijitha Kumara : Thanks alot.. removing the servlet and jsp api jars from WEB-INF/lib worked..
three cheers for you guys
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
removing jsp-api.jar from WEB-INF/lib is solving my problem. I talked about this solution to my team but they differ on this solution.
removing this jar from lib will cause compilation issues for tag handler classes as they reference this jar.
adding the jar to classpath is another workaround but they'r not inclined towards it.According to them our application should be complete.should have all the jars.

so can i configure Tomcat6 to load web-inf/lib/jsp-api.jar instead of loading tomcat/lib/jsp-api.jar.
this will fix the issue.
Thanks in advance
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Compilation has nothing to do with WEB-INF/lib.

WEB-INF/lib is the run-time location of the jar files. During compilation you should be setting your classpath to use the jars in the Tomcat lib folder and not the WEB-INF/lib folder (which doesn't even need to exist during compilation).

If your team is relying upon WEB-INF/lib during compilation, they're doing it wrong.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kamlendra kumar wrote:so can i configure Tomcat6 to load web-inf/lib/jsp-api.jar instead of loading tomcat/lib/jsp-api.jar.

No. You cannot.
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will editing C:\Tomcat6.0\bin\catalina-tasks.xml will help..
we set jsp-api.jar's path in this file.
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Bear
can you suggest any way to ignore setting jsp-api.jar in classpath.
Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Anything else that you try to do at this point will just make things worse.

The correct thing to do is to remove the offending jars from WEB-INF/lib and stop depending upon jars in WEB-INF/lib during build time.

Anything else will just create more problems that you will need to find a way to work around.
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thanks!!!
i'll try to convinve my lead..
Thanks alot..!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Send him here.
 
kamlendra kumar
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
is there some way i could stop any jar from web-inf/lib getting loaded when Tomcat is started.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the last time: no.

It is beyond ridiculous to put a jar in WEB-INF/lib that's not needed at run-time just to build against it.

I shake my head in disbelief.

Just move the jars out of WEB-INF/lib and stop using WEB-INF/lib at build time. It is the run-time location of the jars and should not be part of the build claspath.
 
Kris Schneider
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Just move the jars out of WEB-INF/lib and stop using WEB-INF/lib at build time. It is the run-time location of the jars and should not be part of the build claspath.


In case there's some concern that only one person is representing this point of view, I'll just add my support for Bear's comments: Fix the dev/build environment and do not deploy the Servlet and JSP JARs with the app.
 
Stefano Cazzola
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody.
I know it's very late to reply, but I hit this error only today. And this post helped me solving it quickly.
I think I found an optimal solution, if you are using Maven. I blogged it at this link
http://commondeveloperstories.blogspot.com/2011/09/cloud-foundry-and-tld-error.html.

Bye,
Stefano
 
yang song
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the similar problem with my myeclipse8.6. Who can help me,I will be appreciate for that greatly.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check your WEB-INF/lib for jars that do not belong there?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!