java.lang.ClassNotFoundException: javax.servlet.AsyncContext

I updated my project to Spring 4 and got error:

java.lang.ClassNotFoundException: javax.servlet.AsyncContext

After some googling I found the problem: AsyncContext was introduced into Servlet API 3.0, but I was using Servlet API 2.5. So, the solution is simple - add the following Maven dependency:

[geshifilter-xml] <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency> [/geshifilter-xml]

P.S. Useful thread at Stackoverflow: ClassNotFoundException: javax.servlet.AsyncContext in Jetty hello world

Kategorija: