Our initial approach was to copy OSGI ready spring jars into our Target Platform directory, and add each of the spring dependencies (org.springframework.beans-3.1.3.RELEASE.jar, org.springframework.context-3.1.3.RELEASE.jar) as Eclipse Registered buddies to our applicaton jars. When we did that, we got this error when Spring tries to load our DataControllerModule, which is annotated with @Configuration and instantiates our beans:
GUI studio error: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: com.foo.datacontroller.internal.DataControllerModule; nested exception is java.io.FileNotFoundException: class path resource [com/foo/datacontroller/internal/DataControllerModule.class] cannot be opened because it does not exist at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:293) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:227) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:623) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
We think there must be an easier way to get our jars working with Spring OSGI jars in our GUI, but we are stumped at the moment. We would be grateful if a forum member could point us to some relevant documentation that might help us sort out the classloader relationships, or even tell us we are barking up the wrong tree if that is the case. Thank you in advance for your time.