maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane-3 <>
Subject Re: DAO injection in integration tests with a few database server specific methods
Date Fri, 23 Nov 2012 09:39:51 GMT
Yes, it should be the same method signature, but with an implementation that
is specific to each database server.

I created another spring-hibernate-custom-dao.xml file in a
src/main/resources/oracle directory listed in the Maven oracle-test profile,
which contains the custom DAO bean definition:
	<bean id="navbarLanguageCustomDao"

		<property name="sessionFactory" ref="sessionFactory" />

This bean is then injected in the existing common DAO bean with:
	<bean id="navbarLanguageDao"
		<property name="sessionFactory" ref="sessionFactory" />
		<property name="navbarLanguageCustomDao" ref="navbarLanguageCustomDao" />

And the existing common DAO class can now use the injected custom DAO with:
	private NavbarLanguageCustomDao navbarLanguageCustomDao;
	public void setNavbarLanguageCustomDao(NavbarLanguageCustomDao
navbarLanguageCustomDao) {
		this.navbarLanguageCustomDao = navbarLanguageCustomDao;

I think I'm almost there, but I still get an exception:

Caused by: java.lang.IllegalStateException: Cannot convert value of type
[$Proxy14 implementing
to required type
[] for
property 'navbarLanguageCustomDao': no matching editors or conversion
strategy found

View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message