NoClassDefFoundError in AEM
Hi,
I am working on custom Sling Filter in AEM 6.2 SP1. I am running in to issue where i am getting runtime whenever i upload my project JAR for one service.
The error is :
Error during instantiation of the implementation object (java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest)
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.newInstance(Class.java:412)
.
.
.
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest not found by com.*.*.core [1423]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
I do not have any issues while compiling the project. It complies with out a problem. I am having javax.servlet as a dependency in POM. I tried with different versions of that also. I am running in to this issue every time i install jar in publish or author instance.
Any ideas or help would be appreciated.
Thanks