Bug 780178 - (SOA-2553) java.lang.ClassCastException: com.sun.xml.ws.client.sei.SEIStub executing ESB quickstarts against CXF
java.lang.ClassCastException: com.sun.xml.ws.client.sei.SEIStub executing ESB...
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
5.1.0.ER3
Unspecified Unspecified
high Severity high
: ---
: 5.1.0 GA,5.1.0.ER5
Assigned To: Julian Coleman
http://jira.jboss.org/jira/browse/SOA...
:
: SOA-2613 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-08 08:42 EST by Kevin Conner
Modified: 2011-02-08 09:46 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-08 09:46:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SOA-2553 Major Closed java.lang.ClassCastException: com.sun.xml.ws.client.sei.SEIStub executing ESB quickstarts against CXF 2015-05-14 23:01:16 EDT

  None (edit)
Description Kevin Conner 2010-11-08 08:42:15 EST
Workaround Description: Remove the jaxws-rt and jaxws-tools jars from soap.esb.
project_key: SOA

[java] Exception in thread "main" java.lang.ClassCastException: com.sun.xml.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.ClientProxy
     [java] at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93)
     [java] at org.jboss.test.ws.jaxws.samples.wssecurity.client.WSSClient.setupWsse(WSSClient.java:74)
     [java] at org.jboss.test.ws.jaxws.samples.wssecurity.client.WSSClient.getEndpointPort(WSSClient.java:64)
     [java] at org.jboss.test.ws.jaxws.samples.wssecurity.client.WSSClient.main(WSSClient.java:50) 

This is caused by the existence of the jaxws-rt and tools jars within soap.esb.

Two possible solutions
- remove them as part of the CXF installation
- find an alternative mechanism to pass them in to wise
Comment 1 Kevin Conner 2010-11-08 08:42:34 EST
Link: Added: This issue is related to SOA-2440
Comment 2 Martin Vecera 2010-12-01 09:29:52 EST
Please note that those two jar files contain some important classes like WsImport Ant task needed by some quickstarts.
Comment 3 Kevin Conner 2010-12-01 09:43:34 EST
Only the wise ones, as far as I am aware.  Do you know of others?
Comment 4 Kevin Conner 2010-12-01 13:05:03 EST
Link: Added: This issue is duplicated by SOA-2613
Comment 5 Martin Vecera 2010-12-02 04:44:55 EST
Ok, you are right. I did not find any others...
Comment 6 Kevin Conner 2010-12-03 05:18:13 EST
The issue is one of classpath ordering in that the base-build.xml was not updated to include the cxf jars.
Comment 7 Kevin Conner 2010-12-03 05:22:38 EST
Link: Added: This issue depends JBESB-3540
Comment 8 Kevin Conner 2010-12-03 05:29:58 EST
Now that the classpath is fixed it looks like wise no longer uses those files, we may be able to remove them after all.
Comment 9 Kevin Conner 2010-12-03 06:20:40 EST
Spoke too soon, there are explicit loads of "com.sun.xml.ws.spi.ProviderImpl" within the WSDynamicClient so, although it is using the CXF classes to import (once velocity.jar is installed), it is still forcing a load of the sun class.

Will try to disable this using AOP and see if the velocity.jar and AOP is sufficient to get wise working.
Comment 10 Kevin Conner 2010-12-03 06:22:22 EST
Another issue would be the output generated on the console.

11:06:47,541 INFO  [STDOUT] Loading FrontEnd jaxws ...
11:06:47,556 INFO  [STDOUT] Loading DataBinding jaxb ...
11:06:48,657 INFO  [STDOUT] wsdl2java
11:06:48,657 INFO  [STDOUT]  -compile
11:06:48,657 INFO  [STDOUT]  -d
11:06:48,658 INFO  [STDOUT]  /tmp/src/HelloWorldWS
11:06:48,658 INFO  [STDOUT]  -p
11:06:48,658 INFO  [STDOUT]  org.jboss.soa.esb.samples.quickstart.webservice_consumer_wise.generated
11:06:48,659 INFO  [STDOUT]  -verbose
11:06:48,659 INFO  [STDOUT]  -classdir
11:06:48,659 INFO  [STDOUT]  /tmp/HelloWorldWS
11:06:48,659 INFO  [STDOUT]  file:/tmp/Wise8.xml
11:06:48,660 INFO  [STDOUT] wsdl2java - Apache CXF 2.2.6-patch-01
Comment 11 Kevin Conner 2010-12-03 07:08:32 EST
I ran the wise tests by copying in the velocity.jar file and leaving the jaxws-rt ones, all worked.

Will assign this to Julian to update the installation script for that jar.
Comment 12 Julian Coleman 2010-12-03 10:47:01 EST
Resolved with revision 7509 of:

  build-tools/builders/eap/post-patch/patch_cxf_installer_macros.xml
  build-tools/builders/eap/resource/patch_macros.xsl

Commit message:

  SOA-2553
  Patch CXF installer to copy velocity.jar to .../<profile>/deploy/soap.esb.
Comment 13 Julian Coleman 2010-12-03 10:47:01 EST
Labels: Added: rn-not-needed
Comment 14 Laura Bailey 2010-12-16 20:00:57 EST
Release Notes Docs Status: Added: Not Required
Comment 16 Darrin Mison 2011-01-04 19:14:33 EST
Writer: Added: dlesage

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