|Virgo 3.6.1 + Spring 3.2.2 + org.springframework.osgi.core [message #1053702]
||Tue, 07 May 2013 10:09
| Maarten Winkels
Registered: May 2013
I'm new to using Virgo and my main goal is to transform a standard Web application running on Tomcat to run on Virgo (OSGi) to use shared lib and shared service features.
The Web application I'm deploying is using Spring 3.2.2 with Java @Configuration.
When I deployed the app on Virgo 3.6.1 it had problems loading the @Configuration classes: The CLib classes could not be found on the classpath. After googling the internet I found that I would have to upgrade the Spring bundles in the Virgo user region to 3.2.2 to make this work. I follow this FAQ to upgrade to 3.2.2, but ran into problems com.springsource.org.aspectj.weaver-1.7.1.RELEASE.jar (as described in the FAQ): Virgo would no longer start and it would show this message in the log
!ENTRY org.eclipse.virgo.medic 4 0 2013-05-07 03:24:10.573
!MESSAGE FrameworkEvent ERROR
org.osgi.framework.BundleException: The bundle "org.eclipse.virgo.medic_3.6.1.RELEASE " could not be resolved. Reason: Missing Constraint: Import-Package: org.aspectj.lang; version="[1.6.12,2.0.0)"
...and then a whole lot more missing constraints.
I had already changed the configuration files as specified in the FAQ. I also tried upgrading to com.springsource.org.aspectj.weaver-1.7.2.RELEASE.jar, but to no avail.
After downgrading to com.springsource.org.aspectj.weaver-1.6.12.RELEASE.jar everything seemed to work ok: I could deploy a bundle depending spring 3.2.2 and exporting a service. YEAH!
Now I tried to use the service in a WAR. I added
to the manifest, but then I got the following error:
nstallation of bundle '...' failed. org.eclipse.virgo.nano.deployer.api.core.DeploymentException: Unable to satisfy dependencies of bundle '...' at version '...': Import-Bundle with symbolic name 'org.springframework.osgi.core' in version range '[0.0.0, oo)' could not be satisfied
and indeed if I run the packages org.springframework.osgi.core on osgi console it turns up empty.
Now I've installed bundle spring-osgi-core 1.2.1 from EBR (and spring-osgi-io 1.2.1 for good measure) in the user region, but now I run into the following error:
Unexpected exception parsing XML document from class path resource [...-context.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.springframework.osgi.config.OsgiNamespaceHandler] for namespace .../schema/osgi] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
It is trying to parse a spring context which imports the osgi service using <osgi:reference .../> but apparently cannot find the correct classes for the namespace handler.
At this point I'm not sure what to do. The only option I see is to update the spring framework in the kernel space as well, but I'm not sure what problems I will run into next...
Any pointers as to how to use spring 3.2.2 with osgi reference injection on virgo (3.6.1)?
Powered by FUDForum
. Page generated in 0.04874 seconds