-
1. Re: Help/instructions for installing and using JBoss Spring
marius.bogoevici Oct 25, 2009 11:34 AM (in response to lbrewster)Hi there,
I'm very close to posting the project site for Snowdrop - which is the JBoss project that encompasses the JBoss-Spring integration utilities, so hopefully you'll find there more information about this, but here are some quick pointers.
1) Extract the zip in the deployer folder. So you should see something like this:
<jboss-home>/server//deployer/jboss-spring-3.2.deployer/
2) Make sure that you have a Spring application context in your deployment (the deployer is looking under META-INF/ for a file (or files) that matches *-spring.xml - so jboss-spring.xml, myapp-spring.xml are valid names)
3) If you want to inject Spring beans from those application contexts into EJBs, you need to define @Interceptors(SpringLifecycleInterceptor.class) on the bean class and then use @Spring for each dependency you want to inject. A complete example is available here:
http://anonsvn.jboss.org/repos/jbossas/projects/snowdrop/trunk/documentation/samples/horoscope
Hope that helps,
Marius -
2. Re: Help/instructions for installing and using JBoss Spring
lbrewster Oct 26, 2009 10:02 AM (in response to lbrewster)Marius,
Thanks very much for the quick response. I'll work with the info you provided and hopefully that will get me going. I'll let you know what happens. -
3. Re: Help/instructions for installing and using JBoss Spring
lbrewster Oct 27, 2009 9:15 AM (in response to lbrewster)Marius,
Just wanted to let you know that I was able to get my Hibernate/Spring project working thanks to the information you provided. Thanks -
4. Re: Help/instructions for installing and using JBoss Spring
gerromie Jan 22, 2010 1:39 PM (in response to marius.bogoevici)Can you provide an example of the jboss-spring.xml that's expected? My project is loading spring from web.xml using context-params that are very similar to the example provided in the snowdrop documentation available at http://jboss.org/snowdrop/documentation.html
It's unclear if this is the right solution for us as we've been unable to migrate from JBoss 4.0.5 to newer versions without breaking our spring integration with or without snowdrop. Snowdrop seems to have little or no impact on the error we're experiencing so I am not certain that I haven't followed the instructions completely. I've posted details about the specific failure in the Spring Forums, but have not heard any suggestions on what to change. You can find the thread via the link http://forum.springsource.org/showthread.php?t=83439 I'd appreciate any insight you might be able to lend.
-
5. Re: Help/instructions for installing and using JBoss Spring
alesj Jan 25, 2010 8:20 AM (in response to gerromie)You can find the thread via the link http://forum.springsource.org/showthread.php?t=83439 I'd appreciate any insight you might be able to lend.
This looks like a ClassCastException to me.
Caused by: java.lang.IllegalStateException: Cannot convert value of type [$Proxy667 implementing com.company.appserver.SiteManagementLocal,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.company.appserver.SiteManagementLocal] for property 'siteManagementLocal': no matching editors or conversion strategy found at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:289)
* http://www.docjar.com/html/api/org/springframework/beans/TypeConverterDelegate.java.html
My guess is you have duplicate com.company.appserver.SiteManagementLocal class,
one in .war, the other one in ejb jar.