I'm quite new to OSGi and Spring DM but I've been working with it for a few weeks and this issue has really stumped me.
I'm using the JmsInvokerProxyFactoryBean to remote invoke a DAO service that's running on another server with Hibernate. Currently my client (calling dao) and server (dao) are both started as normal Java programs.
Now I'm working on getting the client to run in an OSGi environment and after working out all of my dependency issues I'm getting a really funky error. I did want to test this in Spring DM Server 2.0 but I can't get it to start my bundles/usr bundles for some reason...
Anyways I have a bean like this:
and another like this:
<property name="serviceInterface" value="com.icarus.pitboss.risk_manager.dao.TraderDataStore"/>
<property name="connectionFactory" ref="connectionFactory"/>
<property name="queue" ref="traderQueue"/>
A few different beans use the traderDataStore as well and all the other referenced beans are in the same file and shouldn't apply to this situation.
<constructor-arg ref="limitDataStore" />
<constructor-arg ref="addLimitDialogFactory" />
Now all of the above runs if I package up the program in a jar and run it with a normal Spring ApplicationContextLoader. However when I drop it into my OSGi server I get the following error:
Unfortunately I'm not that great with Spring so I don't quite get how to analyse this. From what I can tell, in this situation Spring would create a Proxy class that extends my TraderDataStore interface and fills in the calls with all of it's wonderful Springey goodness... but the mechanism for this transformation is beyond the scope of my Spring knowledge. Since I have no clue how this "works" I can't guess as to why it is breaking...
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'addLimitDialogFactory' defined in URL [bundleentry://87/META-INF/spring/bundle-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.icarus.pitboss.risk_manager.dao.TraderDataStore]: Could not convert constructor argument value of type [org.springframework.jms.remoting.JmsInvokerProxyFactoryBean] to required type [com.icarus.pitboss.risk_manager.dao.TraderDataStore]: Failed to convert value of type [org.springframework.jms.remoting.JmsInvokerProxyFactoryBean] to required type [com.icarus.pitboss.risk_manager.dao.TraderDataStore]; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.springframework.jms.remoting.JmsInvokerProxyFactoryBean] to required type [com.icarus.pitboss.risk_manager.dao.TraderDataStore]: no matching editors or conversion strategy found
Ideas? Need more info?
Sorry, OSGi and Spring DM (Server) have been kicking my butt so I may have omitted some important information. Thanks in advance!