Tomcat Failed to start component in Gradle Cargo build cargoStartLocal

Get this error when I run :cargoStartLocal in C:\workspace3.8\SpringMVCExample\container\apache-tomcat-7.0.26\output2.log.

The cause is

 
Caused by: org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15
 

I'm using Tomcat 7.0.26 with JDK8, upgrade to Tomcat 7.0.30 solves the problem, but get another problem

 
org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet
 

The reason is to run with JDK8, the Spring version must be 4, Spring 3 based application must be compiled with a maximaum of Java 7.

So either update spring dependency to 4, or use JDK 1.7 to start Eclipse. See more about using different JDK version with same Eclipse How to switch JDK version in cmd.