Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo packaged Spring 3 bundles not having all dependencies fulfilled
Virgo packaged Spring 3 bundles not having all dependencies fulfilled [message #911778] Wed, 12 September 2012 09:54 Go to next message
Seth Helstrip is currently offline Seth Helstrip
Messages: 22
Registered: September 2012
Junior Member
Hitting a problem where I'm trying to make use of the included Spring 3 OXM framework within Virgo. The exception is telling me that I need to fulfill the Thoughtworks xstream dependencies of the Spring OXM bundle.

org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: com.thoughtworks.xstream.io.HierarchicalStreamWriter in KernelBundleClassLoader: [bundle=org.springframework.oxm_3.0.5.RELEASE]
	org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
	java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	java.lang.Class.getDeclaredConstructors0(Native Method)
	java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
	java.lang.Class.getDeclaredConstructors(Class.java:1853)...



I've downloaded and installed the Springsource distribution of the xstream dependency, however, when looking at the Spring OXM bundle in the Virgo admin console, it still looks as though the dependency isn't fulfilled, and I'm getting the same exception (above), indicating the same thing.

Do I need to do something to the Virgo server, in order to force it to try and fulfill it's bundles optional dependencies, from other newly installed bundles?

Many thanks in advance.
Re: Virgo packaged Spring 3 bundles not having all dependencies fulfilled [message #911851 is a reply to message #911778] Wed, 12 September 2012 13:01 Go to previous messageGo to next message
Seth Helstrip is currently offline Seth Helstrip
Messages: 22
Registered: September 2012
Junior Member
Think this problem is being caused by the fact that Virgo doesn't seem to be updating the provider for com.thoughtworks.xstream. I think the reason for this is because in the org.springframework.oxm bundle, its import directives for com.thoughtworks.xstream are declared as optional.

Can someone please point me in the right direction?
Re: Virgo packaged Spring 3 bundles not having all dependencies fulfilled [message #911913 is a reply to message #911851] Wed, 12 September 2012 15:17 Go to previous messageGo to next message
Seth Helstrip is currently offline Seth Helstrip
Messages: 22
Registered: September 2012
Junior Member
Solution;-

add the optional dependencies to the ${VIRGO_HOME}/repository/usr/ directory, then restart, using the -clean flag

${VIRGO_HOME}/respository/bin/startup.sh -clean &
Re: Virgo packaged Spring 3 bundles not having all dependencies fulfilled [message #911989 is a reply to message #911913] Wed, 12 September 2012 18:28 Go to previous message
Chris Frost is currently offline Chris Frost
Messages: 230
Registered: January 2010
Location: Southampton, England
Senior Member

You got it.

This is actually a 'feature' of OSGi. Once a bundle has been installed it is not possible to resolve any extra optional dependencies without restarting the bundle. By placing your bundle in one of Virgo's repo it is able to see that it can satisfy one of the optional dependencies of the Spring bundle when Virgo is starting and bring it in.

Hope the explanation helps,
Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Previous Topic:How do you enable MemoryLeakProtection logging with Virgo Server for Apache Tomcat
Next Topic:Import packages in spring dependant bundle question
Goto Forum:
  


Current Time: Fri Oct 24 10:39:59 GMT 2014

Powered by FUDForum. Page generated in 0.03369 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software