Virgo won't use Velocity 1.7.0, only 1.6.2 [message #819148] |
Mon, 12 March 2012 11:00  |
Eclipse User |
|
|
|
My understanding is that Velocity 1.7.0 is now an OSGi-ifed bundle, but Virgo absolutely won't load it when it's placed into the repository/usr/ directory -- the only version of Velocity I can get Virgo to use is the SpringSource EBR version, which is stuck at 1.6.2 (presumably because the official 1.7.0 is supposed to be fully OSGi-supporting).
The testing I've done is simple -- I put the com.springsource.org.apache.velocity bundle into my repository/usr/ directory and then start Virgo (3.0.2.RELEASE). When I look at my OSGi state, that bundle is loaded -- it's a optional dependency of the org.springframework.web.servlet bundle, which is used by the Virgo splash bundle.
Then, I stop Virgo, move the com.springsource.org.apache.velocity bundle out of my repository/usr/ directory and move the org.apache.velocity version in, and restart Virgo. When I look at my OSGi state, that version is NOT loaded; when I look at org.springframework.web.servlet, it shows that that optional dependency is unsatisfied.
Opening up both JARs and looking at the MANIFEST.MF files, the differences appear to be trivial to my (admittedly-poorly-trained) eye -- some added version numbers in one or the other, some added uses:= conditions, but nothing that obviously should make the official 1.7.0 Velocity bundle not get loaded by Virgo.
Is there something I'm missing? (And to take a step back -- is there some way to debug why a bundle in the repository/usr/ directory doesn't get loaded? I can't seem to find the right place to see that event -- or non-event -- occur.)
Thanks...
|
|
|
Re: Virgo won't use Velocity 1.7.0, only 1.6.2 [message #819162 is a reply to message #819148] |
Mon, 12 March 2012 11:21  |
Eclipse User |
|
|
|
Unfortunately, optional dependencies are totally "soft" and so there are no diagnostics when they cannot be satisfied. If you feel like a bit of JAR surgery, you could carefully zap the Spring web JAR with the dependency to make it mandatory, which should then provoke some useful diagnostics. Perhaps better though would be to deploy a test bundle containing a mandatory dependency similar to the optional dependency in Spring web. When resolution fails, you should get some reasonable diagnostics including an OSGi state dump which you can then analyse offline using the web admin console.
Meanwhile, speculating about possible causes I wonder if the transitive dependencies of Velocity 1.7.0 are somehow incompatible with what's provided in Virgo. You could play spot the difference between the imports of Velocity 1.7.0 and of 1.6.2.
BTW many JARs in the EBR are stuck at a reasonably old version. We do the odd upgrade when absolutely necessary, but we have very little resource to apply to this activity. Meanwhile, we are actively investigating a community replacement for the EBR with other vendors and one of the key requirements is "self service" so that the community can put bundles in rather than having to depend on a single vendor to do this for them.
|
|
|
Powered by
FUDForum. Page generated in 0.06107 seconds