Tomcat 7 with MySQL 连接器:ASM ClassReader 无法解析 class 文件

Tomcat 7 with MySQL connector: ASM ClassReader failed to parse class file

我从 https://dev.mysql.com/downloads/connector/j/.

下载了最新的 MySQL 连接器 mysql-connector-java-5.1.37.zip

Tomcat 正在抛出“ASM ClassReader 无法解析 class 文件 - 可能是 d e 到一个尚不支持的新 Java class 文件版本:[]”,同时启动我的 webapp。我尝试了 运行 JDK 7 和 8。搜索结果表明如果 jar 是为 JDK 8 而不是 JDK 7 编译级别构建的,则可能会发生错误。

Java 1.8 ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet

我应该使用另一个 MySQL 连接器罐吗?其他解决方法? (webapp也用Spring 3.2.4)

C:/servers/apache-tomcat-7.0.65/lib/mysql-connector-java-5.1.37-bin.jar!/com/mysql/jdbc/JDBC42CallableStatement.class];
nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably d
e to a new Java class file version that isn't supported yet: URL [jar:file:/C:/servers/apache-tomcat-7.0.65/lib/mysql-c
nnector-java-5.1.37-bin.jar!/com/mysql/jdbc/JDBC42CallableStatement.class]; nested exception is java.lang.IllegalArgume
tException
       at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(Cl
ssPathScanningCandidateComponentProvider.java:290)

从 "Previous GA" 部分切换到 mysql-connector-java-5.0.8-bin.jar 解决了这个问题。 https://dev.mysql.com/downloads/connector/j/5.0.html