Java Spring循环依赖关系-与环境相关的问题

Java Spring循环依赖关系-与环境相关的问题,java,spring,Java,Spring,这不是与代码相关的问题——因为它确实适用于其他环境 我遇到的问题是 24 maj 2013 10:52:18:762 ERROR [main] [ContextLoader:215] Context initialization failed org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'com.my.code.DirectoryManager'

这不是与代码相关的问题——因为它确实适用于其他环境

我遇到的问题是

24 maj 2013 10:52:18:762 ERROR [main] [ContextLoader:215] Context initialization failed
org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'com.my.code.DirectoryManager': Bean with name 'com.my.code.DirectoryManager' has been injected into other beans [com.my.code.CustomerManager,com.my.code.ProjectManager] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
有趣的是,同样的代码也适用于其他环境。 Java版本相同(jdk 1.6.33 x64) 类路径中还有cglib.jar。 环境变量是相同的。作为容器,我使用tomcat 6.0.18。 操作系统为Centos 5.6 x64 有可用空间和可用内存。 我没有把jvm选项搞砸


你们有谁见过这样的问题吗?我还能查什么?大多数已解决的问题(我可以确定)都与代码相关,但这不是代码

您是否仔细检查了所有依赖项是否都是正确的版本?可能是maven repo的问题,或者对于您正在使用的任何构建工具类似的问题。我不认为这是您的代码的问题。请检查您在每个环境上的部署(EAR或WAR)是否完全相同?我的意思是从大小开始,然后是模块/JAR等。如果您有两个配置文件创建不同类型的WAR/EAR(我曾经是受害者:),通常会发生这种情况。WAR是相同的(我们使用maven使用tomcat+应用程序构建rpm),并且此rpm分发到环境中。我认为这是一个配置问题。Spring应用程序上下文配置是什么样子的?我现在遇到了类似的问题。我将用我的具体信息发布一个单独的问题。我的是一个循环依赖错误,如果Jenkins执行发布,它就会发生。然而,如果我从我的笔记本电脑(windows)上运行maven版本,它似乎可以在没有任何代码更改的情况下工作。此外,如果我下载导致错误的“损坏”jar并将其解压缩,然后在我的机器上进行压缩,错误就会消失。很奇怪。另外,我还要提到Jenkins正在linux Centos上运行。