0

我正在尝试在 karaf 中运行一个 cxf 包。它说缺少包 org.apache.ws.commons.schema 但已安装了相应的包(servicemix 包)

如果捆绑 785 (xmlschema) 被激活,我不知道为什么依赖关系没有解决。我需要包含其他内容还是有某种配置问题?

OSGi>features:install idb
Refreshing bundles org.springframework.jms (104)
Error executing command: Could not start bundle 
mvn:org.apache.cxf/cxf-bundle-minimal/2.2.9 in feature(s)
 cxf-bundle-minimal-2.6.0: Unresolved constraint in bundle
 org.apache.cxf.bundle-minimal [832]: Unable to resolve 832.0:
 missing requirement [832.0] package;
 (&(package=org.apache.ws.commons.schema)(version>=1.4.0)(!(version>=2.0.0)))

OSGi>osgi:info 785

Apache ServiceMix Bundles: xmlschema-1.4.3 (785)
------------------------------------------------
OSGi>osgi:headers 785

Apache ServiceMix Bundles: xmlschema-1.4.3 (785)
------------------------------------------------
Manifest-Version = 1.0
Bnd-LastModified = 1237594240914
Tool = Bnd-0.0.255
Built-By = gnodet
Build-Jdk = 1.5.0_16
Created-By = Apache Maven Bundle Plugin

Bundle-Vendor = The Apache Software Foundation
Bundle-Name = Apache ServiceMix Bundles: xmlschema-1.4.3
Bundle-DocURL = http://www.apache.org/
Bundle-Description = This bundle simply wraps xmlschema-1.4.3.jar.
Bundle-SymbolicName = org.apache.servicemix.bundles.xmlschema
Bundle-Version = 1.4.3.1
Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2

Import-Package = 
javax.xml.namespace,
javax.xml.parsers,
javax.xml.transform,
javax.xml.transform.dom,
javax.xml.transform.sax,
javax.xml.transform.stream,
org.apache.ws.commons.schema;version=1.4.3,
org.apache.ws.commons.schema.constants;version=1.4.3,
org.apache.ws.commons.schema.extensions;version=1.4.3,
org.apache.ws.commons.schema.resolver;version=1.4.3,
org.apache.ws.commons.schema.utils;version=1.4.3,
org.w3c.dom,
org.xml.sax
Export-Package = 
org.apache.ws.commons.schema.resolver;uses:=org.xml.sax;version=1.4.3,
org.apache.ws.commons.schema.utils;
    uses:="org.apache.ws.commons.schema,
        javax.xml.namespace,
        org.w3c.dom";
    version=1.4.3,
org.apache.ws.commons.schema;
    uses:="org.xml.sax,
        javax.xml.namespace,
        org.w3c.dom,
        javax.xml.transform,
        org.apache.ws.commons.schema.extensions,
        javax.xml.transform.dom,
        javax.xml.transform.sax,
        org.apache.ws.commons.schema.resolver,
        org.apache.ws.commons.schema.utils,
        javax.xml.parsers,
        org.apache.ws.commons.schema.constants,
        javax.xml.transform.stream";
    version=1.4.3,
org.apache.ws.commons.schema.constants;
    uses:=javax.xml.namespace;
    version=1.4.3,
org.apache.ws.commons.schema.extensions;
    uses:="org.apache.ws.commons.schema,
        javax.xml.namespace,
        org.w3c.dom";
    version=1.4.3
4

2 回答 2

0

您使用的 CXF 版本似乎很旧。你能用最新的 CXF 版本测试吗?顺便提一句。你用的是什么 Karaf 版本?

于 2012-05-29T10:35:52.300 回答
0

首先,bundle 785 (xmlschema-1.4.3) 的状态是什么?如果状态为resolved或者active,就ok了;如果它只是“安装”,那么它就有问题,它导出的包在系统中不可用。

其次,检查由 bundle 785 导入的包是谁提供的。(org.w3c.dom 等) 您可能会遇到以下情况:如果 bundle idb 从一个来源导入例如 org.w3c.dom,而 xmlschema-1.4.3 从其中导入它们另一个(例如同时提供不同的版本,或者框架本身和一些额外的包都提供它),那么框架将不会使用来自 xmlschema-1.4.3 的包解析 idb 包,因为这会导致ClassCastException 稍后。

于 2012-05-30T09:14:59.893 回答