I am using Windows 7, Java 1.7, Grails 2.1.4, Groovy 2.0.4 and Tomcat 7.0.37.
When executing my project, I get the error below:
Apr 5, 2013 11:08:00 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/software/apache-tomcat-7.0.37/webapps/aaaportal-0.1/WEB-INF/lib/javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Apr 5, 2013 11:08:13 AM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load org.bouncycastle.jce.provider.JDKKeyPairGenerator$RSABeanInfo. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1599)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.beans.Introspector.instantiate(Introspector.java:1444)
at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:428)
at java.beans.Introspector.<init>(Introspector.java:377)
at java.beans.Introspector.getBeanInfo(Introspector.java:164)
at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:2948)
I tried different versions of servlet-api and bcprov-ext-jdk15-*.jar, but that didn't help.
Should I be worried about this error?
How can I get it to disappear?
You simply have to use a provided scope for your dependency like the following:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
So it will not packaged in your WAR/EAR file anymore.
The servlet-api
jar shouldn't be in your WEB-INF/lib at all, as it is provided by the container. The warning message is quite explicit - the servlet spec requires containers to ignore any jar files in a webapp that contain javax.servlet
classes. You can safely ignore that message.
The second message about bouncycastle is also probably not what it seems. There's probably been another error which caused the webapp not to start up correctly, and this message appears when something else tries to load a class from the already-shutdown webapp. Check your other log files, and possibly edit your log4j settings in Config.groovy to make the logging more verbose, and see if that shows the real underlying error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With