AEM 6.0 Web 控制台捆绑包(OSGi 捆绑包)中安装的包未正确安装(状态应为活动未安装)
Posted
技术标签:
【中文标题】AEM 6.0 Web 控制台捆绑包(OSGi 捆绑包)中安装的包未正确安装(状态应为活动未安装)【英文标题】:Package Installed in AEM 6.0 Web Console Bundles (OSGi Bundles) is Not Installing Properly (Status Should be Active not Installed) 【发布时间】:2015-08-10 11:06:19 【问题描述】:请帮助我解决我试图在 AEM Web Console Bundles of AEM 6.0 中安装/上传 recruitment-client-1.0.0.jar 和status 只是 “Installed” 应该是 “Active”,所以当我尝试在 Actions 列下点击 play 时,状态仍然是“Installed”并且有一个 日志文件中的错误如下所示。
*仅供参考,它以前在 CQ5 服务器实例中工作过。
org.apache.felix.http.jetty %bundles.pluginTitle:无法启动(org.osgi.framework.BundleException:使用违反约束。无法解析捆绑修订 com。.wcm.recruitment-client [407.0 ] 因为它通过两个依赖链暴露于包修订版 org.apache.felix.framework [0] 和 com..commons.axissosgi.commons.axissosgi [402.1] 中的包“javax.xml.namespace”。
链 1:
com.**.wcm.recruitment-client [407.0] 导入:(osgi.wiring.package=javax.xml.namespace) | 导出:osgi.wiring.package=javax.xml.namespace org.apache.felix.framework [0]
链 2:
com..wcm.recruitment-client [407.0] 导入:(osgi.wiring.package=org.apache.axis) | 导出:osgi.wiring.package=org.apache.axis;使用:=javax.xml.namespace 导出:osgi.wiring.package=javax.xml.namespace com..commons.axissosgi.commons.axissosgi [402.1]) org.osgi.framework.BundleException:使用约束冲突。无法解析捆绑修订 com..wcm.recruitment-client [407.0],因为它暴露于捆绑修订 org.apache.felix.framework [0] 和 com 中的包“javax.xml.namespace”。.commons.axissosgi.commons.axissosgi [402.1] 通过两个依赖链。
链 1:
com.**.wcm.recruitment-client [407.0] 导入:(osgi.wiring.package=javax.xml.namespace) | 导出:osgi.wiring.package=javax.xml.namespace org.apache.felix.framework [0]
链 2:
com..wcm.recruitment-client [407.0] 导入:(osgi.wiring.package=org.apache.axis) | 导出:osgi.wiring.package=org.apache.axis;使用:=javax.xml.namespace 导出:osgi.wiring.package=javax.xml.namespace com..commons.axissosgi.commons.axissosgi [402.1]
另外,这就是它在 OSGi 包中的样子。
** recruitment webservice clientcom.**.wcm.recruitment-client
Symbolic Name com.**.wcm.recruitment-client
Version 1.0.1.SNAPSHOT
Bundle Location inputstream:recruitment-client-1.0.1-SNAPSHOT.jar
Last Modification Wed Jun 03 19:33:00 CST 2015
Start Level 20
Bundle Classpath .,recruitment-ws-1.0.0.jar
Exported Packages com.**.recruitment.client,version=1.0.1.SNAPSHOT
com.**.recruitment.ws,version=1.0.1.SNAPSHOT
Imported Packages com.**.recruitment.client from com.**.wcm.recruitment-client (469)
com.**.recruitment.ws from com.**.wcm.recruitment-client (469)
com.**.wcm.config from com.**.wcm.**-wcm-cq5-core (446)
javax.xml.namespace from com.**.commons.axissosgi.commons.axissosgi (456)
javax.xml.rpc from com.**.commons.axissosgi.commons.axissosgi (456)
javax.xml.rpc.encoding from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.client from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.constants from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.description from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.encoding from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.encoding.ser from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.soap from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.utils from com.**.commons.axissosgi.commons.axissosgi (456)
org.osgi.framework,version=[1.6,2) from org.apache.felix.framework (0)
org.slf4j,version=[1.6,2) from slf4j.api (22)
Manifest Headers Bnd-LastModified: 1433331172696
Build-Jdk: 1.7.0_55
Built-By: 55954
Bundle-Activator: com.**.recruitment.Activator
Bundle-ClassPath: ., recruitment-ws-1.0.0.jar
Bundle-ManifestVersion: 2
Bundle-Name: ** recruitment webservice client
Bundle-SymbolicName: com.**.wcm.recruitment-client
Bundle-Version: 1.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Embed-Dependency: *; scope=compile|runtime
Embedded-Artifacts: recruitment-ws-1.0.0.jar; g="com.**.wcm"; a="recruitment-ws"; v="1.0.0"
Export-Package: com.**.recruitment.client; uses:="com.**.recruitment.ws"; version="1.0.1.SNAPSHOT", com.**.recruitment.ws; uses:="org.apache.axis.description, org.apache.axis.encoding, org.apache.axis.encoding.ser, javax.xml.namespace, javax.xml.rpc, org.apache.axis.client, org.apache.axis, org.apache.axis.constants, org.apache.axis.utils, org.apache.axis.soap, javax.xml.rpc.encoding"; version="1.0.1.SNAPSHOT"
Import-Package: com.**.recruitment.client, com.**.recruitment.ws, com.**.wcm.config, javax.xml.namespace, javax.xml.rpc, javax.xml.rpc.encoding, org.apache.axis, org.apache.axis.client, org.apache.axis.constants, org.apache.axis.description, org.apache.axis.encoding, org.apache.axis.encoding.ser, org.apache.axis.soap, org.apache.axis.utils, org.osgi.framework; version="[1.6, 2)", org.slf4j; version="[1.6, 2)"
Manifest-Version: 1.0
Service-Component: OSGI-INF/com.**.recruitment.client.impl.RecruitmentServiceImpl.xml
Tool: Bnd-1.50.0
谢谢
【问题讨论】:
【参考方案1】:似乎javax.xml.namespace
已被另一个捆绑包部署。你应该在你的设置中排除它。在您的 pom.xml 中,将配置添加到 maven-bundle-plugin
。像这样的
...
<Import-Package>
!javax.xml.namespace,
*
</Import-Package>
...
【讨论】:
【参考方案2】:调整您的导出包定义以不导出其他捆绑包提供的包,如果您缺少一些依赖项,请尝试解决它们。
【讨论】:
以上是关于AEM 6.0 Web 控制台捆绑包(OSGi 捆绑包)中安装的包未正确安装(状态应为活动未安装)的主要内容,如果未能解决你的问题,请参考以下文章
启动捆绑包时缺少要求 osgi.wiring.package
YouTube API - Oauth2 流程(OSGI 捆绑包)