I'm having an error with mule standalone version 3.8.1 when trying to transform a payload into an xml before sending it to a webservice.
My flow config is like this:
<dw:transform-message doc:name="Transform Message" mode="immediate">
<dw:set-payload>
<![CDATA[%dw 1.0
%input payload application/java
%output application/xml
%namespace ns0 urn:INDRA:JIRA:Integracion
---
{
ns0#Create: {
KeyClient: payload.externalIssue,
Accion: payload.accion,
Priority: payload.priority,
Assignee: payload.assignee,
Resolution_Coment: payload.reopenComment,
Solucion: payload.comment,
IssueType: payload.issueType,
ComponentJIRA: payload.component,
No_Rellenar: ""
}
}
]]>
</dw:set-payload>
</dw:transform-message>
When we try to process the message we get:
ERROR 2016-12-19 12:36:37,822 [ActiveMQ Session Task-4] org.mule.exception.RollbackMessagingExceptionStrategy:
********************************************************************************
Message : com.mulesoft.weave.module.Module: Provider com.mulesoft.weave.module.flatfile.FlatFileModule could not be instantiated: java.lang.NoClassDefFoundError: com/mulesoft/flatfile/schema/EdiSchema (java.util.ServiceConfigurationError).
Payload : RemedyMessageBean{accion='TCURSO', comment=' ', empresa='SSII-Administración (CSA)', externalIssue='INC000000004965', projectParameter4='No Aplica', dueDate='31/12/2016 10:17:00', priority='', reopenComment='', projectParameter1='No Aplica', projectParameter11='No Aplica', stopReason='', component='AX-UTES', issueType='', stopComment='null', assignee=''}
Element XML : <dw:transform-message doc:name="Transform Message" mode="immediate">
<dw:set-payload>%dw 1.0%input payload application/java%output application/xml%namespace ns0 urn:INDRA:JIRA:Integracion---{ns0#Create: {KeyClient: payload.externalIssue,Accion: payload.accion,Priority: payload.priority,Assignee: payload.assignee,Resolution_Coment: payload.reopenComment,Solucion: payload.comment,IssueType: payload.issueType,ComponentJIRA: payload.component,No_Rellenar: ""}}</dw:set-payload>
</dw:transform-message>
Payload Type : es.indra.esb.remedy.servicios.RemedyMessageBean
Element : /AsincronoRemedySI/processors/2/5/0/3 @ EsbOrigin-a:remedy-config.xml:508 (Transform Message)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.lang.ClassNotFoundException: com.mulesoft.flatfile.schema.EdiSchema
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.mule.module.launcher.FineGrainedControlClassLoader.findClass(FineGrainedControlClassLoader.java:175)
at org.mule.module.launcher.MuleApplicationClassLoader.findClass(MuleApplicationClassLoader.java:134)
at org.mule.module.launcher.FineGrainedControlClassLoader.loadClass(FineGrainedControlClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.privateGetPublicMethods(Class.java:2651)
at java.lang.Class.privateGetPublicMethods(Class.java:2667)
at java.lang.Class.getMethods(Class.java:1467)
at com.mulesoft.weave.module.option.Settings$class.set(Settings.scala:30)
The dependency in my pom.xml is:
<dependency>
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave</artifactId>
<version>${mule.version}</version>
</dependency>
try adding this to your pom.xml too