| Summary: | IllegalArgumentException (Arguments can not be null) when deploying a simple JAR | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Glyn Normington <glyn.normington> | ||||||||
| Component: | runtime | Assignee: | Glyn Normington <glyn.normington> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | minor | ||||||||||
| Priority: | P3 | CC: | tjwatson | ||||||||
| Version: | 3.5.0.RELEASE | Keywords: | helpwanted | ||||||||
| Target Milestone: | 3.6.0.M02 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Mac OS X | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 219867 [details]
Diagnostics
Created attachment 219868 [details]
Successful bundle
A similar bundle which deploys ok is attached as duup.jar. Apologies for the daft filenames. Flagging as helpwanted since this is likely to be a fairly easy bug to debug and fix. The Equinox method StateObjectFactoryImpl.createBundleDescription is passed a manifest parameter consisting of a Hashtable with entries including: bundle-symbolicname=dup.a bundle-manifestversion=2 and the resultant BundleDescriptionImpl has a null name field which ultimately causes the IllegalArgumentException of this bug. (This is because StateBuilder.createBundleDescription indexes into the manifest Hashtable using Constants.BUNDLE_SYMBOLICNAME, "Bundle-SymbolicName", which doesn't find the entry with key "bundle-symbolicname".) The javadoc for StateObjectFactory.createBundleDescription states: * The manifest should contain String keys and String values which correspond to * proper OSGi manifest headers and values. I cannot ascertain from the OSGi core spec or the manifest format spec (cited by the OSGi core spec) whether manifest header names are case-sensitive or case-insensitive. (In reply to comment #5) > I cannot ascertain from the OSGi core spec or the manifest format spec > (cited by the OSGi core spec) whether manifest header names are > case-sensitive or case-insensitive. The OSGi Core spec indicates that the header keys should be case insensitive. The implementation of StateObjectFactory depends on the Dictionary being passed in to implement case insensitivity. (In reply to comment #6) > (In reply to comment #5) > > I cannot ascertain from the OSGi core spec or the manifest format spec > > (cited by the OSGi core spec) whether manifest header names are > > case-sensitive or case-insensitive. > > The OSGi Core spec indicates that the header keys should be case > insensitive. The implementation of StateObjectFactory depends on the > Dictionary being passed in to implement case insensitivity. Ah, I see. Thanks Tom. Any chance you could add that requirement to the javadoc some time? Fixed by adapting the case insensitive map held in Virgo's representation of the bundle manifest into a case insensitive dictionary and passing that to the StateObjectFactory. Two new adapter classes and tests were added to util which were then utilised in the kernel. |
Created attachment 219866 [details] Failing bundle Deploying the attached dup.jar to the 3.5.0.RELEASE kernel produces the attached stack trace. Changing the manifest of the JAR to use more normal capitalisation appears to fix the problem, although there may be hidden junk in the failing manifest.