You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Raymond Lai <ai...@gmail.com> on 2008/07/23 17:39:07 UTC

Is it a bug? Felix cannot parse Bundle-ManifestVersion having trailing spaces

Hi there,

Been trying out Felix among others to choose one of the OSGi containers. As
per requirement of the project I'll be working on JDO2 API must be used.

The jar I used is @
http://www.ibiblio.org/maven/javax.jdo/jars/jdo2-api-2.1.jar

Knowing JDO2 API is already an OSGi bundle, I tried to install it to Felix,
and started it right away. However when I attempt to start the JDO2 API
bundle from Felix, I got:

org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value:
2 
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:54)
	at org.apache.felix.framework.Felix.createModule(Felix.java:3389)
	at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3332)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2315)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2229)
	at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:132)
	at
org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:121)
	at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
	at
org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3798)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
	at org.apache.felix.framework.Felix.start(Felix.java:849)
	at org.apache.felix.main.Main.main(Main.java:229)
Auto-properties install: org.osgi.framework.BundleException: Could not
create bundle object.
org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value:
2 
	at
org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:54)
	at org.apache.felix.framework.Felix.createModule(Felix.java:3389)
	at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3332)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2315)
	at org.apache.felix.framework.Felix.installBundle(Felix.java:2229)
	at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:132)
	at
org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:143)
	at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
	at
org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3798)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
	at org.apache.felix.framework.Felix.start(Felix.java:849)
	at org.apache.felix.main.Main.main(Main.java:229)

I turns out the problem is from the JDO2 API jar's manifest file,

Bundle-ManifestVersion: 2 

There is a trailing space after the 2.

I wonder I should consider it a bug in Apache Felix (as I found no problem
when I install it as an bundle into Eclipse Equinox), or should I ask the
folks working for the JDO spec to correct this problem?

TIA,
Raymond
-- 
View this message in context: http://www.nabble.com/Is-it-a-bug--Felix-cannot-parse-Bundle-ManifestVersion-having-trailing-spaces-tp18613664p18613664.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Is it a bug? Felix cannot parse Bundle-ManifestVersion having trailing spaces

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Well, by definition, I think it might be an error in their manifest; 
however, I think it makes sense to make Felix more forgiving in some of 
these cases. We do ignore whitespace when parsing other things, so I 
think it would be okay to ignore it here.

I just committed a patch to trunk to call trim() on the manifest version 
string, so it should be working in trunk now.

-> richard

Raymond Lai wrote:
> Hi there,
>
> Been trying out Felix among others to choose one of the OSGi containers. As
> per requirement of the project I'll be working on JDO2 API must be used.
>
> The jar I used is @
> http://www.ibiblio.org/maven/javax.jdo/jars/jdo2-api-2.1.jar
>
> Knowing JDO2 API is already an OSGi bundle, I tried to install it to Felix,
> and started it right away. However when I attempt to start the JDO2 API
> bundle from Felix, I got:
>
> org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value:
> 2 
> 	at
> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:54)
> 	at org.apache.felix.framework.Felix.createModule(Felix.java:3389)
> 	at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3332)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2315)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2229)
> 	at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:132)
> 	at
> org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:121)
> 	at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55)
> 	at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
> 	at
> org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3798)
> 	at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
> 	at org.apache.felix.framework.Felix.start(Felix.java:849)
> 	at org.apache.felix.main.Main.main(Main.java:229)
> Auto-properties install: org.osgi.framework.BundleException: Could not
> create bundle object.
> org.osgi.framework.BundleException: Unknown 'Bundle-ManifestVersion' value:
> 2 
> 	at
> org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:54)
> 	at org.apache.felix.framework.Felix.createModule(Felix.java:3389)
> 	at org.apache.felix.framework.Felix.createBundleInfo(Felix.java:3332)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2315)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2229)
> 	at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:132)
> 	at
> org.apache.felix.main.AutoActivator.processAutoProperties(AutoActivator.java:143)
> 	at org.apache.felix.main.AutoActivator.start(AutoActivator.java:55)
> 	at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
> 	at
> org.apache.felix.framework.Felix$SystemBundleActivator.start(Felix.java:3798)
> 	at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
> 	at org.apache.felix.framework.Felix.start(Felix.java:849)
> 	at org.apache.felix.main.Main.main(Main.java:229)
>
> I turns out the problem is from the JDO2 API jar's manifest file,
>
> Bundle-ManifestVersion: 2 
>
> There is a trailing space after the 2.
>
> I wonder I should consider it a bug in Apache Felix (as I found no problem
> when I install it as an bundle into Eclipse Equinox), or should I ask the
> folks working for the JDO spec to correct this problem?
>
> TIA,
> Raymond
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org