Spring循环依赖 - 环境相关问题

时间:2013-05-24 09:19:27

标签: 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': 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) 在classpath中也有cglib.jar。 环境变量是相同的。作为容器,我使用tomcat 6.0.18。 操作系统是Centos 5.6 x64 有自由空间和免费记忆。 我没有用jvm选项弄乱任何东西。

有没有人见过这样的问题?我还能检查什么?大多数已解决的问题(我能够很好)与代码相关,但这不是代码

0 个答案:

没有答案