I'm having the jee7 web api as dependency. I can start my app on tomcat
application successfully, but what does the following "offending class" statements tell me? Do I have to take any actions?
Jan 13, 2014 5:47:47 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
Information: validateJarFile(C:\Users\me\Servers\apache-tomcat-7.0.50\wtpwebapps\app\WEB-INF\lib\el-api-2.2.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.class
Jan 13, 2014 5:47:47 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
Information: validateJarFile(C:\Users\me\Servers\apache-tomcat-7.0.50\wtpwebapps\app\WEB-INF\lib\javaee-web-api-7.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
pom.xml
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
</dependency>
It seems like you (your Servlet container) are trying to load some classes that have already been loaded. The servlet-api
and el-api
should be provided by the Servlet container.
Change your pom.xml to account for that
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
I have faced the same issue during a project using Eclipse.
Doing below things resolved the issue
Bingo...!!
This resolved my issue. Hope this helps.
Thanks,
mskr.
This is a very common problem for developers who are using Maven as a build tool. when , we include the servlet-api as a project dependency i.e pom.xml like this :
<dependency>
<groupId> javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
add scope as provided in the above dependency as following .
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
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