Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Different behaviour when deploying a bundle in a watched repo/pickup
Different behaviour when deploying a bundle in a watched repo/pickup [message #635897] Thu, 28 October 2010 14:30 Go to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hello guys,

I'm trying to deploy bundles to Virgo by putting them into the repository/usr folder. I changed the config so that this folder will be scanned by Virgo every 5 seconds for new bundles. As soon as Virgo recognizes some (not all) of my bundles I get the following message in the console (Eclipse).

[2010-10-28 16:01:12.366] Thread-15                    <RP0080E> Artifact 'com.saxonica.enterprise_9.2.1.2.jar' not recognized as type 'bundle' by repository 'usr' and has been ignored. 


The same bundles that don't work for the watched repository folder can successfully be installed by dropping them in the pickup folder. However it looks like that for some reason Virgo cannot determine the correct version number of this bundle.

[2010-10-28 16:01:30.393] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'com.saxonica.enterprise_9.2.1.2.jar'. 
[2010-10-28 16:01:31.649] fs-watcher                   <DE0000I> Installing bundle 'com.saxonica.enterprise_9.2.1.2' version '0.0.0'. 
[2010-10-28 16:01:33.307] fs-watcher                   <DE0001I> Installed bundle 'com.saxonica.enterprise_9.2.1.2' version '0.0.0'. 
[2010-10-28 16:01:33.316] fs-watcher                   <DE0004I> Starting bundle 'com.saxonica.enterprise_9.2.1.2' version '0.0.0'. 
[2010-10-28 16:01:33.320] start-signalling-2           <DE0005I> Started bundle 'com.saxonica.enterprise_9.2.1.2' version '0.0.0'.


In the past I was using plain Equinox 3.5.x - 3.7.x without any problems. When running these bundles inside Equinox everything works fine.

osgi> ss
13	ACTIVE      com.saxonica.enterprise_9.2.1.2
	            Fragments=1, 2, 10

osgi> headers 13
Bundle headers:
 Bundle-ManifestVersion = 2
 Bundle-Name = Saxonica Enterprise XSLT/XQuery
 Bundle-RequiredExecutionEnvironment = JavaSE-1.6
 Bundle-SymbolicName = com.saxonica.enterprise
 Bundle-Version = 9.2.1.2
 Export-Package = com.saxonica;version="9.2.1.2",com.saxonica.config;version="9.2.1.2",com.saxonica.deploy;version="9.2.1.2",com.saxonica.extfn;version="9.2.1.2",com.saxonica.extra;version="9.2.1.2",com.saxonica.fsa ...
 Import-Package = javax.servlet;version="2.5.0";resolution:=optional,javax.servlet.http;version="2.5.0" ...
 Manifest-Version = 1.0


Here is the MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Saxonica Enterprise XSLT/XQuery
Bundle-SymbolicName: com.saxonica.enterprise
Bundle-Version: 9.2.1.2
Export-Package: com.saxonica;version="9.2.1.2",com.saxonica.config;ver
 sion="9.2.1.2",com.saxonica.deploy;version="9.2.1.2",com.saxonica.ext
 fn;version="9.2.1.2",com.saxonica.extra;version="9.2.1.2",com.saxonic
 a.fsa;version="9.2.1.2",com.saxonica.hof;version="9.2.1.2",com.saxoni
 ca.jaxp;version="9.2.1.2",com.saxonica.ptree;version="9.2.1.2",com.sa
 xonica.pull;version="9.2.1.2",com.saxonica.query11;version="9.2.1.2",
 com.saxonica.schema;version="9.2.1.2",com.saxonica.sdoc;version="9.2.
 1.2",com.saxonica.stream;version="9.2.1.2",com.saxonica.stream.action
 ;version="9.2.1.2",com.saxonica.stream.om;version="9.2.1.2",com.saxon
 ica.update;version="9.2.1.2",com.saxonica.validate;version="9.2.1.2",
 com.saxonica.xsltextn;version="9.2.1.2",javax.xml.xquery;version="9.2
 .1.2",net.sf.saxon;version="9.2.1.2",net.sf.saxon.charcode;version="9
 .2.1.2",net.sf.saxon.codenorm;version="9.2.1.2",net.sf.saxon.dom;vers
 ion="9.2.1.2",net.sf.saxon.event;version="9.2.1.2",net.sf.saxon.evpul
 l;version="9.2.1.2",net.sf.saxon.expr;version="9.2.1.2",net.sf.saxon.
 functions;version="9.2.1.2",net.sf.saxon.instruct;version="9.2.1.2",n
 et.sf.saxon.java;version="9.2.1.2",net.sf.saxon.number;version="9.2.1
 .2",net.sf.saxon.om;version="9.2.1.2",net.sf.saxon.option.dom4j;versi
 on="9.2.1.2",net.sf.saxon.option.exslt;version="9.2.1.2",net.sf.saxon
 .option.jdom;version="9.2.1.2",net.sf.saxon.option.local;version="9.2
 .1.2",net.sf.saxon.option.xom;version="9.2.1.2",net.sf.saxon.pattern;
 version="9.2.1.2",net.sf.saxon.pull;version="9.2.1.2",net.sf.saxon.qu
 ery;version="9.2.1.2",net.sf.saxon.regex;version="9.2.1.2",net.sf.sax
 on.s9api;version="9.2.1.2",net.sf.saxon.sort;version="9.2.1.2",net.sf
 .saxon.style;version="9.2.1.2",net.sf.saxon.sxpath;version="9.2.1.2",
 net.sf.saxon.tinytree;version="9.2.1.2",net.sf.saxon.trace;version="9
 .2.1.2",net.sf.saxon.trans;version="9.2.1.2",net.sf.saxon.tree;versio
 n="9.2.1.2",net.sf.saxon.type;version="9.2.1.2",net.sf.saxon.value;ve
 rsion="9.2.1.2",net.sf.saxon.xpath;version="9.2.1.2",net.sf.saxon.xqj
 ;version="9.2.1.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: javax.servlet;version="2.5.0";resolution:=optional,jav
 ax.servlet.http;version="2.5.0";resolution:=optional,javax.xml.dataty
 pe,javax.xml.namespace,javax.xml.parsers,javax.xml.stream,javax.xml.s
 tream.events,javax.xml.transform,javax.xml.transform.dom,javax.xml.tr
 ansform.sax,javax.xml.transform.stream,javax.xml.validation,javax.xml
 .xpath,org.w3c.dom,org.w3c.dom.ls,org.xml.sax,org.xml.sax.ext,org.xml
 .sax.helpers


Usually I use the Eclipse function "New Plug-in from Existing Jar Archives" to make 3rd party libraries OSGi-ready and haven't had any problems with plain Equinox so far. Does anyone of you have any clue what might be wrong here?

Cheers
Frieder
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #635906 is a reply to message #635897] Thu, 28 October 2010 15:05 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
This is odd. It seems like the manifest is not being parsed properly and we are falling back to treating the bundle either as if it had an empty manifest or perhaps a OSGi R3 manifest.

Please check serviceability/logs/log.log for exceptions or other error messages.

I tried your manifest in a bundle on its own and it worked fine:
[2010-10-28 16:02:57.165] fs-watcher                   <HD0001I> Hot deployer processing 'INITIAL' event for file 'saxonica.jar'. 
[2010-10-28 16:02:57.237] fs-watcher                   <DE0000I> Installing bundle 'com.saxonica.enterprise' version '9.2.1.2'. 
[2010-10-28 16:02:57.284] fs-watcher                   <DE0001I> Installed bundle 'com.saxonica.enterprise' version '9.2.1.2'. 
[2010-10-28 16:02:57.309] fs-watcher                   <DE0004I> Starting bundle 'com.saxonica.enterprise' version '9.2.1.2'. 
[2010-10-28 16:02:57.315] start-signalling-4           <DE0005I> Started bundle 'com.saxonica.enterprise' version '9.2.1.2'.


I'll attach the bundle so you can try it.

  • Attachment: saxonica.jar
    (Size: 0.98KB, Downloaded 84 times)
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #636093 is a reply to message #635906] Fri, 29 October 2010 09:41 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi Glyn,

thank you for your response. I tried your bundle but got the same behaviour as before. Then I checked the error log you mentioned and it said something about an invalid signature file digest for the manifest main attributes. The interesting part is that this bundle doesn't have any signature files anymore (actually there was an auto-created signature the first time I deployed the bundle but I removed all of it afterwards). Looks like Virgo was keeping the original bundle information somewhere in a cache. I shut Virgo down, deleted the work folder and started Virgo again. Now everything seems fine. When dropping the bundle (the version from yesterday) in pickup Virgo recognizes the version number, the same goes for dropping the bundle into the repository/usr folder.

Is this a bug or is everything working as intended?

Frieder
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #636624 is a reply to message #636093] Tue, 02 November 2010 09:24 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
It may be a bug if you are talking about replacing a bundle in pickup and Virgo not accurately redeploying the bundle. Can you reproduce this with some bundles you wouldn't mind sharing in a bug report?
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #643322 is a reply to message #636624] Mon, 06 December 2010 14:03 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi Glyn,

sorry for the late response but I was pretty busy the last couple of weeks. I finally had the time to test a bit but was not able to reproduce this weird caching behaviour described above with the stable release of virgo.

Anyway what may be of interest is that I am able to reproduce different deployment behaviours when droping a faulty bundle into the pickup folder or a watched user repository (faulty in this context means an invalid signature file digest for manifest main attributes). When dropping the bundle into the repository folder and starting up virgo I get the following message:

[2010-12-06 14:45:59.540] kernel-dm-5                  <RP0080E> Artifact 'com.saxonica_9.2.1.2.jar' not recognized as type 'bundle' by repository 'usr' and has been ignored. 


When I check the Virgo server console I can see that the bundle has not been installed. Now I drop the same bundle into the pickup folder and I get the following output on the Eclipse console:

[2010-12-06 14:54:58.346] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'com.saxonica_9.2.1.2.jar'. 
[2010-12-06 14:54:58.407] fs-watcher                   <DE0000I> Installing bundle 'com.saxonica_9.2.1.2' version '0.0.0'. 
[2010-12-06 14:54:59.063] fs-watcher                   <DE0001I> Installed bundle 'com.saxonica_9.2.1.2' version '0.0.0'. 
[2010-12-06 14:54:59.070] fs-watcher                   <DE0004I> Starting bundle 'com.saxonica_9.2.1.2' version '0.0.0'. 
[2010-12-06 14:54:59.074] start-signalling-5           <DE0005I> Started bundle 'com.saxonica_9.2.1.2' version '0.0.0'.


This time it gets installed but without a proper version. When I check the Virgo Server Console (with the ss command) I can see the bundle installed with state active. But when I try to use the bundle it fails.

Is it intended that there is a different behaviour depending on the location where the bundle is provided? I attached the bundle that I used along with the error logs for the pickup and the repository approach for you.

Cheers
Frieder
  • Attachment: sample.zip
    (Size: 63.00KB, Downloaded 96 times)
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #643341 is a reply to message #643322] Mon, 06 December 2010 14:49 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Looking at the logs there is an IOException when the bundle is deployed and this should fail the deployment. Would you mind raising a bug?
Re: Different behaviour when deploying a bundle in a watched repo/pickup [message #643541 is a reply to message #635897] Tue, 07 December 2010 10:33 Go to previous message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Done, see Bug 331997
Previous Topic:Eclipse Virgo shutdown
Next Topic:OSGI dependencies
Goto Forum:
  


Current Time: Mon Dec 22 12:48:54 GMT 2014

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

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