I deployed war files in tomcat 7 , java 8 && Eclipse Version: Luna Service Release 1 (4.4.1)
While running it is showing following error.
Try to upgrade the version of TomCat. This is fixed in:
- trunk for 9.0.0.M18 onwards
- 8.5.x for 8.5.12 onwards
- 8.0.x for 8.0.42 onwards
- 7.0.x for 7.0.76 onwards
The reason it doesn't work is because you use modularized (with module-info.class file) dependencies with old TomCat versions. TomCat (bcel
library) tries to scan class files attempting to find annotations like @WebServlet
and others, but encounters unknown byte code.
If one is using org.apache.tomcat.maven:tomcat7-maven-plugin
to start embedded TomCat, you can follow this instruction.