0

I'm trying to use smooks 1.5 to transform a csv file to xml. I have already imported all smooks jar, but getting this error

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration >problem: Unable to locate NamespaceHandler for namespace >>[http://www.muleforge.org/smooks/schema/mule-module-smooks] Offending resource: URL >>[file:/D:/Documents/MuleStudio/workspace/.mule/apps/smooksapp/SmooksApp.xml]

This is my mule-config file

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:smooks="http://www.muleforge.org/smooks/schema/mule-module-smooks" 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.4.0" 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/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.muleforge.org/smooks/schema/mule-module-smooks http://dist.muleforge.org/smooks/schema/mule-module-smooks/1.3/mule-module-smooks.xsd">
    <flow name="SmooksAppFlow1" doc:name="SmooksAppFlow1">
        <file:inbound-endpoint path="D:\Documents\MuleStudio\workspace\smooksapp\src\main\resources" responseTimeout="10000" doc:name="File"/>
        <smooks:transformer name="csvToXmlSmooksTransformer" configFile="D:\Documents\MuleStudio\workspace\smooksapp\src\main\resources\smooks-config.xml" resultType="STRING" reportPath="target/smooks-report/report.html" />
        <file:outbound-endpoint responseTimeout="10000" doc:name="File" path="D:\Documents\MuleStudio\workspace\smooksapp\src\main\resources"/>
    </flow>
</mule>
philip
  • 484
  • 9
  • 26
  • I didn't know there was a version of the Smooks Mule module that could work on 3.4. Where did you get it from? – David Dossot Aug 27 '13 at 14:09
  • I don;t think Smooks can work for Mule 3.4, please is there another transformer that can be used with mule 3.4 that is as robust as smooks – philip Sep 04 '13 at 07:51
  • For CE, I don't know of any: you'd have to roll out your own. For EE, that would be DataMapper's job. – David Dossot Sep 04 '13 at 16:39

1 Answers1

1

Add this to your project pom.xml file:

<dependencies>
   ...
   <!-- The Mule Smooks Module -->
   <dependency>
       <groupId>org.mule.modules.mule-module-smooks</groupId>
       <artifactId>smooks-4-mule-3</artifactId>
       <version>1.3-RC1</version>
   </dependency>
   ...
</dependencies>

Works fine with Mule version 3.4.1.

Boris
  • 22,667
  • 16
  • 50
  • 71