struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart" <lukasz.len...@googlemail.com>
Subject Re: [S2] Convention plugin + Spring
Date Sat, 03 Jan 2009 15:02:54 GMT
2009/1/3 Wes Wannemacher <wesw@wantii.com>:
> Lukasz, it may be unrelated, but I vaguely remember having a similar
> issue a while back and switching to cglib based proxies because JDK
> interface proxies didn't seem to cut it. IIRC, all I had to do was add
> cglib to the classpath and add proxy-target-class="true" to the
> <aop:config section of my applicationContext.xml file.

Didn't help, I've got another exception:

2009-01-03 15:53:02,468 ERROR ContextLoader:215 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'employeeDao' defined in file
[C:\java-projects\ems\target\classes\application-context-datasource.xml]:
Cannot create inner bean 'abstractDaoTarget$child#d69502' of type
[pl.org.lenart.ems.persistance.GenericHibernateDaoImpl] while setting
bean property 'target'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'abstractDaoTarget$child#d69502' defined in
file [C:\java-projects\ems\target\classes\application-context-datasource.xml]:
Initialization of bean failed; nested exception is
org.springframework.aop.framework.AopConfigException: Could not
generate CGLIB subclass of class [class
pl.org.lenart.ems.persistance.GenericHibernateDaoImpl]: Common causes
of this problem include using a final class or a non-visible class;
nested exception is java.lang.IllegalArgumentException: Superclass has
no null constructors but no arguments were given
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1244)
[... cut ...]

This GenericHibernateDaoImpl has non-default constructor and use
generics, maybe that's the problem. Anyway I found other solution,
simplest, use full action class name for bean name and it rocks ;-)

Thanks for suggestions!


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message