这是场景:
我有2个捆绑轴1.4和它们的传递依赖(它们各自调用不同的Web服务来完成他们的工作).
似乎当一个人在另一个人之前加载时,另一个捆绑包“失败”,除了这个例外:
java.lang.RuntimeException: java.lang.ClassCastException: org.apache.axis.transport.http.HTTPSender cannot be cast to org.apache.axis.Handler
我已经挖掘了一下轴代码,看起来它实际上正在进行一些不与OSGi(Class.forName类型的东西)混合的类加载但是因为轴嵌入在两个包中(并且每个包都有它自己的classloader)我不明白为什么他们会成为一个问题.
以下是更多例外情况:
Caused by: java.lang.ClassCastException: org.apache.axis.transport.http.HTTPSender cannot be cast to org.apache.axis.Handler
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.mycompany.myappname.webserviceclient.MyAppNameWebservicePortBindingStub.getAllSiteInformations(MyAppNameWebservicePortBindingStub.java:1603)
at com.mycompany.myappname.webserviceclient.MyAppNameWebserviceProxy.getAllSiteInformations(MyAppNameWebserviceProxy.java:164)
at com.mycompany.application.myappnamedisplay.view.MetadataTreeCompositeHolder.buildMetadataTree(MetadataTreeCompositeHolder.java:102)
... 51 more
Caused by: java.lang.ClassCastException: org.apache.axis.transport.http.HTTPSender cannot be cast to org.apache.axis.Handler
at org.apache.axis.deployment.wsdd.WSDDTargetedChain.makeNewInstance(WSDDTargetedChain.java:157)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:274)
at org.apache.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:260)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getTransport(WSDDDeployment.java:410)
at org.apache.axis.configuration.FileProvider.getTransport(FileProvider.java:257)
at org.apache.axis.AxisEngine.getTransport(AxisEngine.java:332)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:163)
... 59 more
我用谷歌搜索了一下,我似乎找不到任何东西 – 我几乎希望在这里得到另一个风滚草徽章,但是再一次也许有人知道这里发生了什么?
提前致谢.