java.lang.IllegalArgumentException: A fault with name already exists in this operation

Solution Verified - Updated -

Issue

  • We are using JAX-WS webservice built using CXF and trying to deploy on EAP 6.2.0. It is failing to deploy with the following message,
Caused by: java.lang.IllegalArgumentException: A fault with name [Exception] already exists in this operation
    at org.apache.cxf.service.model.OperationInfo.addFault(OperationInfo.java:147)
    at org.apache.cxf.service.model.UnwrappedOperationInfo.addFault(UnwrappedOperationInfo.java:44)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.addFault(ReflectionServiceFactoryBean.java:2105)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeFaults(ReflectionServiceFactoryBean.java:2073)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createMessageParts(ReflectionServiceFactoryBean.java:1645)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:1013)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createOperation(JaxWsServiceFactoryBean.java:631)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:990)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:481)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:693)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:550)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:265)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:204)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:102)
    at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
    at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
    ... 13 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • JBossWS-CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.