Sunday, January 18, 2015

Caused by: java.lang.ClassNotFoundException: javax.servlet.SessionCookieConfig

Exception:

Caused by: java.lang.ClassNotFoundException: javax.servlet.SessionCookieConfig
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 38 more

Solution: We need to migrate Servlet version 2.5 to 3.0.1

The final dependency was

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>

0 comments: