On 16 Jul 2014, at 21:34, Christian Schneider <ch...@die-schneider.net> wrote:
> Not sure why it is there. Normally the maven bundle plugin only lists 
> packages that are either referenced from java code or from blueprint.

The manifest shows several embedded libraries, including Spring and various 
Apache commons libraries - one or more of these likely refer to the “bsh” 
package (note the plugin works off bytecode, not Java code).

Depending what features you use from these embedded libraries you probably 
don’t need the “bsh” package [1], in which case you can either exclude it as 
Christian suggests or mark it as optional:

        Import-Package: bsh;resolution:=optional,*

[1] Unfortunately the plugin cannot tell for sure if you need it or not - all 
it knows is that some bytecode in the bundle refers to this package (in this 
case bytecode from one of the embedded libraries).

> If you are sure you do not need it then try Import-Package: !bsh,*
> This way you make sure it is not added.
> 
> Christian
> 
> Am 16.07.2014 22:16, schrieb Nadeem M Nayeck:
>> I am new to OSGi and trying to get my first toy project running. I am
>> having some trouble deploying my first bundle into embedded Felix.
>> 
>> My project is a maven project with the following sub-projects:
>> 1) sensei-main (embedded Felix osgi with 4 bundles deployed:
>>         org.apache.felix.bundlerepository-1.6.6.jar,
>>         org.apache.felix.gogo.command-0.12.0.jar,
>>         org.apache.felix.gogo.runtime-0.10.0.jar,
>>         org.apache.felix.gogo.shell-0.10.0.jar)
>> 2) sensei-common (a re-usable jar with jar dependencies. The pom can be
>> found here: *https://gist.github.com/mnnayeck/284a4c74170db3dfe79d
>> <https://gist.github.com/mnnayeck/284a4c74170db3dfe79d>* )
>> 3) sensei-networking (a *bundle *that uses sensei-common jar. The pom can
>> be found here:* https://gist.github.com/mnnayeck/61a442c1b7df779c362c
>> <https://gist.github.com/mnnayeck/61a442c1b7df779c362c>* )
>> 
>> The generated manifest for the sensei-networking bundle is here:
>> https://gist.github.com/mnnayeck/d802a54e54d9d2cc3fd7
>> 
>> My problem is that I am getting this error when I start the Felix container:
>> 
>> ERROR: Bundle ac.uom.foe.cse.sensei-networking [5] Error starting
>> file:/D:/projects/uom/sensei/trunk/sensei-main/bundle/sensei-networking-1.0.0-SNAPSHOT.jar
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle
>> ac.uom.foe.cse.sensei-networking [5]: Unable to resolve 5.0: missing
>> requirement [5.0] osgi.wiring.package; (osgi.wiring.package=bsh))
>> org.osgi.framework.BundleException: Unresolved constraint in bundle
>> ac.uom.foe.cse.sensei-networking [5]: Unable to resolve 5.0: missing
>> requirement [5.0] osgi.wiring.package; (osgi.wiring.package=bsh)
>>     at
>> org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
>>     at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
>>     at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1291)
>>     at
>> org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)
>> 
>> I don't understand why it is looking for bsh (an optional transitive
>> dependency of spring-context). I don't use it in any of my classes. Why is
>> it even in the Import-Package manifest?
>> 
>> Can anyone help me understand please?
>> 
>> thanks,
>> Nadeem
>> 
> 
> 
> -- 
> Christian Schneider
> http://www.liquid-reality.de
> 
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
> 


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

Reply via email to