1: 解決The hierarchy of the type is inconsistent錯誤java
可能的緣由:本身的類繼承於某個類,這個類或者這個類繼承的類或者再往上繼承的某個類所在的jar包沒有被引入。web
例如:使用Spring的AOP時,若是須要繼承MethodBeforeAdvice和AfterReturningAdvice類,除了引入Spring的jar包時,還須要引入AOPAlliance.jar的jar包,由於Advice類是這個包裏面的,不然在編寫Java代碼時會報錯。apache
2:dom
1 - java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory 添加包common-logging.jar 2 - java.lang.ClassNotFoundException: javax.transaction.Synchronization 添加包jta.jar(hiberante) 3 - java.lang.ClassNotFoundException: org.dom4j.DocumentException 添加包dom4j-1.6.1.jar 4 - java.lang.ClassNotFoundException: org.apache.commons.collections.SequencedHashMap 添加包commons-collections.jar 5 - java.lang.ClassNotFoundException: net.sf.cglib.proxy.CallbackFilter java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter 添加包cglib-2.1.3.jar 6 - java.lang.ClassNotFoundException: org.objectweb.asm.Type 添加包asm.jar 7 - java.lang.ClassNotFoundException: antlr.ANTLRException 添加包antlr.jar 8 - java.lang.ClassNotFoundException: net.sf.ehcache.CacheException 添加包ehcache-1.2.3.jar Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(I)V繼承 將cglib.jar 由2.2版本 改成 2.1.get |