-
Jul 13th, 2012, 06:20 PM
#1
Spring security sample tutorial throws error within STS
Hi Folks,
Sorry if this is a repetitive post. I followed Rob's instructions (http://rwinch.blogspot.com/2011/03/r...=1342135304433 on getting the source from git and then use gradlew to build the code. After that I import the project into STS and try to run the tutorial sample. I get the following error below when I try to deploy it using tomcat or vFabric Server. However when I just copy the war and put it in tomcat's webapps directory and run tomcat outside of STS, I get no issues. I also verified that the WEB-INF/lib has the jstl1.2.jar file. I kind of want to work with Spring Security and STS together. Any inputs will be greatly appreciated.
My env: Mac OSX Snow Leopard 10.6.8 (latest), Java 1.6, STS 2.9.2.
org.apache.jasper.JasperException: /index.jsp(3,61) Unable to read TLD "META-INF/c.tld" from JAR file "file:/Users/arnabsinha/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/spring-security-samples-tutorial/WEB-INF/lib/jstl-1.2.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV
org.apache.jasper.compiler.DefaultErrorHandler.jsp Error(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatc h(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspErro r(ErrorDispatcher.java:218)
org.apache.jasper.compiler.TagLibraryInfoImpl.<ini t>(TagLibraryInfoImpl.java:183)
org.apache.jasper.compiler.Parser.parseTaglibDirec tive(Parser.java:386)
org.apache.jasper.compiler.Parser.parseDirective(P arser.java:450)
org.apache.jasper.compiler.Parser.parseElements(Pa rser.java:1397)
org.apache.jasper.compiler.Parser.parse(Parser.jav a:130)
org.apache.jasper.compiler.ParserController.doPars e(ParserController.java:255)
org.apache.jasper.compiler.ParserController.parse( ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(C ompiler.java:185)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:354)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:334)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:321)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
-
Jul 16th, 2012, 10:16 AM
#2
Which version of the code are you importing? If you are using 3.1.1+ (i.e. master) you should use the Gradle Eclipse tools to import it.
-
Jul 16th, 2012, 05:08 PM
#3
Rob, thank you for responding. I am using Gradle Eclipse tool to import the sources to the workspace. It seems like I have a problem with the WTP jars related to JSTL. Not sure how to go about it at this point.
-
Jul 16th, 2012, 05:24 PM
#4
Which version of Gradle Eclipse are you using and which version of the code are you trying to import? What jars show up in your lib folder of the war? You should find the deployed app at <WORKSPACE_LOCATION>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
-
Jul 16th, 2012, 05:38 PM
#5
------------------------------------------------------------
Gradle 1.0
------------------------------------------------------------
Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.6.0_33 (Apple Inc. 20.8-b03-424)
OS: Mac OS X 10.6.8 x86_64
I checked the build.gradle file for version for all projects - version = '3.1.2.CI-SNAPSHOT'
I see the following jars in my WEB-INF/lib:
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.2.jar
asm-analysis-3.2.jar
asm-commons-3.2.jar
asm-tree-3.2.jar
asm-util-3.2.jar
aspectjrt-1.6.10.jar
aspectjweaver-1.6.10.jar
cglib-nodep-2.2.jar
commons-codec-1.3.jar
commons-collections-3.2.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
ehcache-1.6.2.jar
groovy-1.7.10.jar
groovy-all-1.7.5.jar
hamcrest-core-1.1.jar
hamcrest-core-1.2.jar
hsqldb-1.8.0.10.jar
javassist-3.16.1-GA.jar
jcip-annotations-1.0.jar
jcl-over-slf4j-1.6.1.jar
jsp-api-2.0.jar
jsr250-api-1.0.jar
jstl-1.2.jar
junit-4.7.jar
junit-4.8.2.jar
junit-dep-4.8.2.jar
logback-classic-0.9.29.jar
logback-core-0.9.29.jar
mockito-all-1.9.0.jar
mockito-core-1.8.5.jar
objenesis-1.0.jar
objenesis-1.2.jar
openid4java-nodeps-0.9.6.jar
powermock-api-mockito-1.4.12.jar
powermock-api-support-1.4.12.jar
powermock-core-1.4.12.jar
powermock-module-junit4-1.4.12.jar
powermock-module-junit4-common-1.4.12.jar
powermock-reflect-1.4.12.jar
servlet-api-2.5.jar
slf4j-api-1.6.1.jar
spock-core-0.5-groovy-1.7.jar
spring-aop-3.0.7.RELEASE.jar
spring-asm-3.0.7.RELEASE.jar
spring-beans-3.0.7.RELEASE.jar
spring-context-3.0.7.RELEASE.jar
spring-context-support-3.0.7.RELEASE.jar
spring-core-3.0.7.RELEASE.jar
spring-expression-3.0.7.RELEASE.jar
spring-jdbc-3.0.7.RELEASE.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-security-acl.jar
spring-security-config.jar
spring-security-core.jar
spring-security-crypto.jar
spring-security-taglibs.jar
spring-security-web.jar
spring-test-3.0.7.RELEASE.jar
spring-tx-3.0.7.RELEASE.jar
spring-web-3.0.7.RELEASE.jar
spring-webmvc-3.0.7.RELEASE.jar
-
Jul 17th, 2012, 09:06 AM
#6
Based upon the error message and the fact that the jstl jar is there, it appears the jstl jar may be corrupted. Try deleting the jstl jar as described on SO (another SO).
-
Jul 17th, 2012, 02:09 PM
#7
Rob: I replaced the jstl-1.2.jar with a working copy from another project in my system. It still didn't work. I also tried to delete the servlet-api-2.5.jar and that didn't help either.
I am out of ideas at this point.
-
Jul 17th, 2012, 02:12 PM
#8
Try renaming your local maven repository or commenting out the mavenLocal() entry in build.gradle
-
Jul 17th, 2012, 02:19 PM
#9
I want to clarify something, because I am not sure it got across the first time. Are you using ./gradlew eclipse or are you using Gradle Eclipse? I mentioned this briefly in my response on the blog, but you must use the Gradle Eclipse to build 3.1.1 and later.
When the code was updated to Gradle 1.0, a number of the workarounds that were added to the projects to get it to work with gradlew eclipse were removed since they did not work with the update to Gradle 1.0. Gradle Eclipse removes the need for most of the workarounds so it is required for now. I will look into getting gradlew eclipse to work as soon as I take care of some of the higher priority tickets.
-
Jul 17th, 2012, 03:52 PM
#10
Rob: that was it. I was using ./gradlew to build and not Gradle Eclipse. Once I installed the Gradle plugin all worked satisfactorily.
Thank you very much. Appreciate your patience.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules