[ 
https://issues.apache.org/jira/browse/FELIX-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591658#action_12591658
 ] 

Guillaume Sauthier commented on FELIX-511:
------------------------------------------

Hi

I've got that error a couple of time.

OBR is only working with R4 bundles, but Felix can deploy R3 bundles too.
A part of the deployment with OBR is to check if some of your required packages 
are already loaded on the platform, so OBR analyze the local bundles.

Because some of the local bundles may be R3 bundles (so, they are not requiring 
a BundleSymbolicName for example) and because the ResourceImpl assume that all 
bundles are R4 compliant bundles (with Bundle-SymbolicName), there is a NPE (in 
hashcode or equals).

To be brief, I think the problem do not come from the repository.xml, but from 
the set of already deployed bundles (and some of them are probably R3 bundles).

> NullPointerExcdeption "obr deploy mybundle"
> -------------------------------------------
>
>                 Key: FELIX-511
>                 URL: https://issues.apache.org/jira/browse/FELIX-511
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: maven-bundle-plugin-1.4.0
>         Environment: Mac OS X 10.5.2
>            Reporter: Andrea Chiodoni
>             Fix For: felix-1.0.3
>
>         Attachments: mybundle.zip, repository.xml
>
>
> I've a simple bundle with works if deployed with felix shell install command. 
> When deploying with "obr deploy mybundle" I get:
> -> Unable to execute command: java.lang.NullPointerException
> java.lang.NullPointerException
>         at 
> org.apache.felix.bundlerepository.ResourceImpl.equals(ResourceImpl.java:71)
>         at java.util.Arrays$ArrayList.indexOf(Arrays.java:2384)
>         at java.util.Arrays$ArrayList.contains(Arrays.java:2391)
>         at java.util.AbstractSet.removeAll(AbstractSet.java:146)
>         at 
> org.apache.felix.bundlerepository.ResolverImpl.resolve(ResolverImpl.java:145)
>         at 
> org.apache.felix.bundlerepository.ObrCommandImpl._deploy(ObrCommandImpl.java:322)
>         at 
> org.apache.felix.bundlerepository.ObrCommandImpl.deploy(ObrCommandImpl.java:296)
>         at 
> org.apache.felix.bundlerepository.ObrCommandImpl.execute(ObrCommandImpl.java:110)
>         at 
> org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:265)
>         at 
> org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:167)
>         at java.lang.Thread.run(Thread.java:613)
> SimbolicName and version are on the MANIFEST, which is:
> Manifest-Version: 1.0
> Built-By: Andrea
> Created-By: Apache Maven Bundle Plugin
> Import-Package: ch.chiodoni.sample.osgi.api,org.apache.commons.logging
> Bnd-LastModified: 1204662486566
> Export-Package: ch.chiodoni.sample.osgi.api
> Bundle-Version: 1.0
> Bundle-Name: mybundle
> Build-Jdk: 1.5.0_13
> Private-Package: ch.chiodoni.sample.osgi.impl
> Bundle-DocURL: http://www.chiodoni.ch/
> Bundle-ManifestVersion: 2
> Bundle-Vendor: Chiodoni Information Technology
> Bundle-SymbolicName: ch.chiodoni.sample.osgi.mybundle
> Tool: Bnd-0.0.238
> Deploy from maven repository (with obr deploy) works if 
> org.apache.commons.logging is not used.
> Same exception even with 
> <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
> The doc 
> (http://felix.apache.org/site/apache-felix-osgi-bundle-repository-obr.html#ApacheFelixOSGiBundleRepository%2528OBR%2529-obrdeploy)
>  refers to a -nodeps option which seams to me deprecated because obr help 
> doesn't mention it and because the shell doesn't recconise it:
> -> obr deploy -nodeps  mybundle
> Unknown bundle - -nodeps
> I've tried to install common-logging (OSGi bundle) on the mvn repository using
> mvn org.apache.felix:maven-bundle-plugin:install-file \
>   
> -DpomFile=/Users/Andrea/.m2/repository/org/slf4j/jcl104-over-slf4j/1.4.3/jcl104-over-slf4j-1.4.3.pom
>  \
>   
> -Dfile=/Users/Andrea/Development/spring-osgi-1.0.1/lib/jcl104-over-slf4j-1.4.3.jar
>  
>   
> mvn org.apache.felix:maven-bundle-plugin:install-file \
>   
> -DpomFile=/Users/Andrea/.m2/repository/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.pom
>  \
>   -Dfile=/Users/Andrea/Development/spring-osgi-1.0.1/lib/slf4j-api-1.4.3.jar 
> but still getting the exception.
> Regs, Andrea

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to