springside4啟動報錯,springside4啟動報

來源:互聯網
上載者:User

springside4啟動報錯,springside4啟動報

嚴重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in URL [file:/D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/applicationContext-shiro.xml]: Cannot resolve reference to bean 'shiroDbRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroDbRealm': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException


很奇葩有木有,首先想到的是XML配置錯了?定位到D:/eclipse/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/flowers/WEB-INF/classes/applicationContext-shiro.xml,發現設定檔存在,那麼是配置資訊中securityManager的配置有錯誤,或者securityManager、shiroDbRealm相關的類有問題……但是配置貌似也沒錯誤。至少這個ShiroDbRealm是SpringSide例子內建的,demo上運行是沒問題,不應該有錯誤的,那麼為啥類不能被載入??這種情況不是類沒編寫就是類沒編譯成class檔案啊!嘗試以下操作,編譯項目:


再次運行,啟動成功!

十二月 30, 2014 1:56:45 下午 org.apache.catalina.core.ApplicationContext log資訊: Initializing Spring FrameworkServlet 'springServlet'十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start資訊: Starting ProtocolHandler ["http-nio-80"]十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start資訊: Starting ProtocolHandler ["http-nio-8080"]十二月 30, 2014 1:56:46 下午 org.apache.coyote.AbstractProtocol start資訊: Starting ProtocolHandler ["ajp-nio-8009"]十二月 30, 2014 1:56:46 下午 org.apache.catalina.startup.Catalina start資訊: Server startup in 13171 ms
PS:當時Eclipse編寫代碼太卡了,關閉了自動編譯選項:



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.