1

我想将 glassfish 3.1.2.2 与 OSGI 一起用于我的开发目的。我通过 Web 管理控制台安装了 OSGI Future 包并重新启动了 glassfish。服务器重新启动后,Web 控制台停止工作,只显示一个空白页面,没有任何错误。我查看了一个日志文件,发现下面描述的异常。

我有几个问题:

  1. 如何替换此捆绑包的起始级别以及需要设置的级别?
  2. 如何访问 Apache Felix 的 shell?
  3. 玻璃鱼和卡拉夫是否可以结婚?
[org.glassfish.main.admingui.glassfish-osgi-console-plugin(Glassfish OSGI 控制台插件):3.1.2.1-SNAPSHOT]
    com.sun.enterprise.module.ResolveError:无法启动捆绑 ID [263] 状态 [已解决] [org.glassfish.main.admingui.glassfish-osgi-console-plugin(Glassfish OSGI 控制台插件):3.1.2.1-SNAPSHOT ]
            在 org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:177)
            在 org.jvnet.hk2.osgiadapter.OSGiModuleImpl$2$1$1.loadClass(OSGiModuleImpl.java:344)
            在 com.sun.hk2.component.LazyInhabitant.loadClass(LazyInhabitant.java:124)
            在 com.sun.hk2.component.LazyInhabitant.fetch(LazyInhabitant.java:111)
            在 com.sun.hk2.component.EventPublishingInhabitant.get(EventPublishingInhabitant.java:135)
            在 com.sun.hk2.component.AbstractInhabitantImpl.get(AbstractInhabitantImpl.java:78)
            在 com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:200)
            在 org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:216)
            在 org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:199)
            在 com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:346)
            在 com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:375)
            在 com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:210)
            在 com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:108)
    原因:org.osgi.framework.BundleException:无法启动捆绑包org.glassfish.main.admingui.glassfish-osgi-console-plugin [263],因为它的启动级别为2,大于框架的启动级别1。
            在 org.apache.felix.framework.Felix.startBundle(Felix.java:1807)
            在 org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
            在 org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:169)
            ... 12 更多
4

1 回答 1

1

这是一个众所周知的问题 [1],它已在 GlassFish 主干中得到修复。3.1.x 版本也有一个变通方法。

[1] http://java.net/jira/browse/GLASSFISH-18880

于 2012-10-22T05:05:46.670 回答