java - After moving to Spring 4 my Autowiring breaks -
i have started migrating spring 4.1.2 spring 3.2.3 , reason keep getting dependency issue autowiring:
severe: exception sending context initialized event listener instance of class org.springframework.web.context.contextloaderlistener org.springframework.beans.factory.beancreationexception: error creating bean name 'org.springframework.web.servlet.config.annotation.delegatingwebmvcconfiguration': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire method: public void org.springframework.web.servlet.config.annotation.delegatingwebmvcconfiguration.setconfigurers(java.util.list); nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'nz.co.doltech.actions.server.spring.basemvcmodule': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: nz.co.doltech.actions.server.controllers.interceptors.loggedininterceptor nz.co.doltech.actions.server.spring.basemvcmodule.loggedininterceptor; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'userservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:762) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:757) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:480) @ org.springframework.web.context.contextloader.configureandrefreshwebapplicationcontext(contextloader.java:403) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:306) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:106) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4971) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5467) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:901) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:877) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:632) @ org.apache.catalina.startup.hostconfig.manageapp(hostconfig.java:1740) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.tomcat.util.modeler.basemodelmbean.invoke(basemodelmbean.java:301) @ com.sun.jmx.interceptor.defaultmbeanserverinterceptor.invoke(defaultmbeanserverinterceptor.java:819) @ com.sun.jmx.mbeanserver.jmxmbeanserver.invoke(jmxmbeanserver.java:801) @ org.apache.catalina.mbeans.mbeanfactory.createstandardcontext(mbeanfactory.java:618) @ org.apache.catalina.mbeans.mbeanfactory.createstandardcontext(mbeanfactory.java:565) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ org.apache.tomcat.util.modeler.basemodelmbean.invoke(basemodelmbean.java:301) @ com.sun.jmx.interceptor.defaultmbeanserverinterceptor.invoke(defaultmbeanserverinterceptor.java:819) @ com.sun.jmx.mbeanserver.jmxmbeanserver.invoke(jmxmbeanserver.java:801) @ javax.management.remote.rmi.rmiconnectionimpl.dooperation(rmiconnectionimpl.java:1487) @ javax.management.remote.rmi.rmiconnectionimpl.access$300(rmiconnectionimpl.java:97) @ javax.management.remote.rmi.rmiconnectionimpl$privilegedoperation.run(rmiconnectionimpl.java:1328) @ javax.management.remote.rmi.rmiconnectionimpl.doprivilegedoperation(rmiconnectionimpl.java:1420) @ javax.management.remote.rmi.rmiconnectionimpl.invoke(rmiconnectionimpl.java:848) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:606) @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:322) @ sun.rmi.transport.transport$1.run(transport.java:177) @ sun.rmi.transport.transport$1.run(transport.java:174) @ java.security.accesscontroller.doprivileged(native method) @ sun.rmi.transport.transport.servicecall(transport.java:173) @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:556) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:811) @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:670) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:745) caused by: org.springframework.beans.factory.beancreationexception: not autowire method: public void org.springframework.web.servlet.config.annotation.delegatingwebmvcconfiguration.setconfigurers(java.util.list); nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'nz.co.doltech.actions.server.spring.basemvcmodule': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: nz.co.doltech.actions.server.controllers.interceptors.loggedininterceptor nz.co.doltech.actions.server.spring.basemvcmodule.loggedininterceptor; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'userservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredmethodelement.inject(autowiredannotationbeanpostprocessor.java:643) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ... 56 more caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'nz.co.doltech.actions.server.spring.basemvcmodule': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: nz.co.doltech.actions.server.controllers.interceptors.loggedininterceptor nz.co.doltech.actions.server.spring.basemvcmodule.loggedininterceptor; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'userservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.findautowirecandidates(defaultlistablebeanfactory.java:1127) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1003) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:949) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredmethodelement.inject(autowiredannotationbeanpostprocessor.java:600) ... 58 more caused by: org.springframework.beans.factory.beancreationexception: not autowire field: nz.co.doltech.actions.server.controllers.interceptors.loggedininterceptor nz.co.doltech.actions.server.spring.basemvcmodule.loggedininterceptor; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'userservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:555) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ... 69 more caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'userservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:292) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.findautowirecandidates(defaultlistablebeanfactory.java:1127) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1051) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:949) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:527) ... 71 more caused by: org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.framework.mapping.entitymapperfactory nz.co.doltech.actions.server.services.impl.userserviceimpl.mapperfactory; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:555) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ... 84 more caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'mappercontext': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:292) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.findautowirecandidates(defaultlistablebeanfactory.java:1127) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1051) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:949) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:527) ... 86 more caused by: org.springframework.beans.factory.beancreationexception: not autowire field: private nz.co.doltech.actions.server.services.eventservice nz.co.doltech.actions.server.mapping.entitymappercontext.eventservice; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:555) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ... 99 more caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'eventservice': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1204) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:538) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:476) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:302) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:229) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:298) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.findautowirecandidates(defaultlistablebeanfactory.java:1127) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1051) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:949) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:527) ... 101 more caused by: org.springframework.beans.factory.beancreationexception: not autowire field: private org.springframework.transaction.support.transactiontemplate nz.co.doltech.actions.server.services.impl.eventserviceimpl.transactiontemplate; nested exception java.lang.stackoverflowerror @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:555) @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:87) @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ... 112 more caused by: java.lang.stackoverflowerror @ org.springframework.core.simplealiasregistry.canonicalname(simplealiasregistry.java:157) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.isdependent(defaultsingletonbeanregistry.java:446) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.isdependent(defaultsingletonbeanregistry.java:455) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.isdependent(defaultsingletonbeanregistry.java:455) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.isdependent(defaultsingletonbeanregistry.java:455) .. snipped ..
i have no idea why getting error, since worked fine in spring 3.2.3. suspicions spring 4 doesn't lazy load dependencies default added initlazy = true @componentscan references. see issue "cyclic" dependency 1 shouldn't causing stackoverflowexception, if working fine in older version. have missed configuration setting or perhaps needs altered in spring 4?
here applications relevant setup classes: https://gist.github.com/bendol/080169ee25e8d4f231f4
the prototype scope create new object every time injected. singleton instantiate 1 instance , use instance every time injected.
so everytime transactiontemplate bean requested, new 1 created.
your eventservice , emailservice have cyclic dependency , depends on transactiontemplate. pretty answered of questions in comments.
- cyclic dependency
- prototype pattern on dependency on each item.
the result infinite transactiontemplate creation.
Comments
Post a Comment