Bug 900750 (JBPAPP6-867) - Need additional dependencies in jbossws-cxf-client module
Summary: Need additional dependencies in jbossws-cxf-client module
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBPAPP6-867
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Services
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 6.0.1
Assignee: Richard Opalka
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBP...
Whiteboard:
Depends On:
Blocks: JBPAPP6-978
TreeView+ depends on / blocked
 
Reported: 2012-08-01 13:39 UTC by Kyle Lape
Modified: 2013-11-30 15:17 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-01 10:08:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP6-867 0 Major Closed Need additional dependencies in jbossws-cxf-client module 2013-08-09 05:53:35 UTC
Red Hat Issue Tracker JBWS-3531 0 Major Closed Provide testcase for jboss-modules enabled clients 2013-08-09 05:53:34 UTC

Description Kyle Lape 2012-08-01 13:39:20 UTC
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}

Comment 1 Alessio Soldano 2012-08-03 08:59:15 UTC
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.

Comment 2 Alessio Soldano 2012-08-03 09:02:57 UTC
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.

Comment 3 Alessio Soldano 2012-08-03 09:09:54 UTC
Link: Added: This issue relates to JBWS-3531


Comment 4 Kyle Lape 2012-08-03 14:31:13 UTC
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.


Comment 5 Alessio Soldano 2012-08-03 14:36:40 UTC
good, thanks for confirmation

Comment 6 Richard Opalka 2012-08-10 11:40:38 UTC
Link: Added: This issue is a dependency of JBPAPP-9438


Comment 7 Rostislav Svoboda 2012-10-04 09:32:48 UTC
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}

Comment 8 sgilda 2012-10-04 13:41:11 UTC
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".


Comment 9 Tom WELLS 2012-10-09 07:10:22 UTC
Updating the release notes fields.

Comment 10 Tom WELLS 2012-10-09 07:10:22 UTC
Release Notes Docs Status: Added: Needs More Info


Comment 11 Dana Mison 2012-10-16 07:00:26 UTC
Writer: Added: tomwells


Comment 12 Dana Mison 2012-10-16 07:02:46 UTC
Writer: Removed: tomwells Added: sgilda


Comment 13 sgilda 2012-10-18 11:54:39 UTC
Alessio or Rostislav, does this JIRA need a release note?

Comment 14 Dana Mison 2012-10-19 04:40:11 UTC
Affects: Added: Release Notes


Comment 15 sgilda 2012-10-23 16:16:34 UTC
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.


Comment 16 sgilda 2012-10-23 16:18:09 UTC
Richard or Alessio, 

Could you please let me know if the "Release Notes Text" I added correctly states the issue?

Thanks
Sande

Comment 17 Alessio Soldano 2012-10-23 16:53:31 UTC
The release note is fine, thanks.

Comment 18 sgilda 2012-10-23 18:58:28 UTC
Release Notes Docs Status: Removed: Needs More Info Added: Documented as Resolved Issue


Comment 19 sgilda 2012-10-23 18:58:43 UTC
Thanks Alessio.

Comment 20 Dana Mison 2012-10-29 05:53:18 UTC
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.


Comment 21 Rostislav Svoboda 2012-11-01 10:08:34 UTC
Closing, RN contain text for JBPAPP-9609. Fix already verified.

Comment 22 Anne-Louise Tangring 2012-11-13 20:07:40 UTC
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 



Note You need to log in before you can comment on or make changes to this bug.