• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with Maven and JSTL

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello guys,

I'm having problems using JSTL dependencies of Maven in Tomcat.
For some reason Tomcat does not recognize JSTL of my application which was dowloaded as maven dependencies and I'm not able to use JSTL tags on my application.

I'm using Ubuntu 10.4 here is my maven instalation:
Apache Maven 3.0.4 (r1232337; 2012-01-17 06:44:56-0200)
Maven home: /usr/local/apache-maven/apache-maven-3.0.4
Java version: 1.7.0_05, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-41-generic", arch: "i386", family: "unix"

I'm running Tomcat inside Eclipse and a simple start of Tomcat with my app installed I got several erros like these in the console:

Jul 19, 2012 6:59:25 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [org/apache/taglibs/standard/lang/jstl/OrOperator.class] from Jar [jar:file:/home/fabiano/4Linux/497/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/fourpizza/WEB-INF/lib/jstl-1.2.jar!/] for annotations
java.util.zip.ZipException: invalid LOC header (bad signature)

I'm wondering if someone can help to clear it out..

Thanks in advance!

Fabiano
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you are saying that you are declaring the jstl jar as a dependency for your war in the pom.xml? If so, try deleting the entire jstl directory from your local repository and try building again, it appears that somehow it got corrupted (which is somewhat unusual because Maven does check the hash code).

By the way, I assume that you are using the jstl form Maven Central, and not one that you installed yourself, right?

Other things to try:

a) Open that file mentioned in the error message using a zip utility.

b) Open the jstl jar file in the local repository using a zip utility
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Peter.. thanks for the reply..

yes, Im declaring jstl jar as dependency on my pom.xml

about you comment:
By the way, I assume that you are using the jstl form Maven Central, and not one that you installed yourself, right?
I'm new to maven and not understanding what you are telling by "jstl form Maven Central".

here is my jstl dependency on pom.xml



I did some search on the google and found this

http://www.andygibson.net/blog/quickbyte/jstl-missing-from-maven-repositories/

should I use the dependencies as mentioned in this link? is that what you meant?

instead of using <groupId>jstl</groupId> should I use <groupId>javax.servlet.jsp.jstl</groupId> as mentioned in the link?

thanks!

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I would use that groupId or javax.servlet. THe one with a groupId of jstl was uploaded in 2006, so I would not rely on that one. (You do know how to search Maven Central, right?)

One thing frustrating about Maven Central is the naming anarchy and too often the same artifact appears in multiple places, so figuring out the correct groupId is always a hassle.
 
fabianoSouza Souza
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Peter.. I got it,, I just put that groupId in the pom.xml and everything started working..

as I said I'm new to maven and not sure about how to search Maven Central..

but the problem is fixed and most important I know what the problem was and how to fix it..

thanks again!!

Fabiano
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Go here to search Maven Central: http://search.maven.org/#browse
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic