2 Replies Latest reply on Sep 12, 2012 5:28 AM by limacon

    JBoss EAP 5.1 - CXF 2.3.1 Client Implementation Issue




      After solving my JBOSS 5.1 EJB issue, I came up with another show stopper.


      We have a webservice module that was generated using CXF 2.3.1 WSDL2JAVA.  The client (another webservice) is throwing a ClassCastException when invoking the WSClient API.


      java.lang.ClassCastException: org.jboss.ws.core.jaxws.spi.ProviderImpl cannot be cast to javax.xml.ws.spi.Provider

      at javax.xml.ws.spi.Provider.provider(Provider.java:43)

      at javax.xml.ws.Service.<init>(Service.java:35)




      (See server1.log)


      This is deployed in our new JBOSS EAP 5.1 Server. This implementation is working in JBOSS EAP 4.3.


      Reading some resolutions online did not help me at all. The closes solution I got is to replace the JAXB API in the JBOSS Lib/endorsed Folder.


      Get latest Jaxb API and put it in Jboss/lib/endorsed folder (delete old jaxb api).








      After doing so, I got a new Exception:

      javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference


      It seems that I have some conflicting JAXB Libraries upon doing so.


      Anyone have the same experience and would like to share some information will be much appreciated.


      Thanks and regards,


        • 1. Re: JBoss EAP 5.1 - CXF 2.3.1 Client Implementation Issue

          Hi Rodel,


          We currently also using cxf version 2.3.1 on jboss 5.1 without problems.


          We generate code from wsdl with the maven cxf-codegen-plugin version 2.5.0.
































          We also using following dependencies regarding jaxb.
















          Maybe you can try to generate the code this way and see if there are differences in the generated code that can explain why your code is not working.

          1 of 1 people found this helpful
          • 2. Re: JBoss EAP 5.1 - CXF 2.3.1 Client Implementation Issue

            Thanks Rene for your quick reply. I have a separate team working on our Maven Implementation but they are stil using Jboss EAP 4.3.  They have not merged my code changes yet regarding JBoss EAP 5.1. If what you mentioned is true, then I may pass them this CXF migration after they have fully completed their Maven Builds.


            I may still need others suggestion who are not using Maven. I need to have some quick R&D regarding this.