Posts Tagged ‘ServletRequestListener’
Maven / Jetty 7 / java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
Case
My project is deployed via Maven on a Jetty 6 server. I have to upgrade the server to Jetty 7.
(BTW: notice that the plugin maven-jetty-plugin
was renamed as jetty-maven-plugi
n)
I get this error:
[java]java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener[/java]
Quick Fix
In Jetty plugin, add a dependency to servlet-api, eg:
[xml] <plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>7.4.4.v20110707</version>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
</dependency>
</dependencies>[/xml]