Hi,
i have 3 daos PersonDAO, AddressDAO and CompanyDAO.
PersonDAO has reference of AddressDAO.
AddressDAO has reference of CompanyDAO.
CompanyDAO has reference of PersonDAO .
CompanyDAO has reference of AddressDAO .
Please note that when i remove "CompanyDAO has reference of AddressDAO "
the exception goes.
I get the following exception:
com.infosys.j2ee.subframework.persistence.dao.DAOS erviceException: There is an error at the time of creating the dao - PersonDAO
at com.infosys.j2ee.subframework.persistence.dao.impl .SpringIbatisDAOService.getDAO(SpringIbatisDAOServ ice.java:303)
at com.setlabs.PersonDAOTest.setUp(PersonDAOTest.java :51)
at junit.framework.TestCase.runBare(TestCase.java:125 )
at junit.framework.TestResult$1.protect(TestResult.ja va:106)
at junit.framework.TestResult.runProtected(TestResult .java:124)
at junit.framework.TestResult.run(TestResult.java:109 )
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:2 08)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit 3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'PersonDAOTarget' defined in class path resource [etc/spring-dao/RadienSpringDAOConfig.xml]: Cannot resolve reference to bean 'AddressDAO' while setting bean property 'addressDAO'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'AddressDAO' defined in class path resource [etc/spring-dao/RadienSpringDAOConfig.xml]: Cannot resolve reference to bean 'AddressDAOTarget' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'AddressDAOTarget' defined in class path resource [etc/spring-dao/RadienSpringDAOConfig.xml]: Cannot resolve reference to bean 'CompanyDAO' while setting bean property 'companyDAO'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'CompanyDAO' defined in class path resource [etc/spring-dao/RadienSpringDAOConfig.xml]: Cannot resolve reference to bean 'CompanyDAOTarget' while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'CompanyDAOTarget' defined in class path resource [etc/spring-dao/RadienSpringDAOConfig.xml]: Cannot resolve reference to bean 'AddressDAO' while setting bean property 'addressDAO'; nested exception is org.springframework.beans.factory.BeanCurrentlyInC reationException: Error creating bean with name 'AddressDAO': org.springframework.beans.factory.FactoryBeanNotIn itializedException: FactoryBean is not fully initialized yet
....not the complete stack trace..please refer the attached file for complete stack trace
Spring Config File:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>