user2706310
user2706310

Reputation: 51

Error while invoking CXF Web service using camel route in Apache ServiceMix

I am invoking the webservice through a camel route using cxf.

Camel Route :

....
.to("cxf:bean:UWServiceProxy")
....

My CXF Bean entry is as follows -

<cxf:cxfEndpoint id="UWServiceProxy"
        address="http://sqdsql:8001/FirstGen/services/UWWebServiceProxy.UWWebServiceProxyHttpSoap11Endpoint/" 
        endpointName="c:UWWebServiceProxyHttpSoap11Endpoint"
        serviceName="c:UWWebServiceProxy" 
        serviceClass="com.firstapex.pop.uw.webservices.UWWebServiceProxyPortType"
        wsdlURL="http://sqdsql:8001/FirstGen/services/UWWebServiceProxy?wsdl"
    xmlns:c="http://webservices.uw.pop.firstapex.com" />

But then while deploying the module in Apache ServiceMix, I get the following error -

java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)[:1.6.0_27]
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)[:1.6.0_27]
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)[:1.6.0_27]
    at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)[:1.6.0_27]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)[:1.6.0_27]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)[:1.6.0_27]
    at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)[:1.6.0_27]
    at java.lang.Class.getAnnotation(Class.java:3029)[:1.6.0_27]
    at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:165)[:1.6.0_27]
    at com.sun.xml.internal.ws.model.RuntimeModeler$1.run(RuntimeModeler.java:163)[:1.6.0_27]
    at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_27]
    at com.sun.xml.internal.ws.model.RuntimeModeler.getPrivClassAnnotation(RuntimeModeler.java:163)[:1.6.0_27]
    at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:199)[:1.6.0_27]
    at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:687)[:1.6.0_27]
    at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:675)[:1.6.0_27]
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)[:1.6.0_27]
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)[:1.6.0_27]
    at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)[:1.6.0_27]
    at javax.xml.ws.Service.getPort(Service.java:134)[:2.2]
    at com.firstapex.pop.uw.webservices.UWWebServiceProxy.getUWWebServiceProxyHttpEndpoint(UWWebServiceProxy.java:101)[305:traffic-insurance-services:1.0.0]
    at com.ndfs.integration.tip.webservice.client.ATPNotificationServiceInvoker.process(ATPNotificationServiceInvoker.java:37)[305:traffic-insurance-services:1.0.0]
    at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:111)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200)[124:org.apache.camel.camel-core:2.13.1]
    at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147)[124:org.apache.camel.camel-core:2.13.1]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_27]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_27]
    at java.lang.Thread.run(Thread.java:662)[:1.6.0_27]

I understand the exception is occurred only when there is problem with the annotation, but the service and port code is generated by the CXF plugin using wsdl2java, hence I see that may not be the issue. Please help me in solving this issue. Any question for clarification will also be appreciated. Thanks in advance.

Upvotes: 1

Views: 669

Answers (1)

user4975329
user4975329

Reputation: 1

It is possible ( likely) that one of the generated classes is in a path ( package ) that you are not including in your path. enter link description here

Upvotes: -1

Related Questions