Note that there are some explanatory texts on larger screens.

plurals
  1. POstrange interaction with Axis & OSGi
    text
    copied!<p>Here is the scenario:</p> <p>I have 2 bundles with axis 1.4 and it's transitive dependencies embedded in them (they each call a different web service to do their work). </p> <p>It seems that when one loads before the other, the other bundle "loses" with this exception:</p> <pre><code>java.lang.RuntimeException: java.lang.ClassCastException: org.apache.axis.transport.http.HTTPSender cannot be cast to org.apache.axis.Handler </code></pre> <p>I've dug through the axis code a bit and it looks like it is in fact doing some classloading that doesn't jive with OSGi (Class.forName type stuff) but since axis is embedded in both bundles (and each bundle has it's own classloader) I don't see why their would be a problem.</p> <p>Here is more of the exception:</p> <pre><code>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 </code></pre> <p>I've googled this quite a bit and I can't seem to find anything - I almost expect to get another tumbleweed badge here, but then again maybe someone has an idea what's going on here?</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload