Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle?(my fragment bundle seems invisible to Virgo)
icon9.gif  Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #676904] Mon, 06 June 2011 22:12 Go to next message
Jochen Szostek is currently offline Jochen SzostekFriend
Messages: 24
Registered: January 2011
Location: Maasmechelen
Junior Member

Hi all,

I'm having troubles with Virgo picking up my fragment bundle.

I created it following Importing packages into a 3rd party bundle from the FAQ.

In Eclipse "File>New>Bundle Project"

Changed manifest to:

Manifest-Version: 1.0
Bundle-Version: 1.0.0
Bundle-Name: org.springframework.orm_3.0.5.RELEASE_fix
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.prefabosft.org.springframework.orm.fix
Fragment-Host: org.springframework.orm;version="[3.0.5.RELEASE,3.0.5.RELEASE]"
Import-Bundle: com.springsource.javax.persistence;version="[2.0.0.Beta1,2.0.0.Beta1]"
Excluded-Imports: com.springsource.javax.persistence;version="[1.0.0,1.0.0]"


And while deploying (both Debug-on-server from Eclipse as dropping the jar in repository/user) I don't get any sign from Virgo picking it up nor seeing the fragment in the web admin gui.

All comments more than welcome!

Thanks,

Jochen
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #676954 is a reply to message #676904] Tue, 07 June 2011 05:25 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Hi Jochen,

Are there any logs in serviceability that can help diagnose the issue?

Regards,
Hristo Iliev
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #676962 is a reply to message #676954] Tue, 07 June 2011 06:12 Go to previous messageGo to next message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
Hi guys,

I thought the bundles that are deployed to the repository/... folders are only loaded once a bundle from the pickup folder require them. Isn't that correct?

Regards
Frieder
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #676993 is a reply to message #676904] Tue, 07 June 2011 08:39 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
When the repository code scans repositories, such as repository/usr, it may hit problems and log errors.

However, I spotted a problem in the manifest. The correct version attribute for fragment-host is spelled "bundle-version" rather than "version". (I believe Equinox 3.7 supports arbitrary matching attributes on fragment-host, so version will be unmatched and the fragment will not attach to the host.)

Also note that Excluded-Imports is a bundlor template header and has no meaning in a manifest, but should be harmless.
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #676994 is a reply to message #676993] Tue, 07 June 2011 08:43 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Also I added a note, in bold, to the blog entry pointed to by the FAQ as you are not the first person to make this mistake.
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #677030 is a reply to message #676994] Tue, 07 June 2011 11:11 Go to previous messageGo to next message
Jochen Szostek is currently offline Jochen SzostekFriend
Messages: 24
Registered: January 2011
Location: Maasmechelen
Junior Member

Hristo Iliev wrote on Tue, 07 June 2011 01:25
Hi Jochen,

Are there any logs in serviceability that can help diagnose the issue?

Regards,
Hristo Iliev


I know for sure that the serviceability/logs/log.log doesn't record anything...the jar is totally ignored as it seems. (which could be, as Glyn states, because of a malformed manifest)




So this technique is perhaps not suitable for swapping imports from an existing bundle? (and only for adding imports?)

As hacking bundle manifests obviously is not an ideal practice of course. (I'm trying to run a (Spring Roo generated) test webapp inside Virgo, and started dismantling the pom, moving dependencies to the manifest)

Grts
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #677168 is a reply to message #677030] Tue, 07 June 2011 18:48 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

The OSGi specification (3.13 Fragment Bundle) allows appending of import definitions , Require-Bundle entries and export definitions of a Fragment bundle to the host bundle.

There are some restrictions so perhaps you hit one of them (conflicting imports) with what you have in the manifest.

I've tried the scenario but every time I got errors in the logs. Can you create a bug with reproducible scenario where the logs are missing so we can improve the diagnostics?
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #677249 is a reply to message #677168] Tue, 07 June 2011 22:36 Go to previous messageGo to next message
Jochen Szostek is currently offline Jochen SzostekFriend
Messages: 24
Registered: January 2011
Location: Maasmechelen
Junior Member

Hristo Iliev wrote on Tue, 07 June 2011 14:48
The OSGi specification (3.13 Fragment Bundle) allows appending of import definitions , Require-Bundle entries and export definitions of a Fragment bundle to the host bundle.

There are some restrictions so perhaps you hit one of them (conflicting imports) with what you have in the manifest.

I've tried the scenario but every time I got errors in the logs. Can you create a bug with reproducible scenario where the logs are missing so we can improve the diagnostics?


* I created a made a clean install (unzip) of Virgo M5 tomcat.
* Started it in debug. Did a "tail -f" on ../logs/log.log
* Then I deployed my fragment (git://github.com/JochenSzostek/org.springframework.orm_3.0.5.RELEASE_fix.git) using STS
* log file didn't output anything.

The GIT project is minimal as it's only my (probably malformed) manifest actually in an Eclipse project.

Hope that helps, and if not just let me know. I'd be glad to help.

Best wishes,

Jochen

ps: Do you want me to Jira/Bugzilla it somewhere perhaps?
Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #677316 is a reply to message #677249] Wed, 08 June 2011 07:16 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo IlievFriend
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

You may want to try what happens if you just drop your bundle in pickup Smile

Anyway please create a bug for the issue.

[Updated on: Wed, 08 June 2011 08:09]

Report message to a moderator

Re: Importing packages into a 3rd party bundle: Virgo doesn't pick up my fragment bundle? [message #681754 is a reply to message #677316] Thu, 09 June 2011 19:29 Go to previous message
Jochen Szostek is currently offline Jochen SzostekFriend
Messages: 24
Registered: January 2011
Location: Maasmechelen
Junior Member

I created a bug here https://bugs.eclipse.org/bugs/show_bug.cgi?id=348949

Though deployment into pickup did produce logging output:


[2011-06-09 21:25:20.129] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         HD0001I Hot deployer processing 'CREATED' event for file 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT.jar'.
[2011-06-09 21:25:20.130] INFO  fs-watcher                   o.e.virgo.kernel.deployer.hot.HotDeploymentFileSystemListener     ApplicationDeploying path 'D:\dev\server\virgo-tomcat-server-3.0.0.M05\pickup\org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT.jar'.
[2011-06-09 21:25:20.189] INFO  fs-watcher                   o.e.v.k.m.i.deployer.ModelInstallArtifactLifecycleListener        Processing installing event for bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0'
[2011-06-09 21:25:20.193] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0000I Installing bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0'.
[2011-06-09 21:25:20.196] INFO  fs-watcher                   o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator   Calculating missing dependencies of bundle(s) 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0'
[2011-06-09 21:25:20.201] INFO  fs-watcher                   o.e.virgo.kernel.userregion.internal.quasi.DependencyCalculator   The dependencies of '[org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' are '[]'
[2011-06-09 21:25:20.203] INFO  fs-watcher                   o.eclipse.virgo.kernel.model.internal.bundle.ModelBundleListener  Processing installed event for bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT:0.0.0' in region 'org.eclipse.virgo.region.user'
[2011-06-09 21:25:20.205] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0001I Installed bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0'.
[2011-06-09 21:25:20.205] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'BundleDelegatingClassLoader for [Virgo Kernel Deployer (org.eclipse.virgo.kernel.deployer)]' popped and set to 'BundleDelegatingClassLoader for [Virgo Kernel Deploy
er (org.eclipse.virgo.kernel.deployer)]'
[2011-06-09 21:25:20.208] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'BundleDelegatingClassLoader for [Virgo Kernel Deployer (org.eclipse.virgo.kernel.deployer)]' pushed and set to 'KernelBundleClassLoader: [bundle=org.springframework
.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]'
[2011-06-09 21:25:20.208] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' popped and set to 'BundleDelegatingClassLoader for [Virgo Kernel D
eployer (org.eclipse.virgo.kernel.deployer)]'
[2011-06-09 21:25:20.211] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'BundleDelegatingClassLoader for [Virgo Kernel Deployer (org.eclipse.virgo.kernel.deployer)]' pushed and set to 'KernelBundleClassLoader: [bundle=org.springframework
.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]'
[2011-06-09 21:25:20.211] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' pushed and set to 'KernelBundleClassLoader: [bundle=org.springfram
ework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]'
[2011-06-09 21:25:20.212] INFO  fs-watcher                   org.eclipse.virgo.kernel.core.internal.BundleStartTracker         Adding signal 'org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal@273e07bd' for bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0
 [103]'
[2011-06-09 21:25:20.212] INFO  fs-watcher                   o.e.v.k.i.a.internal.AtomicInstallArtifactLifecycleListener       No atomic parent of bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0' in scope 'null' to propagate starting event to
[2011-06-09 21:25:20.213] INFO  fs-watcher                   org.eclipse.virgo.medic.eventlog.default                         DE0004I Starting bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0'.
[2011-06-09 21:25:20.213] INFO  fs-watcher                   org.eclipse.virgo.kernel.core.internal.BundleStartTracker         Non-Spring DM powered bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0 [103]' has started. Driving signals '[org.eclipse.virgo.kernel.install.artifact.internal.AbstractIns
tallArtifact$StateMonitorSignal@273e07bd]'.
[2011-06-09 21:25:20.214] INFO  start-signalling-5           org.eclipse.virgo.kernel.core.internal.BundleStartTracker         Driving signal 'org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal@273e07bd'
[2011-06-09 21:25:20.214] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' popped and set to 'KernelBundleClassLoader: [bundle=org.springfram
ework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]'
[2011-06-09 21:25:20.214] INFO  start-signalling-5           o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' pushed and set to 'KernelBundleClassLoader: [bundle=org.springfram
ework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]'
[2011-06-09 21:25:20.215] INFO  fs-watcher                   o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' popped and set to 'BundleDelegatingClassLoader for [Virgo Kernel D
eployer (org.eclipse.virgo.kernel.deployer)]'
[2011-06-09 21:25:20.216] INFO  start-signalling-5           org.eclipse.virgo.medic.eventlog.default                         DE0005I Started bundle 'org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT' version '0.0.0'.
[2011-06-09 21:25:20.216] INFO  start-signalling-5           o.e.v.k.i.artifact.internal.bundle.BundleThreadContextManager     Thread context class loader 'KernelBundleClassLoader: [bundle=org.springframework.orm_3.0.5.RELEASE_fix-0.0.1-SNAPSHOT_0.0.0]' popped and set to 'KernelBundleClassLoader: [bundle=org.springfram


Hope that helps,

Jochen
Previous Topic: Virgo Kernel 3.0.0.M05 is employing Spring DM extender version 1.2.1
Next Topic:Vaadin + Virgo not working...
Goto Forum:
  


Current Time: Thu Dec 18 13:35:14 GMT 2014

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

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