WSO2 EI 6.2.0 CAR部署中断 - NoClassDefFoundError

时间:2018-04-09 19:39:25

标签: wso2 osgi wso2esb osgi-bundle wso2ei

我们有一个项目,我们已经使用WSO2 Enterprise Integrator一年左右。随着时间的推移,实现变得相对复杂,它涉及代理,API,模板,自定义调解器和消息代理的组合。这通过单个CAR部署工件进行部署。公共代码已被共享为WSO2> Extensions> JavaLibraryProject(WSO2 DevStudio)。该库将归档到CAR中:

<artifact name="M2E-Commons" version="1.0.1" type="lib/library/bundle" serverRole="ApplicationServer">
  <file>M2E-Commons-1.0.1.jar</file>
</artifact>

这对我们来说对所有过去的版本都很好,但是在WSO2 EI 6.2.0中被打破了

这是在WSO2 EI 6.1.1上部署日志的开始:

TID: [-1234] [] [2018-04-09 14:33:52,337]  INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Deploying Carbon Application : M2E-CAP_1.0.16.car... {org.wso2.carbon.application.deployer.internal.ApplicationManager}
TID: [-1234] [] [2018-04-09 14:33:52,350]  INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} -  OSGi bundle in file:///opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Commons_1.0.1/M2E-Commons-1.0.1.jar location is about to be installed to Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,351]  INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} -  OSGi bundle M2E-Commons installed to Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,369]  INFO {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer} -  OSGi bundle M2E-Commons successfully started on Carbon Server. {org.wso2.carbon.application.deployer.handler.DefaultAppDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,369]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Device_1.0.0/M2E-Device-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-09 14:33:52,370]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523284432337M2E-CAP_1.0.16.car/M2E-Flic_1.0.0/M2E-Flic-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}

这与部署在WSO2 EI 6.2.0上的CAR相同:

TID: [-1234] [] [2018-04-06 22:29:46,703]  INFO {org.wso2.carbon.application.deployer.internal.ApplicationManager} -  Deploying Carbon Application : M2E-CAP_1.0.16.car... {org.wso2.carbon.application.deployer.internal.ApplicationManager}
TID: [-1234] [] [2018-04-06 22:29:46,810]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-Device_1.0.0/M2E-Device-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-Flic_1.0.0/M2E-Flic-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-M2L_ISS_1.0.0/M2E-M2L_ISS-1.0.0.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,810]  INFO {org.apache.synapse.deployers.ClassMediatorDeployer} -  Deploying Class mediators from file : /opt/wso2ei/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-M2T_1.0.1/M2E-M2T-1.0.1.jar {org.apache.synapse.deployers.ClassMediatorDeployer}
TID: [-1234] [] [2018-04-06 22:29:46,881] ERROR {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer} -  Deployment of the Synapse Artifact from file : /opt/wso2ei-6.2.0/wso2/tmp/carbonapps/-1234/1523053786703M2E-CAP_1.0.16.car/M2E-ISS.LightOff_1.0.0/M2E-ISS.LightOff-1.0.0.xml : Failed! {org.apache.synapse.deployers.AbstractSynapseArtifactDeployer}
  java.lang.NoClassDefFoundError: sk/m2ms/wso2/m2e/M2Mediator

显然,OSGi捆绑M2E-Commons部署没有正确地优先处理,以便在其余工件部署之前启动 - 导致NoClassDefFoundError。

你有什么想法吗? 这可以通过一些符合OSGi的机制/概念来解决吗? 或者这是针对WSO2提交的有效错误?

提前谢谢你, 彼得

1 个答案:

答案 0 :(得分:0)

由于开始排序,因此NoClassDefFoundError之类的错误永远不会发生。这意味着bundle使用包sk.m2ms.wso2.m2e但是既不导入也不包含该包。这是捆绑构造中的一个错误,所以如果这不是你自己构建的捆绑,那么我会建议这确实是一个应该向供应商报告的错误。