29-Sep-2014 15:35:21.660 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [org/json/CDL.class] from Jar [jar:file:/D:/MyProfiles/IdeaProjects/yourproject/out/artifacts/project_war_exploded/WEB-INF/lib/json.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: null is not a Java .class file
今天公司迁移SVN库,从新导了一遍,启动Tomcat的时候结果报错如上。可是编译的时候不报错!html
排查后发现,IDEA里设置了2个Tomcat,一个是6.x,还有一个是8.xjava
但我不清楚json.jar的版本是多少,在MANIFEST.MF中只找到了以下信息:git
Manifest-Version: 1.0 Created-By: 1.4.2_14 (Sun Microsystems Inc.)
我是将Tomcat修改成6.x问题就解决了。github
附录:
apache
JSON 4 Java的API DOC:http://www.json.org/java/index.html json
源码:https://github.com/douglascrockford/JSON-java tomcat
JSON官网:http://www.json.org/spa