【问题标题】:org.springframework.beans.factory.UnsatisfiedDependencyException , java.lang.Error: Unresolved compilation problemsorg.springframework.beans.factory.UnsatisfiedDependencyException , java.lang.Error: 未解决的编译问题
【发布时间】:2017-04-03 00:54:59
【问题描述】:

谁能告诉我,为什么会发生这个错误? 其实我不明白从哪里开始解决它。

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
;

【问题讨论】:

    标签: java spring spring-mvc dependencies xml-configuration


    【解决方案1】:

    导致大规模异常级联的基本异常是

    java.lang.Error: Unresolved compilation problems: 
    

    这意味着您的某个 java 文件具有无效的语法和编译器错误消息,并且未能成功编译。您可能应该重建整个项目并检查所有源代码是否存在编译错误。错误的类很可能

    com.greytip.wps.service.impl.PasswordManagerImpl
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-24
      • 2014-05-08
      • 2017-07-16
      • 2012-06-28
      • 1970-01-01
      • 1970-01-01
      • 2015-09-01
      相关资源
      最近更新 更多