java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

來源:互聯網
上載者:User

MyBatis與Spring結合時,出現下面的錯誤:

Caused by: java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor

原因:缺少此包aopalliance-1.0.jar --這個jar包是spring的AOP,裡面有Interceptor和Invocation

aopalliance-1.0.jar下載地址:http://mirrors.ibiblio.org/pub/mirrors/maven2/aopalliance/aopalliance/1.0/


另轉:http://hj419460467.blog.163.com/blog/static/186366202011520323459/

//如果不用,啟動時不會出錯,但使用Dwr時,會拋出異常:java.lang.NoClassDefFoundError: antlr/ANTLRException    antlr-2.7.2.jar        //如果不用此包,在啟動時會拋出: nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type    asm.jar       //如果不用此包,在啟動時拋出:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException    aspectjweaver.jar       //如果不用此包,在啟動時拋出:nested exception is java.lang.NoClassDefFoundError: net/sf/cglib/proxy/CallbackFilter    cglib-2.1.3.jar       //如果不用此包,在啟動時拋出:nested exception is java.lang.NoClassDefFoundError: org/apache/commons/collections/SequencedHashMap   commons-collections-3.1.jar       //這個似乎可以不用的    commons-fileupload-1.2.1.jar       //這個就不用說啦,幾乎所有架構都要使用的    commons-logging-1.0.4.jar        //如果不用此包會拋出:java.lang.NoClassDefFoundError: org/dom4j/DocumentException    dom4j-1.6.1.jar       //dwr必須    dwr.jar           //不用此包,在啟動時招聘:java.lang.NoClassDefFoundError: javax/transaction/TransactionManager    jta.jar       //Mysql JDBC驅動    mysql-connector.jar       //Hibernate必須使用,注意此包是包含全部的。    hibernate3.jar       //Spring整體包    spring.jar                   //struts2必須                   freemarker-2.3.8.jar       //struts2必須    ognl-2.6.11.jar           //struts2核心包    struts2-core-2.0.11.2.jar    //struts2整合Spring外掛程式      struts2-spring-plugin-2.0.11.2.jar     //struts2必須    xwork-2.0.5.jar   Caused by: org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available com.springsource.net.sf.cglib-2.2.0.jar

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.