dev@glassfish.java.net

Help, please: Failed to start Bundle

From: Jason Lee <jason.d.lee_at_oracle.com>
Date: Mon, 11 Jul 2011 16:22:00 -0500

Can someone help with my OSGi bundle load failure? Here's my
osgi.bundle file:

-exportcontents: \
                         org.glassfish.admingui.pluginprototype.plugins; \
                         
org.glassfish.admingui.pluginprototype.plugins.hk2; \
                         hk2; \
                         version=${project.osgi.version}

Import-Package: \
                         org.jvnet.hk2.annotations; \
                         org.jvnet.hk2.component; \
                         com.sun.hk2.component; \
                         javax.faces.bean; \
                         org.glassfish.admingui.pluginprototype.hk2;

And here's the error log. Any ideas?

[#|2011-07-11T16:05:27.325-0500|SEVERE|glassfish3.1.1|org.apache.catalina.core.ContainerBase|_ThreadID=17;_ThreadName=Thread-4;|ContainerBase.addChild:
start:
org.apache.catalina.LifecycleException: java.lang.RuntimeException:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
java.util.concurrent.ExecutionException:
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
     at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
     at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
     at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2002)
     at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1653)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
     at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
     at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
     at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
     at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
     at
com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
     at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
     at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
     at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
     at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
     at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException:
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
java.util.concurrent.ExecutionException:
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
     at
org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
     at
com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
     at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
     ... 38 more
Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION
FAILED! java.util.concurrent.ExecutionException:
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)
     at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
     ... 41 more
Caused by: javax.faces.FacesException:
java.util.concurrent.ExecutionException:
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at
com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:433)
     at
com.sun.faces.config.processor.AbstractConfigProcessor.processAnnotations(AbstractConfigProcessor.java:326)
     at
com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:337)
     at
com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
     at
com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
     at
com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
     at
com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222)
     at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
     ... 42 more
Caused by: java.util.concurrent.ExecutionException:
com.sun.enterprise.module.ResolveError: Failed to start Bundle Id
[204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
     at java.util.concurrent.FutureTask.get(FutureTask.java:83)
     at
com.sun.faces.config.ConfigManager.getAnnotatedClasses(ConfigManager.java:429)
     ... 49 more
Caused by: com.sun.enterprise.module.ResolveError: Failed to start
Bundle Id [204] State [INSTALLED]
  [org.glassfish.admingui.plugin-hk2(Plugin Example - HK2):1.0.0.SNAPSHOT]
     at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177)
     at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344)
     at
com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124)
     at com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111)
     at
com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135)
     at
com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:76)
     at org.jvnet.hk2.component.Habitat$5.get(Habitat.java:701)
     at java.util.AbstractList$Itr.next(AbstractList.java:345)
     at
org.glassfish.admingui.pluginprototype.hk2.Hk2PluginLookup.getPlugins(Hk2PluginLookup.java:46)
     at
org.glassfish.admingui.pluginprototype.hk2.Hk2AnnotationScanner.getAnnotatedClasses(Hk2AnnotationScanner.java:33)
     at
com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:843)
     at
com.sun.faces.config.ConfigManager$AnnotationScanTask.call(ConfigManager.java:795)
     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at
com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:350)
     ... 42 more
Caused by: org.osgi.framework.BundleException: Unresolved constraint in
bundle org.glassfish.admingui.plugin-hk2 [204]: Unable to resolve 204.0:
missing requirement [204.0] package;
(&(package=com.sun.hk2.component)(version>=1.6.0))
     at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
     at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
     at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
     at
org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
     ... 56 more
|#]