我从https://dev.mysql.com/downloads/connector/j/下载了最新的MySQL连接器mysql-connector-java-5.1.37.zip。
Tomcat正在抛出“ASM ClassReader无法解析类文件 - 可能是d e到一个尚不支持的新Java类文件版本:[]“启动我的webapp时。我尝试使用JDK 7和8运行。搜索结果表明如果jar是为JDK 8构建的,可能会发生错误,而不是JDK 7编译级别。
我应该使用另一个MySQL连接器jar吗?其他解决方法? (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)
答案 0 :(得分:0)
从“上一个GA”部分切换到mysql-connector-java-5.0.8-bin.jar解决了这个问题。 https://dev.mysql.com/downloads/connector/j/5.0.html