2016-11-19 104 views
0

任何人都可以告訴我,爲什麼會發生此錯誤? 其實我不明白從哪裏開始解決它。org.springframework.beans.factory.UnsatisfiedDependencyException,java.lang.Error:未解決的編譯問題

Nov 19, 2016 10:20:30 AM org.apache.catalina.core.StandardContext listenerStart 
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'accessDeniedController' defined in file [D:\java-git-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\wps\WEB-INF\classes\controller\AccessDeniedController.class]: Unsatisfied dependency expressed through constructor parameter 1: Error creating bean with name 'wpsManager' defined in ServletContext resource [/WEB-INF/classes/wpsContext.xml]: Cannot resolve reference to bean 'passwordManager' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'passwordManager' defined in ServletContext resource [/WEB-INF/classes/userContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.greytip.wps.service.impl.PasswordManagerImpl]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: 
    The import org.springframework.security.context.SecurityContext cannot be resolved 
    The import org.springframework.security.context.SecurityContextHolder cannot be resolved 
    SecurityContext cannot be resolved to a type 
    SecurityContextHolder cannot be resolved 
; 

回答

0

導致大量的異常級聯一路上漲的基礎例外是

java.lang.Error: Unresolved compilation problems: 

這意味着帽子你的java文件中的一個有無效語法和編譯器錯誤消息,並未能成功編譯。 YOu應該重建整個項目並檢查編譯錯誤的所有源代碼。錯誤類可能是

com.greytip.wps.service.impl.PasswordManagerImpl 
+0

它的工作,這是一個導入問題 – zeji

相關問題