Now I changed applicationContext-test.xml, added the property. I got another
error. I solved it by changing hibernate.cfg.xml of test/resources directory
so that it is equal to hibernate.cfg.xml of main/resources directory. Now
the tests are successful. Do I really have to change definitions in
test/resources? 

René

-----Ursprüngliche Nachricht-----
Von: René Günther [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 4. Dezember 2007 11:17
An: users@appfuse.dev.java.net
Betreff: [appfuse-user] BeanCreationException

I am using appfuse 2.0.1 with full source. I am getting the following error
when running mvn test -Dtest=UserDao*:

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'userManager' defined in file
[c:\Source\bj2\target\test-classes\applicationContext-test.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanInitializationException: Property
'userDao' is required for bean 'userManager'

I checked applicationContext-test.xml and the UserManager definition is:

    <bean id="userManager"
class="com.innflow.bj2.service.impl.UserManagerImpl">
        <property name="authenticationProvider"
ref="daoAuthenticationProvider"/>
    </bean>

In applicationContext-service.xml it is:
    <bean id="userManager"
class="com.innflow.bj2.service.impl.UserManagerImpl">
        <property name="userDao" ref="userDao"/>
        <property name="authenticationProvider"
ref="daoAuthenticationProvider"/>
    </bean>

I expected that ...-test.xml is based on ...-service.xml. Why is the
property missing  ...-test.xml? Or is the error related to something else?

René 


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

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

Reply via email to