Affects: Release Notes Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A000000A70pUIAR&sfdc.override=1 project_key: JBPAPP6 When running a standalone client via JBoss modules like so: {noformat} java -jar $JBOSS_HOME/jboss-modules.jar -mp $JBOSS_HOME/modules/ -cp ws-client.jar -dep org.jboss.ws.cxf.jbossws-cxf-client com.redhat.gss.ws.TestClient {noformat} it seems that there are a few dependencies that are missing that should be included in the org.jboss.ws.cxf.jbossws-cxf-client module. {noformat} file:/Users/klape/support/00677182/InBandSOAPHeader.wsdl Exception in thread "main" java.lang.LinkageError: ClassCastException: attempting to castjar:file:/Users/klape/jboss/product-distributions2/modules/javax/xml/ws/api/main/jboss-jaxws-api_2.2_spec-2.0.1.Final-redhat-1.jar!/javax/xml/ws/spi/Provider.classtojar:file:/Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Classes/classes.jar!/javax/xml/ws/spi/Provider.class at javax.xml.ws.spi.Provider.provider(Provider.java:94) at javax.xml.ws.Service.<init>(Service.java:56) at javax.xml.ws.Service.create(Service.java:680) at com.redhat.gss.ws.TestClient.main(InBandSHClient.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.modules.Module.run(Module.java:270) at org.jboss.modules.Main.main(Main.java:294) {noformat} It also seems to want to use the JDK's web service stack as well. If I make the following changes, it works (and uses JBossWS-CXF): {noformat} diff --git a/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml b/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml index 80e7c7a..94669ee 100644 --- a/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml +++ b/modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml @@ -36,7 +36,8 @@ <!-- JAXB API + REF IMPL --> <module name="javax.xml.bind.api" export="true"/> <module name="com.sun.xml.bind" export="true" services="export"/> - <module name="javax.xml.ws.api" /> + <module name="javax.xml.ws.api" export="true"/> + <module name="javax.jws.api" export="true"/> <!-- WSDL4J API --> <module name="javax.wsdl4j.api" export="true"/> <!-- JBossWS API --> {noformat}
Hi Kyle, I've been doing checks and verified I can run a plain jaxws client like this by having the following entry in the manifest: Dependencies: javax.xml.ws.api,javax.jws.api,org.jboss.logging IOW, jaxws and jws api dependencies only (which makes sense, given you're using them). This should be what we promote to the customers. For customers willing to add jbws-cxf specific apis, the org.jboss.ws.cxf.jbossws-cxf-client module can be *added* to the above. I'm most probably going to add the jws and jaxws dependencies export to the jbossws-cxf-client module (as that's an aggregate module for simplifying module dependencies), but please check the approach with jaxws and jws apis only is working for you too. Thanks.
btw, for the records, the reason why we need to set the dependencies on the jaxws and jws apis is because we want to use the JBossWS (Apache CXF based) JAXWS implementation. The same client above can be run specifying no ws dependencies at all, but the JDK internal jaxws impl is used.
Link: Added: This issue relates to JBWS-3531
Alessio, I tried the following in my manifest: {noformat} Dependencies: javax.jws.api,javax.xml.ws.api,org.jboss.logging {noformat} {noformat} Dependencies: javax.jws.api,javax.xml.ws.api,org.jboss.logging,org.jboss.ws.cxf.jbossws-cxf-client {noformat} Both of those worked in both EAP 6.0.0 and AS 7.2.0 Alpha-snapshot.
good, thanks for confirmation
Link: Added: This issue is a dependency of JBPAPP-9438
Verified on EAP 601 ER2 Expected content is present in modules/org/jboss/ws/cxf/jbossws-cxf-client/main/module.xml {code} <module name="javax.xml.ws.api" export="true"/> <module name="javax.jws.api" export="true"/> {code}
Does this need a release note for EAP 6.0.1? If so, the issue needs to be re-opened and the release notes flags set (Affects Release Notes, Not Yet Documented). If not, the issue needs to be re-opened and the release notes flag set to "Release notes not required".
Updating the release notes fields.
Release Notes Docs Status: Added: Needs More Info
Writer: Added: tomwells
Writer: Removed: tomwells Added: sgilda
Alessio or Rostislav, does this JIRA need a release note?
Affects: Added: Release Notes
Release Notes Text: Added: Some web service dependencies were missing from the org.jboss.ws.cxf.jbossws-cxf-client module that resulted in java.lang.Linkage ClassCastExceptions when running a standalone client using the jboss-modules.jar. The required dependencies were added to the module definition to resolve this issue.
Richard or Alessio, Could you please let me know if the "Release Notes Text" I added correctly states the issue? Thanks Sande
The release note is fine, thanks.
Release Notes Docs Status: Removed: Needs More Info Added: Documented as Resolved Issue
Thanks Alessio.
Release Notes Text: Removed: Some web service dependencies were missing from the org.jboss.ws.cxf.jbossws-cxf-client module that resulted in java.lang.Linkage ClassCastExceptions when running a standalone client using the jboss-modules.jar. The required dependencies were added to the module definition to resolve this issue. Added: Some web service dependencies were missing from the `org.jboss.ws.cxf.jbossws-cxf-client` module that resulted in `java.lang.Linkage ClassCastExceptions` when running a standalone client using the `jboss-modules.jar`. The required dependencies were added to the module definition to resolve this issue.
Closing, RN contain text for JBPAPP-9609. Fix already verified.
Release Notes Docs Status: Removed: Documented as Resolved Issue Writer: Removed: sgilda Release Notes Text: Removed: Some web service dependencies were missing from the `org.jboss.ws.cxf.jbossws-cxf-client` module that resulted in `java.lang.Linkage ClassCastExceptions` when running a standalone client using the `jboss-modules.jar`. The required dependencies were added to the module definition to resolve this issue. Docs QE Status: Removed: NEW