Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Osgi Virgo服务器插件冲突解决程序_Osgi_Osgi Bundle_Eclipse Virgo - Fatal编程技术网

Osgi Virgo服务器插件冲突解决程序

Osgi Virgo服务器插件冲突解决程序,osgi,osgi-bundle,eclipse-virgo,Osgi,Osgi Bundle,Eclipse Virgo,我有两个包,A导出两个包,然后B使用这两个包(org.dom4j,org.dom4j.io),B仍然使用其他包导出的spring包。如果我在osgi控制台中加载bundle A,然后加载bundle B,则不存在解析程序问题 但是,如果我把这两个包放在一个PAR中,如果在合成上下文包中失败,说“使用违反: A的舱单: Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: device-openapi Bundle-Symboli

我有两个包,A导出两个包,然后B使用这两个包(org.dom4j,org.dom4j.io),B仍然使用其他包导出的spring包。如果我在osgi控制台中加载bundle A,然后加载bundle B,则不存在解析程序问题

但是,如果我把这两个包放在一个PAR中,如果在合成上下文包中失败,说“使用违反: A的舱单:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: device-openapi
Bundle-SymbolicName: device-openapi
Bundle-Version: 1.0.0
Export-Package: com.google.gson,
 com.google.gson.annotations,
 com.google.gson.internal,
 com.google.gson.internal.bind,
 com.google.gson.reflect,
 com.google.gson.stream,
 org.apache.commons.codec,
 org.apache.commons.codec.binary,
 org.apache.commons.codec.digest,
 org.apache.commons.codec.language,
 org.apache.commons.codec.language.bm,
 org.apache.commons.codec.net,
 org.apache.commons.io,
 org.apache.commons.io.comparator,
 org.apache.commons.io.filefilter,
 org.apache.commons.io.input,
 org.apache.commons.io.monitor,
 org.apache.commons.io.output,
 org.apache.commons.lang3,
 org.apache.commons.lang3.builder,
 org.apache.commons.lang3.concurrent,
 org.apache.commons.lang3.event,
 org.apache.commons.lang3.exception,
 org.apache.commons.lang3.math,
 org.apache.commons.lang3.mutable,
 org.apache.commons.lang3.reflect,
 org.apache.commons.lang3.text,
 org.apache.commons.lang3.text.translate,
 org.apache.commons.lang3.time,
 org.apache.commons.lang3.tuple,
 org.apache.commons.logging,
 org.apache.commons.logging.impl,
 org.apache.http,
 org.apache.http.annotation,
 org.apache.http.auth,
 org.apache.http.auth.params,
 org.apache.http.client,
 org.apache.http.client.config,
 org.apache.http.client.entity,
 org.apache.http.client.methods,
 org.apache.http.client.params,
 org.apache.http.client.protocol,
 org.apache.http.client.utils,
 org.apache.http.concurrent,
 org.apache.http.config,
 org.apache.http.conn,
 org.apache.http.conn.params,
 org.apache.http.conn.routing,
 org.apache.http.conn.scheme,
 org.apache.http.conn.socket,
 org.apache.http.conn.ssl,
 org.apache.http.conn.util,
 org.apache.http.cookie,
 org.apache.http.cookie.params,
 org.apache.http.entity,
 org.apache.http.entity.mime,
 org.apache.http.entity.mime.content,
 org.apache.http.impl,
 org.apache.http.impl.auth,
 org.apache.http.impl.client,
 org.apache.http.impl.conn,
 org.apache.http.impl.conn.tsccm,
 org.apache.http.impl.cookie,
 org.apache.http.impl.entity,
 org.apache.http.impl.execchain,
 org.apache.http.impl.io,
 org.apache.http.impl.pool,
 org.apache.http.io,
 org.apache.http.message,
 org.apache.http.params,
 org.apache.http.pool,
 org.apache.http.protocol,
 org.apache.http.util,
 org.apache.log4j,
 org.apache.log4j.chainsaw,
 org.apache.log4j.config,
 org.apache.log4j.helpers,
 org.apache.log4j.jdbc,
 org.apache.log4j.jmx,
 org.apache.log4j.lf5,
 org.apache.log4j.lf5.util,
 org.apache.log4j.lf5.viewer,
 org.apache.log4j.lf5.viewer.categoryexplorer,
 org.apache.log4j.lf5.viewer.configure,
 org.apache.log4j.net,
 org.apache.log4j.nt,
 org.apache.log4j.or,
 org.apache.log4j.or.jms,
 org.apache.log4j.or.sax,
 org.apache.log4j.pattern,
 org.apache.log4j.rewrite,
 org.apache.log4j.spi,
 org.apache.log4j.varia,
 org.apache.log4j.xml,
 org.dom4j,
 org.dom4j.bean,
 org.dom4j.datatype,
 org.dom4j.dom,
 org.dom4j.dtd,
 org.dom4j.io,
 org.dom4j.jaxb,
 org.dom4j.rule,
 org.dom4j.rule.pattern,
 org.dom4j.swing,
 org.dom4j.tree,
 org.dom4j.util,
 org.dom4j.xpath,
 org.dom4j.xpp,
 org.json,
 org.wcc.crypt,
 org.wcc.framework
Import-Package: javax.crypto,javax.crypto.spec,javax.naming,javax.nami
 ng.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,ja
 vax.net,javax.net.ssl,javax.security.auth.x500
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: NGCPlugin-service
Bundle-SymbolicName: com.myplugin.esdk.storage.service
Bundle-Version: 1.5.50
Bundle-Vendor: myplugin
Bundle-ClassPath: .
Tool: Bundlor 1.1.0.RELEASE
Export-Package: com.myplugin.esdk.storage.mvc,
 com.myplugin.esdk.storage.service.datastore,
 com.myplugin.esdk.storage.service.device,
 com.myplugin.esdk.storage.service.host,
 com.myplugin.esdk.storage.service.mount,
 com.myplugin.esdk.storage.service.resource,
 com.myplugin.esdk.storage.service.snapshot,
 com.myplugin.esdk.storage.service.vm
Import-Package: org.apache.commons.logging,
 org.dom4j,
 org.dom4j.io,
 org.json,org.w3c.dom,
 org.xml.sax,
 org.apache.commons.codec,
 org.apache.commons.codec.binary,
 org.apache.commons.codec.digest,
 org.apache.commons.codec.language,
 org.apache.commons.codec.language.bm,
 org.apache.commons.codec.net,
 org.apache.commons.io,
 org.slf4j,
 org.springframework.beans.factory.annotation
B的舱单:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: device-openapi
Bundle-SymbolicName: device-openapi
Bundle-Version: 1.0.0
Export-Package: com.google.gson,
 com.google.gson.annotations,
 com.google.gson.internal,
 com.google.gson.internal.bind,
 com.google.gson.reflect,
 com.google.gson.stream,
 org.apache.commons.codec,
 org.apache.commons.codec.binary,
 org.apache.commons.codec.digest,
 org.apache.commons.codec.language,
 org.apache.commons.codec.language.bm,
 org.apache.commons.codec.net,
 org.apache.commons.io,
 org.apache.commons.io.comparator,
 org.apache.commons.io.filefilter,
 org.apache.commons.io.input,
 org.apache.commons.io.monitor,
 org.apache.commons.io.output,
 org.apache.commons.lang3,
 org.apache.commons.lang3.builder,
 org.apache.commons.lang3.concurrent,
 org.apache.commons.lang3.event,
 org.apache.commons.lang3.exception,
 org.apache.commons.lang3.math,
 org.apache.commons.lang3.mutable,
 org.apache.commons.lang3.reflect,
 org.apache.commons.lang3.text,
 org.apache.commons.lang3.text.translate,
 org.apache.commons.lang3.time,
 org.apache.commons.lang3.tuple,
 org.apache.commons.logging,
 org.apache.commons.logging.impl,
 org.apache.http,
 org.apache.http.annotation,
 org.apache.http.auth,
 org.apache.http.auth.params,
 org.apache.http.client,
 org.apache.http.client.config,
 org.apache.http.client.entity,
 org.apache.http.client.methods,
 org.apache.http.client.params,
 org.apache.http.client.protocol,
 org.apache.http.client.utils,
 org.apache.http.concurrent,
 org.apache.http.config,
 org.apache.http.conn,
 org.apache.http.conn.params,
 org.apache.http.conn.routing,
 org.apache.http.conn.scheme,
 org.apache.http.conn.socket,
 org.apache.http.conn.ssl,
 org.apache.http.conn.util,
 org.apache.http.cookie,
 org.apache.http.cookie.params,
 org.apache.http.entity,
 org.apache.http.entity.mime,
 org.apache.http.entity.mime.content,
 org.apache.http.impl,
 org.apache.http.impl.auth,
 org.apache.http.impl.client,
 org.apache.http.impl.conn,
 org.apache.http.impl.conn.tsccm,
 org.apache.http.impl.cookie,
 org.apache.http.impl.entity,
 org.apache.http.impl.execchain,
 org.apache.http.impl.io,
 org.apache.http.impl.pool,
 org.apache.http.io,
 org.apache.http.message,
 org.apache.http.params,
 org.apache.http.pool,
 org.apache.http.protocol,
 org.apache.http.util,
 org.apache.log4j,
 org.apache.log4j.chainsaw,
 org.apache.log4j.config,
 org.apache.log4j.helpers,
 org.apache.log4j.jdbc,
 org.apache.log4j.jmx,
 org.apache.log4j.lf5,
 org.apache.log4j.lf5.util,
 org.apache.log4j.lf5.viewer,
 org.apache.log4j.lf5.viewer.categoryexplorer,
 org.apache.log4j.lf5.viewer.configure,
 org.apache.log4j.net,
 org.apache.log4j.nt,
 org.apache.log4j.or,
 org.apache.log4j.or.jms,
 org.apache.log4j.or.sax,
 org.apache.log4j.pattern,
 org.apache.log4j.rewrite,
 org.apache.log4j.spi,
 org.apache.log4j.varia,
 org.apache.log4j.xml,
 org.dom4j,
 org.dom4j.bean,
 org.dom4j.datatype,
 org.dom4j.dom,
 org.dom4j.dtd,
 org.dom4j.io,
 org.dom4j.jaxb,
 org.dom4j.rule,
 org.dom4j.rule.pattern,
 org.dom4j.swing,
 org.dom4j.tree,
 org.dom4j.util,
 org.dom4j.xpath,
 org.dom4j.xpp,
 org.json,
 org.wcc.crypt,
 org.wcc.framework
Import-Package: javax.crypto,javax.crypto.spec,javax.naming,javax.nami
 ng.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,ja
 vax.net,javax.net.ssl,javax.security.auth.x500
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: NGCPlugin-service
Bundle-SymbolicName: com.myplugin.esdk.storage.service
Bundle-Version: 1.5.50
Bundle-Vendor: myplugin
Bundle-ClassPath: .
Tool: Bundlor 1.1.0.RELEASE
Export-Package: com.myplugin.esdk.storage.mvc,
 com.myplugin.esdk.storage.service.datastore,
 com.myplugin.esdk.storage.service.device,
 com.myplugin.esdk.storage.service.host,
 com.myplugin.esdk.storage.service.mount,
 com.myplugin.esdk.storage.service.resource,
 com.myplugin.esdk.storage.service.snapshot,
 com.myplugin.esdk.storage.service.vm
Import-Package: org.apache.commons.logging,
 org.dom4j,
 org.dom4j.io,
 org.json,org.w3c.dom,
 org.xml.sax,
 org.apache.commons.codec,
 org.apache.commons.codec.binary,
 org.apache.commons.codec.digest,
 org.apache.commons.codec.language,
 org.apache.commons.codec.language.bm,
 org.apache.commons.codec.net,
 org.apache.commons.io,
 org.slf4j,
 org.springframework.beans.factory.annotation
错误日志:

Resolver report:
        Uses violation: <Import-Package: org.springframework.beans.factory.annotation; version="0.0.0"> in bundle <com.myplugin.esdk.storage.ngc-2.1.7-com.myplugin.esdk.storage.service_1.5.50[1520387337960]>
             Resolver reported uses conflict for import
        An Import-Package could not be resolved. Resolver error data <Import-Package: com.myplugin.esdk.storage.service.snapshot; version="0.0.0">. Caused by missing constraint in bundle <com.myplugin.esdk.storage.ngc-2.1.7-synthetic.context_2.1.7>
             constraint: <Import-Package: com.myplugin.esdk.storage.service.snapshot; version="0.0.0"> constrained to bundle <com.myplugin.esdk.storage.ngc-2.1.7-com.myplugin.esdk.storage.service> constrained bundle version range "[1.5.50,1.5.50]"
            with attributes {module_scope=com.myplugin.esdk.storage.ngc-2.1.7}
解析器报告:
使用冲突:在bundle中
解析程序报告使用冲突进行导入
无法解析导入包。解析程序错误数据。原因是捆绑包中缺少约束
约束:约束到绑定约束的绑定版本范围“[1.5.50,1.5.50]”
属性为{module_scope=com.myplugin.esdk.storage.ngc-2.1.7}

谁知道怎么解决这个问题?我尝试用一个包来导入一个虚拟包来导入这两个包的所有导出包,在我手工删除了A和B包之后,这是没有解析器错误的……< /P> < P>我不熟悉PAR文件的部署,当使用VIGO我通常部署计划文件。BRIM可能是由于导出了一些包,org。Apache *,可能已经被处女座中包含的其他包导出,这是Spring的依赖关系。因此,当您的PAR被解决时,计划B发现自己处于同一个包从A继承的情况,也通过传递依赖性从Spring继承。是的


我将尝试从清单中移除所有已经由室女座提供的包的出口。< / P>是的,我发现,这是常见的。日志记录,在Spring使用之前,我想,在部署PAR之前,应该已经解决了Spring,并使用了由其他束导出的通用日志,然后当合成束TR。在解析bundle A和bundle B时,会发现,B使用的是spring,spring使用的是原始的commons.logging,因此this commons.logging在它的作用域内,然后是导出的commons.logging,所以在同一作用域内会有两个commons.logging,我认为这应该是导致冲突的原因B bundle可以加载spring并使用spring使用的commons.logging,因此,这很好。Virgo中还包括许多附加的org.apache.*包,HTTP客户端就是其中之一。您不应该重新导出它们,或者至少确保您从A导出的版本正确,从B导入的版本正确,否则系统w我会找两个候选人,随机选择一个,结果不可预测。