Hi Devs,

I'm stuck the following problem with Felix , when it runs in the embedded
mode inside an application.

org.osgi.framework.BundleException: Unresolved package in bundle 1: package;
(package=javax.servlet.http)
        at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1699)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1566)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1519)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:354)

My bundle contains all the classes need by it.

I can guarantee that the  servlet  api jar is in the application classpath
with all other necessary jars.  Once bundle, the manifest.mf file contain
the following,

Manifest-Version: 1.0
Built-By: saminda
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: org.wso2.carbon.osgi.bundl1.SampleBundle1
Import-Package: javax.servlet,javax.servlet.http,org.apache.tiles,org.
 apache.tiles.access,org.osgi.framework;version="1.3",org.wso2.carbon.
 action,org.wso2.carbon.osgi.bundl1
Bnd-LastModified: 1203358936124
Export-Package: org.wso2.carbon.osgi.bundl1;uses:="javax.servlet.http,
 org.apache.tiles.access,javax.servlet,org.osgi.framework,org.apache.t
 iles,org.wso2.carbon.action"
Bundle-Version: 1.0.0
Bundle-Description: Demonstrate that OSGi is embedded in Carbon
Bundle-Name: DisplayManager
Build-Jdk: 1.5.0_08
Bundle-ManifestVersion: 2
Bundle-SymbolicName: osgi_bundle1
Tool: Bnd-0.0.227


Why would OSGi can resolve the dependency. Any help would be greatly
appreciated.

Thank you

Saminda


-- 
Saminda Abeyruwan

Senior Software Engineer
WSO2 Inc. - www.wso2.org

Reply via email to