Hi,
I have a setup with a few ordinary beans and some hibernate JPA stuff. This seems to work.
Then there is a @Component annotated bean being loaded by <component-scan>. This bean has an autowired field of a type that has a single bean in the same context.
But still I get:
In fact I find it even more surprising that I get this log entry before the above one:Code:Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helloWorld': Autowiring of fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected dk.smaas.erp.AccountDAO dk.smaas.rest.HelloWorld.dao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [dk.smaas.erp.AccountDAO] is defined: Unsatisfied dependency of type [class dk.smaas.erp.AccountDAO]: expected at least 1 matching bean
But perhaps this is just a by-product caused by the autowiring failure?Code:Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@90ff2a1: defining beans [accountDAO,dataSource, etc...]
Thanks,
-dennis


Reply With Quote

