无法在osgi xmlschema包中运行cxf缺失(但已安装)

时间:2012-05-28 11:05:03

标签: osgi cxf

我正在尝试在karaf中运行cxf包。它说org.apache.ws.commons.schema包丢失但是已经安装了适当的bundle(servicemix bundle)

如果捆绑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

2 个答案:

答案 0 :(得分:0)

您使用的CXF版本似乎已经很老了。你能用最新的CXF版本测试吗?顺便说一句。您使用什么Karaf版本?

答案 1 :(得分:0)

首先,捆绑785(xmlschema-1.4.3)的状态是什么? 如果状态已解决或处于活动状态,则可以;如果它只是“安装”,那么它就会出现问题,它导出的软件包在系统中

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