MuleSoft Proxy Settings not working for AMAZON SQS - mule

We are trying to connect with amazon SQS from our corporate network. But its throwing below error
I have added Proxy details
VM Arguments in Run configurations:
Dhttp.proxyHost=rb-proxy-apac.bosch.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=prd5kor -Dhttp.proxyPassword=
Dmule.verbose.exceptions=true
Global Element properties:HTTP-HTTPS--->Proxy Settings
Prefernces-->General-->Network Connections( Active Provider-Manual)
Mule Config.XML:
`<http:connector name="HTTP_HTTPS" cookieSpec="rfc2109" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" proxyHostname="rb-proxy-apac.bosch.com" proxyPort="8080" proxyUsername="prd5kor" proxyPassword="Bibhushree#12345" doc:name="HTTP-HTTPS"/>
<sqs:config name="SQS_AMAZON" accessKey="------" secretKey="-----" queueName="bibhushree" doc:name="Amazon SQS"/>
<file:file-to-string-transformer name="File_to_String" doc:name="File to String"/>
<flow name="sqs_projectFlow2" doc:name="sqs_projectFlow2">
<ftp:inbound-endpoint host="bmhe321649.BMH.APAC.BOSCH.COM" port="21" path="/MULE" user="prd5kor" password="------" responseTimeout="10000" transformer-refs="File_to_String" doc:name="FTP"/>
<sqs:send-message config-ref="SQS_AMAZON" queueUrl="https://sqs.us-west-2.amazonaws.com/189129605181/bibhushree" accessKey="-----" secretKey="---------" queueName="bibhushree" doc:name="Amazon SQS"/>
<logger message="Received a message: #[payload]" level="INFO" doc:name="Logger"/>`
Error:
`java.net.UnknownHostException: sqs.us-east-1.amazonaws.com
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:278)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:641)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:402)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:245)
at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2221)
at com.amazonaws.services.sqs.AmazonSQSClient.createQueue(AmazonSQSClient.java:1150)
at org.mule.modules.sqs.SQSConnector.connect(SQSConnector.java:102)
at org.mule.modules.sqs.connectivity.SQSConnectorConnectionFactory.makeObject(SQSConnectorConnectionFactory.java:50)
at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
at org.mule.modules.sqs.connectivity.SQSConnectorConnectionManager.acquireConnection(SQSConnectorConnectionManager.java:254)
at org.mule.modules.sqs.connectivity.SQSConnectorConnectionManager.acquireConnection(SQSConnectorConnectionManager.java:40)
at org.mule.modules.sqs.process.ManagedConnectionProcessInterceptor.execute(ManagedConnectionProcessInterceptor.java:65)
at org.mule.modules.sqs.process.ManagedConnectionProcessInterceptor.execute(ManagedConnectionProcessInterceptor.java:23)
at org.mule.security.oauth.process.RetryProcessInterceptor.execute(RetryProcessInterceptor.java:84)
at org.mule.modules.sqs.connectivity.ManagedConnectionProcessTemplate.execute(ManagedConnectionProcessTemplate.java:35)
at org.mule.modules.sqs.processors.SendMessageMessageProcessor.doProcess(SendMessageMessageProcessor.java:131)
at org.mule.devkit.processor.DevkitBasedMessageProcessor.process(DevkitBasedMessageProcessor.java:86)
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.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
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(TransactionalErrorHandlingExec...`

I'm afraid the SQS connector doesn't seems to honor the proxy settings.
I've just raised an issue on the project around this.

Related

Mule 3.7 transformer with annotations for custom Objects

I have two custom Classes : Person, Manager. I wrote the following transformer to transform Person to Manager object.
package com.learning.transformers;
import org.mule.api.annotations.ContainsTransformerMethods;
import org.mule.api.annotations.Transformer;
import com.learning.beans.Manager;
import com.learning.beans.Person;
#ContainsTransformerMethods
public class AnnotatedTransformer {
#Transformer
public Manager transformToManager(#Payload Person person){
Manager manager = new Manager();
manager.setPerson(person);
manager.setDesignation("Manager");
return manager;
}
}
My configuraiton file is as follows.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
<spring:beans>
<spring:bean id="anTransformer" name="anT" class="com.learning.transformers.AnnotatedTransformer"/>
</spring:beans>
<flow name="mule-learning-transformersFlow1">
<http:listener config-ref="GlobalHTTPConnector" path="/customTransformation" doc:name="HTTP"/>
<json:json-to-object-transformer returnClass="com.learning.beans.Person" doc:name="JSON to Object"/>
<!-- <auto-transformer returnClass="com.learning.beans.Manager" /> -->
<component class="com.learning.components.ManagerLoggingComponent" doc:name="Java" />
</flow>
</mule>
My ManagerLoggingComponent looks like :
package com.learning.components;
import com.learning.beans.Manager;
import com.learning.beans.Person;
import org.mule.api.annotations.param.Payload;
public class ManagerLoggingComponent {
public void logManager(#Payload Manager manager){
Person person = manager.getPerson();
System.out.println("Name: "+person.getName());
System.out.println("Age: "+person.getAge());
System.out.println("Designation: "+manager.getDesignation());
}
}
I first send some json input to the flow. That is converted to Person object using json-to-object transformer. Then my component is placed which expects Manager object. I have registered my annotated transformer as spring bean. Hence I expect Person object to be converted to Manager object before passing it to Component. But it is throwing following exception.
Message : Failed to transform from "json" to
"com.learning.beans.Manager" Type :
org.mule.api.transformer.TransformerException Code :
MULE_ERROR-109 JavaDoc :
http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html
Transformer : JsonToObject{this=d61a0b,
name='JsonToManager', ignoreBadInput=false,
returnClass=SimpleDataType{type=com.learning.beans.Manager,
mimeType='/', encoding='null'},
sourceTypes=[SimpleDataType{type=java.io.Reader, mimeType='/',
encoding='null'}, SimpleDataType{type=java.net.URL, mimeType='/',
encoding='null'}, SimpleDataType{type=java.io.File, mimeType='/',
encoding='null'}, SimpleDataType{type=java.lang.String,
mimeType='/', encoding='null'},
SimpleDataType{type=java.io.InputStream, mimeType='/',
encoding='null'}, SimpleDataType{type=[B, mimeType='/',
encoding='null'}]}
Also, while starting the server I found that it is throwing the following error by which I understand that it is un-registering the transformToManager transformer. That might be the reason for not picking up my custom transformer. This is being observed in mule 3.7. 3.5 is working smoothly.
WARN 2016-03-27 14:01:06,574 [main] org.mule.config.spring.SpringRegistry: Could not apply shutdown lifecycle to object 'AnnotatedTransformer.transformToManager' after being unregistered.
org.mule.api.lifecycle.InitialisationException: An Expression Evaluator for "payload" is not registered with Mule. Make sure you have the the module for this expression type on your classpath. for example, if you are using an xpath expression you need to have the Mule XML module on your classpath.
at org.mule.expression.transformers.AbstractExpressionTransformer.initialise(AbstractExpressionTransformer.java:85) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.config.expression.ExpressionAnnotationsHelper.getTransformerForMethodWithAnnotations(ExpressionAnnotationsHelper.java:53) ~[mule-module-annotations-3.7.3.jar:3.7.3]
at org.mule.config.transformer.AnnotatedTransformerProxy.initialise(AnnotatedTransformerProxy.java:109) ~[mule-module-annotations-3.7.3.jar:3.7.3]
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_72]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_72]
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.lifecycle.phases.MuleContextInitialisePhase.applyLifecycle(MuleContextInitialisePhase.java:71) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.lifecycle.RegistryLifecycleManager.applyPhase(RegistryLifecycleManager.java:183) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.registry.AbstractRegistry.unregisterObject(AbstractRegistry.java:163) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.config.spring.SpringRegistry$ConfigurableRegistrationDelegate.doRegisterObject(SpringRegistry.java:451) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.config.spring.SpringRegistry$ConfigurableRegistrationDelegate.registerObject(SpringRegistry.java:405) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.config.spring.SpringRegistry.registerObject(SpringRegistry.java:253) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.registry.AbstractRegistryBroker.registerObject(AbstractRegistryBroker.java:249) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.registry.AbstractRegistryBroker.registerObject(AbstractRegistryBroker.java:262) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.registry.MuleRegistryHelper.registerObject(MuleRegistryHelper.java:816) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.registry.MuleRegistryHelper.registerTransformer(MuleRegistryHelper.java:458) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.config.transformer.AnnotatedTransformerObjectProcessor.process(AnnotatedTransformerObjectProcessor.java:76) ~[mule-module-annotations-3.7.3.jar:3.7.3]
at org.mule.config.spring.processors.TransformerAnnotatedBeanProcessor.postProcessBeforeInitialization(TransformerAnnotatedBeanProcessor.java:30) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:753) ~[mule-module-spring-config-3.7.3.jar:4.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) ~[spring-context-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:172) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:95) ~[mule-module-spring-config-3.7.3.jar:3.7.3]
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ~[mule-core-3.7.3.jar:3.7.3]
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) ~[mule-core-3.7.3.jar:3.7.3]
............
My request look like
{
"name":"Sai",
"age" : "100000"
}
Any ideas on what is happening here?
Everything is working as expected in Mule 3.5. Problem is with mule 3.7.
Update 1 : Full log of Excetion:
Message : Failed to transform from "json" to "com.learning.beans.Manager"
Type : org.mule.api.transformer.TransformerException
Code : MULE_ERROR-109
JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html
Transformer : JsonToObject{this=13de431, name='JsonToManager', ignoreBadInput=false, returnClass=SimpleDataType{type=com.learning.beans.Manager, mimeType='*/*', encoding='null'}, sourceTypes=[SimpleDataType{type=java.io.Reader, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.net.URL, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.File, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}, SimpleDataType{type=java.io.InputStream, mimeType='*/*', encoding='null'}, SimpleDataType{type=[B, mimeType='*/*', encoding='null'}]}
********************************************************************************
Exception stack is:
1. null (java.lang.NullPointerException)
java.io.Reader:78 (null)
2. Failed to transform from "json" to "com.learning.beans.Manager" (org.mule.api.transformer.TransformerException)
org.mule.module.json.transformers.JsonToObject:133 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html)
********************************************************************************
Root Exception stack trace:
java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:78)
at java.io.InputStreamReader.<init>(InputStreamReader.java:97)
at org.mule.module.json.transformers.JsonToObject.transformMessage(JsonToObject.java:119)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:69)
at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:425)
at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:373)
at org.mule.expression.MessagePayloadExpressionEvaluator.evaluate(MessagePayloadExpressionEvaluator.java:79)
at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:318)
at org.mule.expression.transformers.ExpressionArgument.evaluate(ExpressionArgument.java:116)
at org.mule.expression.transformers.ExpressionTransformer.transformMessage(ExpressionTransformer.java:51)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:69)
at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:366)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.getPayloadFromMessageWithAnnotations(AnnotatedEntryPointResolver.java:175)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.getPayloadForMethod(AnnotatedEntryPointResolver.java:161)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.invoke(AnnotatedEntryPointResolver.java:130)
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:120)
at org.mule.component.AbstractComponent.access$000(AbstractComponent.java:55)
at org.mule.component.AbstractComponent$1$1.process(AbstractComponent.java:236)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.component.AbstractComponent.process(AbstractComponent.java:154)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:102)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.e...
********************************************************************************
Update 2 : I started getting the below exception suddenly. I didn't change any code. It is showing the below exception some times and above exception some other times.
Message : The object transformed is of type: "SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}", but the expected return type is "SimpleDataType{type=com.learning.beans.Manager, mimeType='application/json', encoding='null'}". The current MuleMessage is null! Please report this to mule-esb#mulesoft.com
Type : org.mule.api.transformer.TransformerMessagingException
Code : MULE_ERROR--2
JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html
Payload : {NullPayload}
********************************************************************************
Exception stack is:
1. The object transformed is of type: "SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}", but the expected return type is "SimpleDataType{type=com.learning.beans.Manager, mimeType='application/json', encoding='null'}". The current MuleMessage is null! Please report this to mule-esb#mulesoft.com (org.mule.api.transformer.TransformerMessagingException)
org.mule.transformer.AbstractMessageTransformer:179 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html)
********************************************************************************
Root Exception stack trace:
org.mule.api.transformer.TransformerMessagingException: The object transformed is of type: "SimpleDataType{type=java.lang.String, mimeType='*/*', encoding='null'}", but the expected return type is "SimpleDataType{type=com.learning.beans.Manager, mimeType='application/json', encoding='null'}". The current MuleMessage is null! Please report this to mule-esb#mulesoft.com
at org.mule.transformer.AbstractMessageTransformer.checkReturnClass(AbstractMessageTransformer.java:179)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:158)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:69)
at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:425)
at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:373)
at org.mule.expression.MessagePayloadExpressionEvaluator.evaluate(MessagePayloadExpressionEvaluator.java:79)
at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:318)
at org.mule.expression.transformers.ExpressionArgument.evaluate(ExpressionArgument.java:116)
at org.mule.expression.transformers.ExpressionTransformer.transformMessage(ExpressionTransformer.java:51)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141)
at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:69)
at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:366)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.getPayloadFromMessageWithAnnotations(AnnotatedEntryPointResolver.java:175)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.getPayloadForMethod(AnnotatedEntryPointResolver.java:161)
at org.mule.impl.model.resolvers.AnnotatedEntryPointResolver.invoke(AnnotatedEntryPointResolver.java:130)
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:120)
at org.mule.component.AbstractComponent.access$000(AbstractComponent.java:55)
at org.mule.component.AbstractComponent$1$1.process(AbstractComponent.java:236)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:88)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.component.AbstractComponent.process(AbstractComponent.java:154)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:98)
at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:59)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:102)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
at org.m...
********************************************************************************

Google calendar mule connector is not working

I'm working with Mule and Google Connectors.
I've tried the following code:
<mule xmlns:objectstore="http://www.mulesoft.org/schema/mule/objectstore" xmlns:json="http://www.mulesoft.org/schema/mule/json"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:google-calendars="http://www.mulesoft.org/schema/mule/google-calendars" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/objectstore http://www.mulesoft.org/schema/mule/objectstore/1.0/mule-objectstore.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/google-calendars http://www.mulesoft.org/schema/mule/google-calendars/current/mule-google-calendars.xsd">
<google-calendars:config-with-oauth name="Google_Calendars"
consumerKey="CUNSUMER_KEY" consumerSecret="CONSUMER_SECRET" doc:name="Google Calendars"
applicationName="My Project">
<google-calendars:oauth-callback-config domain="localhost" localPort="8082" path="oauth2callback"
remotePort="8082" />
<google-calendars:oauth-store-config objectStore-ref="ObjectStoreBean" />
</google-calendars:config-with-oauth>
<spring:beans>
<spring:bean id="ObjectStoreBean" name="ObjectStoreBean" class="org.mule.util.store.SimpleMemoryObjectStore" />
</spring:beans>
<objectstore:config name="ObjectStore" doc:name="ObjectStore" objectStore-ref="ObjectStoreBean" />
<flow name="authorizationAndAuthenticationFlow">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8080" path="oauth-authorize"
doc:name="HTTP" />
<google-calendars:authorize config-ref="Google_Calendars" doc:name="Google Calendars" />
<objectstore:store config-ref="ObjectStore" doc:name="ObjectStore" key="accessTokenId" overwrite="true"
value-ref="#[flowVars['OAuthAccessTokenId']]" />
<set-payload value="You have successfully authorized the connector" doc:name="Set Payload" />
<catch-exception-strategy doc:name="Catch Exception Strategy">
<set-payload value="An error has occurred authorizing the connector" doc:name="Set Payload" />
</catch-exception-strategy>
</flow>
<flow name="getAcl">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="get" doc:name="HTTP" />
<logger level="INFO" doc:name="Logger" />
<enricher target="#[flowVars['accessTokenId']]" doc:name="Message Enricher">
<objectstore:retrieve config-ref="ObjectStore" key="accessTokenId" defaultValue-ref="#['']" doc:name="Get AccessToken" />
</enricher>
<expression-filter expression="#[flowVars['accessTokenId'] != '']" doc:name="Is Access Token Set" />
<google-calendars:get-calendar-by-id id="CALENDAR_ID" config-ref="Google_Calendars" doc:name="Google Calendars" accessTokenId="#[flowVars['accessTokenId']]" />
<json:object-to-json-transformer doc:name="Object to JSON" />
</flow>
</mule>
I can get the OAuth2 Authorization just fine, but when I try to get a Calendar I get:
Exception stack is:
1. com.google.common.primitives.UnsignedInteger.asUnsigned(I)Lcom/google/common/primitives/UnsignedInteger; (java.lang.NoSuchMethodError)
com.google.api.client.util.Data:81 (null)
2. com.google.common.primitives.UnsignedInteger.asUnsigned(I)Lcom/google/common/primitives/UnsignedInteger; (java.lang.NoSuchMethodError). Message payload is of type: NullPayload (org.mule.api.MessagingException)
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)
********************************************************************************
Root Exception stack trace:
java.lang.NoSuchMethodError: com.google.common.primitives.UnsignedInteger.asUnsigned(I)Lcom/google/common/primitives/UnsignedInteger;
at com.google.api.client.util.Data.<clinit>(Data.java:81)
at com.google.api.client.util.FieldInfo.<init>(FieldInfo.java:131)
at com.google.api.client.util.FieldInfo.of(FieldInfo.java:104)
at com.google.api.client.util.ClassInfo.<init>(ClassInfo.java:181)
at com.google.api.client.util.ClassInfo.of(ClassInfo.java:92)
at com.google.api.client.util.ClassInfo.<init>(ClassInfo.java:175)
at com.google.api.client.util.ClassInfo.of(ClassInfo.java:92)
at com.google.api.client.util.GenericData.<init>(GenericData.java:79)
at com.google.api.client.util.GenericData.<init>(GenericData.java:61)
at com.google.api.client.http.json.JsonHttpRequest.<init>(JsonHttpRequest.java:69)
at com.google.api.services.calendar.CalendarRequest.<init>(CalendarRequest.java:44)
at com.google.api.services.calendar.Calendar$Calendars$Get.<init>(Calendar.java:1372)
at com.google.api.services.calendar.Calendar$Calendars.get(Calendar.java:1358)
at org.mule.module.google.calendar.GoogleCalendarConnector.getCalendarById(GoogleCalendarConnector.java:273)
at org.mule.module.google.calendar.processors.GetCalendarByIdMessageProcessor$1.process(GetCalendarByIdMessageProcessor.java:119)
at org.mule.security.oauth.process.ProcessCallbackProcessInterceptor.execute(ProcessCallbackProcessInterceptor.java:24)
at org.mule.security.oauth.process.RefreshTokenProcessInterceptor.execute(RefreshTokenProcessInterceptor.java:55)
at org.mule.security.oauth.process.RefreshTokenProcessInterceptor.execute(RefreshTokenProcessInterceptor.java:24)
at org.mule.security.oauth.process.ManagedAccessTokenProcessInterceptor.execute(ManagedAccessTokenProcessInterceptor.java:75)
at org.mule.security.oauth.process.ManagedAccessTokenProcessInterceptor.execute(ManagedAccessTokenProcessInterceptor.java:24)
at org.mule.security.oauth.process.ManagedAccessTokenProcessTemplate.execute(ManagedAccessTokenProcessTemplate.java:42)
at org.mule.module.google.calendar.processors.GetCalendarByIdMessageProcessor.doProcess(GetCalendarByIdMessageProcessor.java:105)
at org.mule.devkit.processor.DevkitBasedMessageProcessor.process(DevkitBasedMessageProcessor.java:88)
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.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:40)
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.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:102)
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.construct.DynamicPipelineMessageProcessor.process(DynamicPipelineMessageProcessor.java:54)
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.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelope...
*******************************************************************************`
I've tried with Mule 3.5.2 and the Google Calendar Connector v.1.1.1 and also the v.1.2.4 but still not working
Edit:
Actually I found out that Google Connectors are referring to guava-12.0.jar but the Mule Server Library refers to guava-16.0.1.jar, so I think when I'm running the app the actual jar that is been use is guava-16.0.1.jar where the method doesn't exist anymore.
Some code somewhere (see my comment below your question) depends on pre-15.0 Guava, where the deprecated asUnsigned has been removed from UnsignedInteger.
You can try to force Guava to 14.0.1 by adding this into your project's pom.xml:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
This downgrade may of course break other things elsewhere, but it's worth a shot (until we figure out where is the code that requires this removed method and file an issue with the relevant project).
EDIT: It turns out Mule brings a more recent version of Guava to the classpath. So you'll need to configure the application classloader to use the version of Guava you embed in the app zip itself. Add the following in mule-deploy.properties:
loader.override=-com.google.common.primitives.UnsignedInteger
Reference: https://developer.mulesoft.com/docs/display/35X/Classloader+Control+in+Mule

to store a message in rabbitmq from mule

Below is my flow and i'm trying to store my salesforce batch information into a queue in rabbit mq
<flow name="foreachsimilar_pmFlow1" doc:name="foreachsimilar_pmFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
<sfdc:create-job config-ref="Salesforce1" type="HRISASI__c" operation="insert" doc:name="Salesforce"/>
<set-variable variableName="batchID" value="1" doc:name="Variable"/>
<set-property propertyName="jobInfo" value="#[payload]" doc:name="Property"/>
<set-variable variableName="jobId" value="#[payload.id]" doc:name="Variable"/>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="id" queryTimeout="-1" connector-ref="Database1" doc:name="Database"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<scripting:transformer doc:name="Groovy">
<scripting:script engine="Groovy"><![CDATA[payload.collect { it.EmpId }.collate(3).collect { [min: it[0], max: it[-1]] }
]]></scripting:script>
</scripting:transformer>
<foreach doc:name="For Each">
<set-variable variableName="bulkPayload" value="#[groovy: return[];]" doc:name="bulkPayload EmptyArray"/>
<set-variable variableName="IDs" value="#[groovy:return[];]" doc:name="Id EmptyArray"/>
<set-variable variableName="jdbdinsbatch" value="#[groovy: return[];]" doc:name="Variable"/>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryTimeout="-1" connector-ref="Database1" doc:name="Database" queryKey="all"/>
<foreach doc:name="For Each">
<set-variable variableName="empId" value="#[payload['EmpId']]" doc:name="Variable"/>
<logger message="#[payload]" level="INFO" doc:name="Logger"/>
<data-mapper:transform config-ref="map_to_hrisasi__c" doc:name="Map To HRISASI__c"/>
<scripting:transformer doc:name="Groovy">
<scripting:script engine="Groovy"><![CDATA[payloadMap = payload[0];
IDs = flowVars['IDs'];
IDs.add( [ EmpId: flowVars['EmpId'] ] );
flowVars['IDs'] = IDs;
jdbdinsbatch= flowVars['jdbdinsbatch'];
jdbdinsbatch.add( [ EmpId: flowVars['EmpId'], batchID: flowVars['batchID'] ] );
flowVars['jdbdinsbatch'] = jdbdinsbatch;
return [ payloadMap ];]]></scripting:script>
</scripting:transformer>
<set-variable variableName="bulkPayload" value="#[groovy: bulkPayload = flowVars['bulkPayload']; bulkPayload.add(payload[0]); return bulkPayload;]" doc:name="bulkPayload"/>
</foreach>
<set-payload value="#[flowVars['bulkPayload']]" doc:name="Set Payload"/>
<sfdc:create-batch config-ref="Salesforce1" doc:name="Salesforce">
<sfdc:job-info ref="#[message.outboundProperties['jobInfo']]"/>
<sfdc:objects ref="#[payload]"/>
</sfdc:create-batch>
<scripting:transformer doc:name="Groovy">
<scripting:script engine="Groovy"><![CDATA[return [ batch: payload, IDs: flowVars['IDs'], batchid: flowVars['batchID'] ]]]></scripting:script>
</scripting:transformer>
<amqp:outbound-endpoint exchangeName="Salesforce-Batch" queueName="batchInfo" exchangeDurable="true" queueDurable="true" responseTimeout="10000" doc:name="AMQP"/>
</foreach>
<flow-ref name="foreachsimilar_pmFlow2" doc:name="Flow Reference"/>
</flow>
The below exception is thrown
Message : Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=amqp://Salesforce-Batch/amqp-queue.batchInfo, connector=AmqpConnector
{
name=AMQP_Connector
lifecycle=start
this=33982399
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[amqp]
serviceOverrides=<none>
}
, name='endpoint.amqp.Salesforce.Batch.amqp.queue.batchInfo', mep=ONE_WAY, properties={queueDurable=true, exchangeDurable=true}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: AmqpMessage
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. invalid value in table (java.lang.IllegalArgumentException)
com.rabbitmq.client.impl.Frame:306 (null)
2. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=amqp://Salesforce-Batch/amqp-queue.batchInfo, connector=AmqpConnector
{
name=AMQP_Connector
lifecycle=start
this=33982399
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true
connected=true
supportedProtocols=[amqp]
serviceOverrides=<none>
}
, name='endpoint.amqp.Salesforce.Batch.amqp.queue.batchInfo', mep=ONE_WAY, properties={queueDurable=true, exchangeDurable=true}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: AmqpMessage (org.mule.api.transport.DispatchException)
org.mule.transport.AbstractMessageDispatcher:109 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.IllegalArgumentException: invalid value in table
at com.rabbitmq.client.impl.Frame.fieldValueSize(Frame.java:306)
at com.rabbitmq.client.impl.Frame.tableSize(Frame.java:246)
at com.rabbitmq.client.impl.ValueWriter.writeTable(ValueWriter.java:120)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
Could somebody please tell as why is the above exception thrown and what should be done to resolve it struck with this for the past two days
Thank you in advance.
below is the stack trace after enabling verbose exception logging
********************************************************************************
Root Exception stack trace:
java.lang.IllegalArgumentException: invalid value in table
at com.rabbitmq.client.impl.Frame.fieldValueSize(Frame.java:306)
at com.rabbitmq.client.impl.Frame.tableSize(Frame.java:246)
at com.rabbitmq.client.impl.ValueWriter.writeTable(ValueWriter.java:120)
at com.rabbitmq.client.impl.ContentHeaderPropertyWriter.writeTable(ContentHeaderPropertyWriter.java:98)
at com.rabbitmq.client.AMQP$BasicProperties.writePropertiesTo(AMQP.java:1782)
at com.rabbitmq.client.impl.AMQContentHeader.writeTo(AMQContentHeader.java:51)
at com.rabbitmq.client.impl.AMQContentHeader.toFrame(AMQContentHeader.java:78)
at com.rabbitmq.client.impl.AMQCommand.transmit(AMQCommand.java:106)
at com.rabbitmq.client.impl.AMQChannel.quiescingTransmit(AMQChannel.java:316)
at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:292)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:636)
at org.mule.transport.amqp.AmqpMessageDispatcher$OutboundAction$1.run(AmqpMessageDispatcher.java:55)
at org.mule.transport.amqp.AmqpMessageDispatcher.doOutboundAction(AmqpMessageDispatcher.java:172)
at org.mule.transport.amqp.AmqpMessageDispatcher.doDispatch(AmqpMessageDispatcher.java:127)
at org.mule.transport.AbstractMessageDispatcher.process(AbstractMessageDispatcher.java:99)
at org.mule.transport.AbstractConnector$DispatcherMessageProcessor.process(AbstractConnector.java:2627)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.AsyncInterceptingMessageProcessor.process(AsyncInterceptingMessageProcessor.java:101)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.endpoint.outbound.OutboundResponsePropertiesMessageProcessor.process(OutboundResponsePropertiesMessageProcessor.java:39)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.EndpointTransactionalInterceptingMessageProcessor$1.process(EndpointTransactionalInterceptingMessageProcessor.java:50)
at org.mule.processor.EndpointTransactionalInterceptingMessageProcessor$1.process(EndpointTransactionalInterceptingMessageProcessor.java:47)
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:20)
at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:58)
at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48)
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54)
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44)
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(I...
********************************************************************************
The payload you're trying to send to Rabbit looks quite complex (sfdc BatchInfo object). How do you except it to be readable for the queue consumer? I think that, for some reason, the message transformers involved in transforming this payload to a byte array suited for AMQP transport fails and you end up trying to send the groovy generated Map with an sfdc BatchInfo object as is to the AMQP client lib.
You should convert the map with contents to a string before sending it to Rabbit.
Something like this (call toString on the BatchInfo object and then convert the map to JSON):
Edited (removed outbound properties)
<scripting:transformer doc:name="Groovy">
<scripting:script engine="Groovy"><![CDATA[return [ batch: payload.toString(), IDs: flowVars['IDs'], batchid: flowVars['batchID'] ]]]></scripting:script>
</scripting:transformer>
<json:object-to-json-transformer doc:name="Object to JSON"/>
<amqp:outbound-endpoint exchangeName="Salesforce-Batch" queueName="batchInfo" exchangeDurable="true" queueDurable="true" responseTimeout="10000" doc:name="AMQP">
<message-properties-transformer scope="outbound">
<delete-message-property key="*" />
</message-properties-transformer>
</amqp:outbound-endpoint>

mule Missing ContentType

I need to design a Mule flow with xml file as input to a JMS queue. Once in queue it will be picked up to hit a SOAP web service. Following is a code.
<jms:activemq-connector name="Active_MQ" brokerURL="tcp://localhost:61616" validateConnections="true" doc:name="Active MQ"/>
<flow name="jmsFlow2" doc:name="jmsFlow2">
<file:inbound-endpoint responseTimeout="10000" doc:name="File" path="D:\Input"/>
<byte-array-to-string-transformer doc:name="Byte Array to String"/>
<jms:outbound-endpoint queue="DimQueue" connector-ref="Active_MQ" doc:name="JMS" mimeType="text/plain"/>
</flow>
<flow name="jmsFlow1" doc:name="jmsFlow1">
<jms:inbound-endpoint queue="DimQueue" connector-ref="Active_MQ" doc:name="JMS"/>
<jms:jmsmessage-to-object-transformer doc:name="JMSMessage to Object"/>
<logger message="#[message.payload]" level="INFO" doc:name="Logger"/>
<!-- <mulexml:object-to-xml-transformer doc:name="Object to XML"/> -->
<logger message="#[message.payload]" level="INFO" doc:name="Logger"/>
<set-property propertyName="Content-Type" value="application/soap+xml" doc:name="Property"/>
<logger message="#[message.outboundProperties]-------#[header:Content-Type]" level="INFO" doc:name="Logger"/>
<cxf:jaxws-service serviceClass="com.org.ProcessImpl" doc:name="SOAP" enableMuleSoapHeaders="false" mtomEnabled="true">
</cxf:jaxws-service>
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="9090" method="POST" doc:name="HTTP">
</http:outbound-endpoint>
</flow>
It gives following error:
WARN 2014-02-06 15:27:23,145 [[jms].jmsFlow1.stage1.02]org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://com.capgemini/cif/dim}ProcessActivityService has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Missing ContentType.
at org.apache.cxf.binding.soap.jms.interceptor.SoapFaultFactory.createSoap11Fault(SoapFaultFactory.java:58)
at org.apache.cxf.binding.soap.jms.interceptor.SoapFaultFactory.createFault(SoapFaultFactory.java:48)
at org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor.createFault(SoapJMSInInterceptor.java:226)
at org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor.checkContentType(SoapJMSInInterceptor.java:191)
at org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor.handleMessage(SoapJMSInInterceptor.java:49)
at org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor.handleMessage(SoapJMSInInterceptor.java:38)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.mule.module.cxf.CxfInboundMessageProcessor.sendToDestination(CxfInboundMessageProcessor.java:320)
at org.mule.module.cxf.CxfInboundMessageProcessor.process(CxfInboundMessageProcessor.java:142)
at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.process(FlowConfiguringMessageProcessor.java:52)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:95)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.AbstractInterceptingMessageProcessorBase.processNext(AbstractInterceptingMessageProcessorBase.java:106)
at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:55)
at org.mule.processor.AsyncInterceptingMessageProcessor.processNextTimed(AsyncInterceptingMessageProcessor.java:122)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:192)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:185)
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:20)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:34)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:18)
at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:58)
at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48)
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54)
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44)
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44)
at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker.doRun(AsyncInterceptingMessageProcessor.java:184)
at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:43)
at org.mule.work.WorkerContext.run(WorkerContext.java:311)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.cxf.binding.soap.jms.interceptor.JMSFault: Missing ContentType.
at org.apache.cxf.binding.soap.jms.interceptor.JMSFaultFactory.createFault(JMSFaultFactory.java:111)
at org.apache.cxf.binding.soap.jms.interceptor.JMSFaultFactory.createMissingContentTypeFault(JMSFaultFactory.java:72)
at org.apache.cxf.binding.soap.jms.interceptor.SoapJMSInInterceptor.checkContentType(SoapJMSInInterceptor.java:188)
... 38 more
The loggers in the code give correct Content-Type but still the error persists.
Can anyone help?
Thanks in advance
Your issue with the Content-Type could be due to old version, as I can not reproduce it.
However, if you want to use xml data to call SOAP web service, I think your approach is incorrect. You should use a proxy client, instead. Something like this:
<jms:inbound-endpoint queue="DimQueue" connector-ref="Active_MQ" doc:name="JMS"/>
<set-property propertyName="Content-Type" value="application/soap+xml" doc:name="Property"/>
<set-property propertyName="SOAPAction" value="urn:#myMethod" doc:name="Property"/>
<cxf:proxy-client payload="envelope" doc:name="SOAP"/>
<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="9090" method="POST" doc:name="HTTP">
</http:outbound-endpoint>

Mule is throwing error: No namespace on "someElement" element

I provided snippet of my code that should work normally but it doesn't.
In short, my flow is triggered by quartz, read some data from database, loop through results, on each loop do something and then finish.
Everything works ok when result from service (http outbound) return that there is nothing to give back, but when choice (in flow) is not default it redirect to sub-flow where xslt perform and save file. File saves like it should (I checked with external tools if xml suits criteria) and logger prints out number 3 as proof that it is finished (couple of lines before error is thrown) but after that I get error given below. Anyone knows why? I am out of ideas.
My flow:
<flow name="msp2bassGettingContent" doc:name="Starter">
<quartz:inbound-endpoint responseTimeout="10000" doc:name="Quartz" jobName="Starter" repeatInterval="600000" startDelay="3000">
<quartz:event-generator-job groupName="Generator" jobGroupName="Generator">
<quartz:payload file="${prop.requestEvent}"/>
</quartz:event-generator-job>
</quartz:inbound-endpoint>
<jdbc:outbound-endpoint exchange-pattern="request-response" queryKey="getUnreadedRoutes" queryTimeout="-1" connector-ref="JDBCConnector" doc:name="GetNulls">
<jdbc:query key="getUnreadedRoutes" value="SELECT routeid FROM kptemp WHERE readed IS NULL"/>
</jdbc:outbound-endpoint>
<foreach collection="#[message.payload]" doc:name="For Each" counterVariableName="counter123">
<flow-ref name="msp2bass" doc:name="Flow Reference"/>
</foreach>
</flow>
<sub-flow name="msp2bass" doc:name="msp2bassGetEvent">
<set-variable variableName="routeid" value="#[payload['routeid']]" doc:name="Variable"/>
<set-payload value="<a/>;" doc:name="Set Payload"/>
<mulexml:object-to-xml-transformer doc:name="Object to XML"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="${prop.createRequest}" doc:name="XSLT" ignoreBadInput="true">
<mulexml:context-property key="customerId" value="${prop.customerId}"/>
<mulexml:context-property key="siteName" value="${prop.siteName}"/>
<mulexml:context-property key="routeID" value="#[routeid]"/>
</mulexml:xslt-transformer>
<cxf:proxy-client payload="body" doc:name="SOAP">
<cxf:outInterceptors>
<spring:ref bean="WSS4JOutInterceptorBean"/>
</cxf:outInterceptors>
</cxf:proxy-client>
<https:outbound-endpoint exchange-pattern="request-response" host="${prop.host}" port="${prop.port}" path="${prop.path}" method="POST" connector-ref="HTTP_HTTPS1" doc:name="HTTP"/>
<byte-array-to-object-transformer doc:name="Byte Array to Object"/>
<choice doc:name="Choice">
<when expression="#[xpath('boolean(//soap:Envelope/soap:Body/ns2:processComplexResponse/MSPResponse/serviceEvents/measurements/name)')]">
<flow-ref name="transform" doc:name="Flow Reference"/>
</when>
<otherwise>
<logger message="Not null: #[routeid]" level="INFO" doc:name="Logger"/>
</otherwise>
</choice>
</sub-flow>
<sub-flow name="transform" doc:name="transform">
<logger message="Payload: #[payload]" level="INFO" doc:name="Logger"/>
<mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="${prop.transformer}" doc:name="XSLT"/>
<file:outbound-endpoint path="./work" outputPattern="#[routeid].xml" responseTimeout="10000" disableTransportTransformer="true" doc:name="File"/>
<logger message="3" level="INFO" doc:name="3"/>
</sub-flow>
Stack trace:
INFO 2014-01-22 12:30:21,999 [[bass2msp].msp2bassGettingContent.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Not null: IR_1389972193818
INFO 2014-01-22 12:30:22,252 [[bass2msp].msp2bassGettingContent.stage1.02] org.mule.api.processor.LoggerMessageProcessor: Payload: SOME XML CONTENT
INFO 2014-01-22 12:30:22,301 [[bass2msp].msp2bassGettingContent.stage1.02] org.mule.api.processor.LoggerMessageProcessor: 3
WARN 2014-01-22 12:17:56,335 [[bass2msp].msp2bassGettingContent.stage1.04] org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://support.cxf.module.mule.org/}ProxyService#{http://support.cxf.module.mule.org/}invoke has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: No namespace on "rootNode" element.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:799)
at org.mule.module.cxf.transport.MuleUniversalConduit.dispatchMuleMessage(MuleUniversalConduit.java:280)
at org.mule.module.cxf.transport.MuleUniversalConduit$2.handleMessage(MuleUniversalConduit.java:194)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:375)
at org.mule.module.cxf.CxfOutboundMessageProcessor.doSendWithClient(CxfOutboundMessageProcessor.java:235)
at org.mule.module.cxf.CxfOutboundMessageProcessor.process(CxfOutboundMessageProcessor.java:125)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:95)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:54)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:26)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:70)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:65)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.AbstractInterceptingMessageProcessorBase.processNext(AbstractInterceptingMessageProcessorBase.java:106)
at org.mule.routing.outbound.AbstractMessageSequenceSplitter.processParts(AbstractMessageSequenceSplitter.java:133)
at org.mule.routing.outbound.AbstractMessageSequenceSplitter.process(AbstractMessageSequenceSplitter.java:63)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:95)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:54)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:26)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:70)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:65)
at org.mule.routing.Foreach.process(Foreach.java:95)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:95)
at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:70)
at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
at org.mule.processor.AbstractInterceptingMessageProcessorBase.processNext(AbstractInterceptingMessageProcessorBase.java:106)
at org.mule.interceptor.AbstractEnvelopeInterceptor.process(AbstractEnvelopeInterceptor.java:55)
at org.mule.processor.AsyncInterceptingMessageProcessor.processNextTimed(AsyncInterceptingMessageProcessor.java:122)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:192)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker$1.process(AsyncInterceptingMessageProcessor.java:185)
at org.mule.execution.ExecuteCallbackInterceptor.execute(ExecuteCallbackInterceptor.java:20)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:34)
at org.mule.execution.HandleExceptionInterceptor.execute(HandleExceptionInterceptor.java:18)
at org.mule.execution.BeginAndResolveTransactionInterceptor.execute(BeginAndResolveTransactionInterceptor.java:58)
at org.mule.execution.ResolvePreviousTransactionInterceptor.execute(ResolvePreviousTransactionInterceptor.java:48)
at org.mule.execution.SuspendXaTransactionInterceptor.execute(SuspendXaTransactionInterceptor.java:54)
at org.mule.execution.ValidateTransactionalStateInterceptor.execute(ValidateTransactionalStateInterceptor.java:44)
at org.mule.execution.IsolateCurrentTransactionInterceptor.execute(IsolateCurrentTransactionInterceptor.java:44)
at org.mule.execution.ExternalTransactionInterceptor.execute(ExternalTransactionInterceptor.java:52)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:32)
at org.mule.execution.RethrowExceptionInterceptor.execute(RethrowExceptionInterceptor.java:17)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:113)
at org.mule.execution.TransactionalErrorHandlingExecutionTemplate.execute(TransactionalErrorHandlingExecutionTemplate.java:34)
at org.mule.processor.AsyncInterceptingMessageProcessor$AsyncMessageProcessorWorker.doRun(AsyncInterceptingMessageProcessor.java:184)
at org.mule.work.AbstractMuleEventWork.run(AbstractMuleEventWork.java:43)
at org.mule.work.WorkerContext.run(WorkerContext.java:311)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
ERROR 2014-01-22 12:17:56,340 [[bass2msp].msp2bassGettingContent.stage1.04] org.mule.exception.DefaultMessagingExceptionStrategy:
********************************************************************************
Message : No namespace on "rootNode" element.. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostMethod
Code : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. No namespace on "rootNode" element. (org.apache.cxf.binding.soap.SoapFault)
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor:109 (null)
2. No namespace on "rootNode" element.. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PostMethod (org.mule.api.transport.DispatchException)
org.mule.module.cxf.CxfOutboundMessageProcessor:144 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transport/DispatchException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.apache.cxf.binding.soap.SoapFault: No namespace on "rootNode" element.
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.readVersion(ReadHeadersInterceptor.java:109)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:141)
at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
Any help is appreciated! Thank you!
EDIT.1
I did some more research and I found out that problem is when call to subflow in my loop (for each) end. I have put logger after flow-ref and it printed ok till that error (file at the end of flow is generated but logger is quiet). So, is this known/unknown bug or something? Or do I somehow rewrite collection that is looping here: message.payload so that looper cannot read next value? But then, why logger after flow-ref doesn't get triggered inside loop at the end?
The cxf:proxy-client element is a "two way" element, i.e. it deals with the message both in request and response phases.
The "transform" sub-flow affects the message payload, which was the response from the HTTP endpoint, with an XSL-T. This confuses the cxf:proxy-client element when it eventually gets the response back flowing through it.
One potential fix is to ref the sub-flow in an async block so whatever payload transformation it will do won't be visible to the calling flow, but this will change the response of "msp2bass".
Another option would consist in putting the byte-array-to-object-transformer and choice elements in a response block above the cxf:proxy-client, that way you would affect the response after CFX so it would stop complaining.