Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Felix Bundle Start Error ( osgi.wiring.package; (osgi.wiring.package=javax.annotation)))n

Avatar

Level 4

Hi All,

I have created an AEM project structure using Maven Archtype : 10, My core bundle is not able to start.

PFA error log and screenshot FYR.

 

04.10.2016 16:40:10.995 *ERROR* [qtp15392481-271] org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Unresolved constraint in bundle demo.core [602]: Unable to resolve 602.3: missing requirement [602.3] osgi.wiring.package; (osgi.wiring.package=javax.annotation))
org.osgi.framework.BundleException: Unresolved constraint in bundle demo.core [602]: Unable to resolve 602.3: missing requirement [602.3] osgi.wiring.package; (osgi.wiring.package=javax.annotation)
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4095)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2114)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)
    at org.apache.felix.webconsole.internal.core.BundlesServlet.doPost(BundlesServlet.java:365)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:555)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager$3.run(OsgiManager.java:459)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:455)
    at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:336)
    at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:297)
    at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:115)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
    at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:108)
    at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:80)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:46)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
    at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)
    at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)
    at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:497)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)

5 Replies

Avatar

Community Advisor

Dear Krish,

If you have AEM 6.1 with SP2 installed, you should add additional maven dependency in your OSGi pom:
 

<dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> <version>1</version> </dependency>


Regards,

Peter

Avatar

Level 4

PuzanovsP wrote...

Dear Krish,

If you have AEM 6.1 with SP2 installed, you should add additional maven dependency in your OSGi pom:
 

  1. <dependency>
  2. <groupId>javax.inject</groupId>
  3. <artifactId>javax.inject</artifactId>
  4. <version>1</version>
  5. </dependency>


Regards,

Peter

 

Hi ,

Still I am getting the same error and my bundle is not yet started

 

04.10.2016 17:40:16.350 *ERROR* [qtp15392481-285] org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Unresolved constraint in bundle demo.core [602]: Unable to resolve 602.9: missing requirement [602.9] osgi.wiring.package; (osgi.wiring.package=javax.annotation))
org.osgi.framework.BundleException: Unresolved constraint in bundle demo.core [602]: Unable to resolve 602.9: missing requirement [602.9] osgi.wiring.package; (osgi.wiring.package=javax.annotation)
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4095)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2114)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:977)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:964)

Avatar

Community Advisor

Hi,

Can you make sure that you have installed latest code.

E.g. login to http://localhost:4502/system/console/bundles and install the bundle manually choose the recompiled jar(from file system).

Regards,

Peter

Avatar

Employee

Can you compare it with the sample project (result branch). Always make sure that the uber-jar is mentioned as first dependency.

Project: https://github.com/heervisscher/l318/blob/result/lasvegas/core/pom.xml

Avatar

Level 1

I also faced similar error while upgrading from AEM 6.3 to 6.5 SP4. 

 

Error Log -

24.03.2020 15:09:40.573 *ERROR* [qtp1041007297-2360] org.apache.felix.http.jetty %bundles.pluginTitle: 
Cannot start (org.osgi.framework.BundleException: Unable to resolve com.XXX.XXXX.XXX [590](R 590.0):
missing requirement [com.XXX.XXX.XXX [590](R 590.0)] osgi.wiring.package;
(&(osgi.wiring.package=javax.xml.namespace)(version>=0.0.0)(!(version>=1.0.0)))
Unresolved requirements: [[com.XXX.XXX.XXX [590](R 590.0)]
osgi.wiring.package; (&(osgi.wiring.package=javax.xml.namespace)(version>=0.0.0)(!(version>=1.0.0)))])
org.osgi.framework.BundleException: Unable to resolve com.XXX.XXX.XXX [590](R 590.0): missing requirement

 

Reason - 

As you see in the error log above, Bundle Exception is due to failed OSGI Wiring. Version of javax.xml.namespace is not suffiecient or compatible enough. 

 

Solution -