0 Replies Latest reply on Jun 25, 2015 8:50 AM by jeetu

    Apache-CXF client failing to bind runtime on JBOSS EAP 6.3


      Hi all,


      I have a war deployed on the Jboss EAP 6.3 that has a client jar generated using the "org.jboss.ws.cxf:jbossws-cxf-client" maven plugin. The war is made portable removing any apache-cxf stuff and related dependencies. The war deploys with no issue. It also has rest-easy jax-rs rest services exposed using the rest-easy-jaxb provider. The rest services are stateless ejbs, which calls web services through javaee beans, that creates ports from the webservice client jars included in the war.


      I have attached the contents of the war as a text list for reference.


      It all started, when i wanted one of my rest services to return an xml. I used the @provider to configure "application/xml" content-type and had to include the "rest-easy-jaxb-provider" module in the jboss-deployment-structure.xml. This was smooth and the rest service was returning an xml, but the side effect was the binding of the webservices started failing throwing the following exception


      05:26:11,488 INFO  [stdout] (http-localhost/ Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions

      (Full stack trace attached).


      Up on analyzing quite a bit, i saw the jaxb related jars were included as part of the deployment. Thought they are the issue and removed them from the deployment and made sure that there are no libs that are already provided by EAP are in the deployment. With that done and including the needed modules for apache-cxf in the deployment structure xml also did not resolve the issue.


      What i could see from the logs is that, the context factory that's derived during run-time seems to be wrong. It's taking the jaxb-impl.jar's default ContextFactory.class instead of the CXF-jaxb's JaxBDataBinding.class. Not sure, if i make sense here!.


      Any help is highly appreciated. I have been fighting this battle for three days now.