Results 1 to 2 of 2

Thread: initialization error: circular reference

  1. #1
    Join Date
    Feb 2005
    Posts
    6

    Default initialization error: circular reference

    Hi,

    I'm getting a weird init error. Oddly, when I deploy my app on some servers it works fine, but on one linux server it's failing. I'm running Tomcat 6.0 and JDK 1.6 in all cases.

    The error:

    Code:
    2010-03-09 15:03:28 ERROR Context initialization failed
    org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'userSimulationTagService': Bean with name 'userSimulationTagService' has been injected in
    to other beans [simulationService] 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.
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:557)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:416)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:261)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:192)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    This refers to auto wiring, excerpted here:

    Code:
    Service("simulationService")
    public class SimulationServiceImpl implements SimulationService
    {
        @Autowired
        SecurityService securityService;
    
        @Autowired
        UserSimulationTagService userSimulationTagService;
    The UserSimulationTagService doesn't have any circular references that I can see -- it refers to DAO objects:
    Code:
    @Service("userSimulationTagService")
    public class UserSimulationTagServiceImpl implements UserSimulationTagService
    {
    
    	@Autowired
    	transient UserSimulationTagDao userSimulationTagDao;
    
    	@Autowired
    	transient SimulationTagDao simulationTagDao;
    	
    	@Autowired
    	SimulationDao simulationDao;
    Any suggestions? I'm stumped.

  2. #2

    Default

    Hi !

    Did you solved your problem ? I've got exactly the same situation - also on dao's btw - and nobody finds where the circular dependencies are.

    Jan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •