You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by mv...@comcast.net on 2010/09/21 21:09:41 UTC

Possible bug in felix framework 3.0.1 and/or Maven bundle plugin 2.1.0


All, 



A null pointer error is generated on deployment of a package in the felix-framework-3.0.1 if a package in either Export-Package or Import-Package has a "version=null".  



I believe Felix should deploy the package and resolve the version number to the default 0.0.0 and produce a Warning log message stating that "package x have a version number =null, setting version package to 0.0.0". 



One way this happens is when using variable substitution in the <Export-Package> or <Import-Package> declarations of the maven-bundle-plugin. 



An example from a pom.xml file: 



<properties> 

   <myPackage.version>9.8.0-SNAPSHOT</myPackage.version> 

</properties> 



and then in the import directive: 



myPackage;version="${mmmyPackage.version}", 



Because of the mispelling, the plugin cannot resolve the substitution and simply says version=null. 



I believe the maven-bundle-plugin should halt and throw an error stating "myPackage version is null" or something helpful like that. 



v/r, 



Mike Van 

Re: Possible bug in felix framework 3.0.1 and/or Maven bundle plugin 2.1.0

Posted by "Richard S. Hall" <he...@ungoverned.org>.
  I just created a bundle which has:

     Export-Package: org.foo; version=null

When I install it, I get a NumberFormatException, which is correct in 
this case. Granted, there error message doesn't give much indication of 
where it came from, but that is a different issue...

-> richard

On 9/21/10 15:09, mvangeertruy@comcast.net wrote:
>
> All,
>
>
>
> A null pointer error is generated on deployment of a package in the felix-framework-3.0.1 if a package in either Export-Package or Import-Package has a "version=null". 
>
>
>
> I believe Felix should deploy the package and resolve the version number to the default 0.0.0 and produce a Warning log message stating that "package x have a version number =null, setting version package to 0.0.0".
>
>
>
> One way this happens is when using variable substitution in the<Export-Package>  or<Import-Package>  declarations of the maven-bundle-plugin.
>
>
>
> An example from a pom.xml file:
>
>
>
> <properties>
>
>     <myPackage.version>9.8.0-SNAPSHOT</myPackage.version>
>
> </properties>
>
>
>
> and then in the import directive:
>
>
>
> myPackage;version="${mmmyPackage.version}",
>
>
>
> Because of the mispelling, the plugin cannot resolve the substitution and simply says version=null.
>
>
>
> I believe the maven-bundle-plugin should halt and throw an error stating "myPackage version is null" or something helpful like that.
>
>
>
> v/r,
>
>
>
> Mike Van
>

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