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