Hi,
I've tried to get through the Persistence chapter in the tutorial section. I
have added a Person model object which extends org.appfuse.modelUser. 
Besides that, I have followed the instructions in the Persistence and
Hibernate chapter. 
When running mvn test -Dtest=PersonDaoTest I get the following error:

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.731 sec
<<< FAILURE!
testFindPersonByLastName(com.xpoints.dao.PersonDaoTest)  Time elapsed: 0.553
sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'sessionFactory' defined in URL
[jar:file:/home/viggo/.m2/repository/org/appfuse/appfuse-hibernate/2.0-m3-SNAPSHOT/appfuse-hibernate-2.0-m3-SNAPSHOT.jar!/applicationContext-dao.xml]:
Cannot resolve reference to bean 'dataSource' while setting bean property
'dataSource'; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
named 'dataSource' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'dataSource' is defined



Seems that the bean 'dataSource' doesn't exist in the
applicationContext-dao.xml. I have extracted the core model classes from
appfuse, and excluded it in the pom.xml, explained in one of the tutorials.
Can that be the reason?
Is there anything else I have missed?

And another little question: I get this warning as well:
log4j:WARN No appenders could be found for logger
(com.xpoints.dao.PersonDaoTest).
log4j:WARN Please initialize the log4j system properly.

Where do I have to define the appender?
-- 
View this message in context: 
http://www.nabble.com/Error-creating-bean-with-name-%27sessionFactory%22-tf3196130s2369.html#a8874552
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to