Apache Karaf 2.2.3,功能启动问题
Karaf 2.2.3 最近发布,终于有了预捆绑的 spring-jms 功能。为了让生活变得轻松,我将其添加到具有其他默认值的 featuresBoot 配置属性中:
featuresBoot=config,ssh,management,spring-jms
但是,当我启动 Karaf 时,它的行为无法控制。有时它会在启动时安装,有时则不会。当它没有自动安装时,我尝试通过命令行添加它:
features:install spring-jms
即使这样的行为也很疯狂。参见下文:
karaf@root> features:install spring-jms
Error executing command: java.lang.IllegalArgumentException
karaf@root> features:install spring-jms
Error executing command: invalid entry size (expected 3293 but got 16823 bytes)
karaf@root> features:install spring-jms
Error executing command: Manifest not present in the first entry of the zip mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_5
karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)
Error executing command: Could not start bundle mvn:org.eclipse.jetty/jetty-client/7.4.5.v20110725 in feature(s) jetty-7.4.5.v20110725: Unresolved constraint in bundle org.eclipse.jetty.client [83]: Unable to resolve 83.0: missing requirement [83.0] package; (&(package=org.eclipse.jetty.http)(version>=7.4.0)(!(version>=8.0.0)))
karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)
这些是安装命令的连续执行。最后一次执行有效。
还有其他人看到这种行为吗?或者知道如何纠正吗?
Karaf 2.2.3 recently released and finally has a pre-bundled spring-jms feature. In order to make life easy I added it to the featuresBoot config property with the other defaults:
featuresBoot=config,ssh,management,spring-jms
However, when I start Karaf it behaves uncontrollably. Sometimes it will install on boot and other times it doesn't. When it doesn't auto-install I attempt to add it via the command line:
features:install spring-jms
And even that behaves wildly. See below:
karaf@root> features:install spring-jms
Error executing command: java.lang.IllegalArgumentException
karaf@root> features:install spring-jms
Error executing command: invalid entry size (expected 3293 but got 16823 bytes)
karaf@root> features:install spring-jms
Error executing command: Manifest not present in the first entry of the zip mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.aopalliance/1.0_5
karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)
Error executing command: Could not start bundle mvn:org.eclipse.jetty/jetty-client/7.4.5.v20110725 in feature(s) jetty-7.4.5.v20110725: Unresolved constraint in bundle org.eclipse.jetty.client [83]: Unable to resolve 83.0: missing requirement [83.0] package; (&(package=org.eclipse.jetty.http)(version>=7.4.0)(!(version>=8.0.0)))
karaf@root> features:install spring-jms
Refreshing bundles org.springframework.context.support (50)
Those are back-to-back executions of the install command. The last execution works.
Anyone else see this behavior? Or know how to correct it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Tony,
首先,请确保您使用的是正确版本的 Java,我使用 jdk 1.6_24。使用此功能时,在未安装其他捆绑包(全新安装)的情况下,它可以正确安装。如果我是你我会:
1) 尝试安装 Karaf 的新实例,
2)将您的maven存储库复制到新位置,并且
3) 在全新安装中运行 Karaf,
4)再次安装spring-jms。
如果这不起作用,请回复此并让我了解您的环境,以及 karaf 日志文件中生成的所有异常。
Tony,
First, make sure that you are using the correct version Java, I use jdk 1.6_24. When using this, with no other bundles installed (a fresh installation), it installs properly. If I were you I would:
1) try installing a fresh instance of Karaf,
2) copy your maven repository to a new location, and
3) run Karaf in a fresh installation,
4) install spring-jms again.
If that doesn't work, reply to this and let me know your environment, along with all of the exceptions generated in your karaf log file.
您是否有可能使用自定义的 org.ops4j.pax.url.mvn.cfg?我是,它导致了一个巨大的启动时间竞争条件问题,导致功能偶尔无法加载。
看看 https://issues.apache.org/jira/browse/KARAF-910 “FeatureService 和 ConfigAdmin 之间争夺 mvn: URL 解析?”
By any chance are you using a customized org.ops4j.pax.url.mvn.cfg? I am, and it has caused a huge boot-time race condition problem that led to features sporadically failing to load.
Take a look at https://issues.apache.org/jira/browse/KARAF-910 "Race between FeatureService and ConfigAdmin for resolving mvn: URLs?"