1. 程式人生 > >spring4+struts2+hibernate5整合出現spring異常

spring4+struts2+hibernate5整合出現spring異常

整合spring4+struts2+hibernate5,進行測試時出現異常,異常內容如下:

Error creating bean with name 'userDao' defined in file [D:\apache-tomcat-7.0.73\webapps\S2SH-Test\WEB-INF\classes\applicationContext-bean.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot resolve reference to bean 'txPointcut' while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txPointcut': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.aop.aspectj.AspectJExpressionPointcut]:

No default constructor found; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:479)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

重點關注標紅內容,百度後得知:

Spring3.0不再一起釋出依賴包了。而是使用Maven的pom進行管理,aspectjweaver是作為可選依賴項引入。因此,使用非Maven方式搭建,需要單獨下載aspectjweaver.jar檔案放入lib路徑。

相關推薦

spring4+struts2+hibernate5整合出現spring異常

整合spring4+struts2+hibernate5,進行測試時出現異常,異常內容如下: Error creating bean with name 'userDao' defined in file [D:\apache-tomcat-7.0.73\webapps\S

springboot+devtools+shiro-redis整合出現ClassCastException異常

上次在https://blog.csdn.net/feinifi/article/details/84990003這篇文章中,提到過springboot整合shiro時,使用redis做快取管理,那麼會用到shiro-redis這個依賴,那麼問題來了,熱部署+shiro-redis會導致:我們登

最簡單的ssh框架搭建:spring4+struts2+hibernate5。使用部分註解(常用的幾個註解)

前一篇寫了沒有使用註解的方式:https://blog.csdn.net/Handsome2013/article/details/86301083 這一篇是有部分需要使用註解:這個是在上一篇的基礎上寫的。 改變1:在dao層的SSHDaoImpl.java上添加了註釋@Repository

在eclipse上邊搭建一個最最最最最最最最最最最最最最最最最最最最最最最最簡單的ssh框架spring4+struts2+hibernate5,然後實現從資料庫中查詢一個數據,在前端頁面中顯示出來

在eclipse上邊搭建一個最最最簡單的ssh框架spring4+struts2+hibernate5,然後實現從資料庫中查詢一個數據,在前端頁面中顯示出來   需要的包和工具連結如下: jar包:https://download.csdn.net/download/hands

使用ssh三大框架和整合出現異常

1. org.hibernate.PropertyNotFoundException: Could not locate getter method for property [cn.itcast.domain.Customer#custId] (adsbygoogle = win

Spring4+Struts2+Hibernate5報錯:Access denied for user 'root'@'localhost' (using password: YES)

輸入使用者名稱、密碼後報錯,原因為: 配置檔案applicationContext.xml中 <bean id="datasource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="

springstruts2整合出現錯誤HTTP Status 500 - Unable to instantiate Action

alt 問題 blog src nbsp 文件 spa XML color 在進行spring和struts2整合的時候因為大意遇到了一個問題,費了半天神終於找到了問題所在,故分享出來望廣大博友引以為戒!! 我們都知道在spring和struts2整合時,spring接管了

springboot整合mapper-spring-boot-starter時,使用SelectByPrimaryKey時出現的型別轉換異常

我也是被這個東西給整蒙了 使用SelectByPrimaryKey時出現的型別轉換異常 java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String at org

Spring Boot整合shiro,出現UnavailableSecurityManagerException 異常

問題描述:由於在java過濾器中通過User token = (User) SecurityUtils.getSubject().getPrincipal();獲取當前的登入使用者的資訊,報UnavailableSecurityManagerException這個異常。spr

Spring與Quartz整合出現異常

今天在做Spring與Quartz整合實現定時任務排程時,出現了一個異常,錯誤資訊如下: 嚴重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error

spring mvc +Mybatis3.1 整合的時候異常

factory lec sta error .get for 1.0 character mod 在使用Mybatis3.10+spring3.10+mybatis-spring-1.0.0集成,使用spring 時發生例如以下錯誤: 嚴重: Servlet

SpringStruts2整合

jar文件 plugin ont listener attribute framework -c jar com 一、復制jar文件。 把struts2-spring-plugin-..*.jar和spring.jar復制到Web工程的WEB-INF/lib目錄下,並且

ssh整合spring + struts2 + hibernate)xml版

添加 list pub doc ace artifact tde lis rop 1.1分層 1.2jar節點 <dependencies> <dependency> <groupId>ju

ssh整合思想 Spring與Hibernate和Struts2的action整合 調用action添加數據庫 使用HibernateTemplate的save(entity)方法

all 自動 註意 pool 監聽 聲明屬性 struts2 技術 utf-8 自動調用Spring的bean.xml配置文件 需要web.xml啟動文件 代碼如下: <?xml version="1.0" encoding="UTF-8"?> <web

spring-mybatis整合項目 異常處理

pat 失敗 encoding endpoint per ans 分隔 ctp 技術分享 java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMet

Spring Boot 整合 Apache Solr 異常:Expected mime type application/octet-stream but got text/html 的解決.

註釋 info 過時 查看 異常 dea 沒有 時間 發的 解決方法:Spring Data Solr 3.0 以上版本 將@SolrDocument(solrCoreName = "new_core") 中的solrCoreName 字段改為使用collection字段

Struts2下載檔案點取消、重複下載出現異常解決

在使用Struts2下載檔案時,如果重複下載,會丟擲如下異常: java.lang.IllegalStateException: Cannot call sendError() after the response has been committed at org

spring專案中新增@Transactional註解後出現NoSuchBeanDefinitionException異常的解決方法

配置檔案裡這一句<tx:annotation-driven transaction-manager="transactionManager"/> 改成 <tx:annotation-driven transaction-manager="transac

springmvc-spring4.3-hibernate5框架整合

                                          &

SpringStruts2整合其實很簡單

下面是整合步驟 一、複製jar檔案。 把struts2-spring-plugin-..*.jar和spring.jar複製到Web工程的WEB-INF/lib目錄下,並且還需要複製commons-logging.jar。 二、配置Struts.objectFactory