2017-10-31 2 views
0

Ich benutze einen einfachen Mule-Flow, der eine Spring Bean als eine Komponente nimmt und führt sie regelmäßig mit Quarz-Endpunkt. Mein cxf-Client und meine Konfiguration sehen für mich alle gut aus, aber aus irgendeinem Grund bekomme ich eine Ausnahme, wenn ich versuche, eine Anfrage zu senden.cxf Laufzeit Ausnahme unbekannter Client Seite Ausnahme

meiner Klasse ist wie folgt:

@Component 
@DependsOn("restfulClient") 
public class Transmitter implements Callable{ 

    private static final Logger logger = 
    LoggerFactory.getLogger(Transmitter.class); 

    @Autowired 
    private RestfulClient restfulClient; 

    public Object onCall(MuleEventContext eventContext) throws Exception { 
     logger.info("In Transmitter"); 
     try { 
      String result = restfulClient.ping(); 
      logger.info("Result: {}" , result); 

     } catch (Exception e){ 
      logger.error("Exception in Transmitter" ,e); 
     } 
     return null; 
    } 
} 

mein Kunde:

in applicationContext.xml ich die cxf Bean definiert und aktiviert haben cxf Protokollierung:

<jaxrs:client id="restfulClient" 
       serviceClass="com.ws.RestfulClient" 
       address="${prop.restful.url}"> 
    <jaxrs:features> 
     <cxf:logging/> 
    </jaxrs:features> 
</jaxrs:client> 

und die URL ist in application.properties Datei definiert und im Debugging-Modus erstellt es die u rl erfolgreich.

Wenn ich die URL auf Postboten versuche, funktioniert es gut und ich bekomme OK als Ergebnis, aber es funktioniert nicht im Code.

die Ausnahme i erhalten ist:

java.lang.RuntimeException: Unknown client side exception 
at org.apache.cxf.jaxrs.client.AbstractClient.setResponseBuilder(AbstractClient.java:331) 
at org.apache.cxf.jaxrs.client.ClientProxyImpl.handleResponse(ClientProxyImpl.java:451) 
at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:445) 
at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:177) 
at com.sun.proxy.$Proxy27.ping(Unknown Source) 
at com.processor.Transmitter.onCall(Transmitter.java:77) 
at org.mule.model.resolvers.CallableEntryPointResolver.invoke(CallableEntryPointResolver.java:46) 
at org.mule.model.resolvers.DefaultEntryPointResolverSet.invoke(DefaultEntryPointResolverSet.java:36) 
at org.mule.component.DefaultComponentLifecycleAdapter.invoke(DefaultComponentLifecycleAdapter.java:339) 
at org.mule.component.AbstractJavaComponent.invokeComponentInstance(AbstractJavaComponent.java:82) 
at org.mule.component.AbstractJavaComponent.doInvoke(AbstractJavaComponent.java:73) 
at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:122) 
at org.mule.component.AbstractComponent.access$000(AbstractComponent.java:57) 
at org.mule.component.AbstractComponent$1$1.process(AbstractComponent.java:238) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:94) 
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:67) 
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:50) 
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:67) 
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:22) 
at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:66) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:61) 
at org.mule.component.AbstractComponent.process(AbstractComponent.java:156) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:58) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:94) 
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:67) 
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) 
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) 
at org.mule.processor.AbstractInterceptingMessageProcessorBase.processNext(AbstractInterceptingMessageProcessorBase.java:102) 
at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:51) 
at org.mule.processor.AsyncInterceptingMessageProcessor.processNextTimed(AsyncInterceptingMessageProcessor.java:118) 
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:189) 
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:182) 
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:16) 
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:30) 
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:14) 
at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:54) 
at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:44) 
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:50) 
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:40) 
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:41) 
at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:48) 
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:28) 
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:13) 
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:109) 
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:30) 
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker.doRun(AsyncInterceptingMessageProcessor.java:181) 
at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:39) 
at org.mule.work.WorkerContext.run(WorkerContext.java:286) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:745) 
+0

Hallo, können Sie Ihre komplette Mule Flow Xml teilen? – jvas

Antwort

1

ich das Problem gefunden. Das Problem ist in

<jaxrs:features> 
    <cxf:logging/> 
</jaxrs:features> 

, die für fehlerhafte Schema gehört ... (ehrlich frage mich, warum nicht mule würde statt vage unbekannten Client-Seite Ausnahme einen Namen zu einem solchen Fehler geben!)

<mule xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf 
<!-- --> 
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd 
http://www.mulesoft.org/schema/mule/cxf 
http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd" > 

der letzte Link gibt nicht gefunden ..

Verwandte Themen