Hi,

I set up a Maven project in Eclipse using the
appfuse-basic-spring-archetype 2.1.0-M1 and am currently working my
way through the tutorials at appfuse.org

I got through the QuickStart without problems (the default website
loaded, I could login as admin, etc) but now I'm in the "Using
Hibernate" tutorial at http://appfuse.org/display/APF/Using+Hibernate
and running into trouble.

At the end of the tutorial, it says we should be able to run the test
successfully, but it's not working for me. I copy-pasted all the way
through (except for my package name) and I'm getting:

org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'springTest.webapp.dao.PersonDaoTest':
Autowiring of fields failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
autowire field: private springTest.webapp.dao.PersonDao
springTest.webapp.dao.PersonDaoTest.personDao; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No
unique bean of type [springTest.webapp.dao.PersonDao] is defined:
Unsatisfied dependency of type [interface
springTest.webapp.dao.PersonDao]: expected at least 1 matching bean

My applicationContext.xml (to note the modified package name):
...
    <!-- Activates scanning of @Repository and @Service -->
    <context:component-scan base-package="com.piannaf"/>

    <!-- Add new DAOs here -->
    <bean id="personDao" class="org.appfuse.dao.hibernate.GenericDaoHibernate">
        <constructor-arg value="com.piannaf.springTest.webapp.model.Person"/>
    </bean>
...

And other files are the same as the tutorial except for the package name.

Thanks,
Justin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to