osgi.wiring.package=com.day.cq.wcm.api | Community
Skip to main content
Level 2
October 16, 2015
Solved

osgi.wiring.package=com.day.cq.wcm.api

  • October 16, 2015
  • 5 replies
  • 2568 views

I get an exception when starting the server on an already installed bundle 

osgi.wiring.package=com.day.cq.wcm.api

It looks like the bundle is started after the com.day.cq.wcm.api bundle is started or initialized. If the instance is started, I can upload my bundle without any problem.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ogill

Hi Bert,

with OSGI it is the Import- and Export-Package dependencies that determine the start order, in this way the framework will not start your bundles until it's dependencies are available. However, something seems to be going wrong with your code. Although Karaf related, [1] gives a good overview. 

Please humor me and import into your bundle declaration all the packages that the gemotrixx system has; for a 5.6.1 system I see 5 imports.

Regards,

Opkar

[1] http://stackoverflow.com/questions/11574166/what-is-the-natural-start-order-for-package-dependent-osgi-bundles-under-karaf

5 replies

edubey
Level 10
October 16, 2015
Have you included this jar in your maven pom.xml ? Use embed dependency if you haven't
smacdonald2008
Level 10
October 16, 2015

So to clarify - the bundle works fine when you install it using Felix console? 

Level 2
October 16, 2015

Yes when installing in the console all works fine, no errors. When I restart the instance again, I get this problem, strange thing is, for example the geometrixx core bundle has the same import, but that starts without any problem. I looed into that bundle to see difference but there are none.

Level 2
October 16, 2015

I've now investigated some further, it is the first import that fails, now stripped the bundle to a minimum and then I get 

Unable to resolve 500.0: missing requirement [500.0] osgi.wiring.package; (&(osgi.wiring.package=org.apache.sling.api)(version>=2.3.0)(!(version>=3.0.0)))

When I install it is is fine, but restarting gives this error, when I look up the bundle it is all fine, except for not starting

             
Exported Packagescom.adobe.consulting,version=0.0.1
Imported Packagesorg.apache.sling.api,version=[2.3,3) from org.apache.sling.api (66)
Manifest HeadersBnd-LastModified: 1438752725532
Build-Jdk: 1.7.0_67
Built-By: bert.heikamp
Bundle-Description: test
Bundle-ManifestVersion: 2
Bundle-Name: test
Bundle-SymbolicName: efocus.test
Bundle-Version: 0.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: com.adobe.consulting; version="0.0.1"; uses:="org.apache.sling.api"
Import-Package: org.apache.sling.api; version="[2.3, 3)"
Manifest-Version: 1.0
Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"
Tool: Bnd-2.4.1.201501161923
ogillAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi Bert,

with OSGI it is the Import- and Export-Package dependencies that determine the start order, in this way the framework will not start your bundles until it's dependencies are available. However, something seems to be going wrong with your code. Although Karaf related, [1] gives a good overview. 

Please humor me and import into your bundle declaration all the packages that the gemotrixx system has; for a 5.6.1 system I see 5 imports.

Regards,

Opkar

[1] http://stackoverflow.com/questions/11574166/what-is-the-natural-start-order-for-package-dependent-osgi-bundles-under-karaf