0

I'm trying to run the "Sample 271: File Processing" from wso2 documentation and run into the following ClassNotFoundException :

ERROR - SmooksMediator Failed to filter source.
org.milyn.SmooksException: Failed to filter source.
   at ...
   ... 
Caused by: java.lang.ClassNotFoundException: org/milyn/csv/CSVParser
   at ... 
   ...
   ERROR - SequenceMediator Failed to filter source. Caused by Failed to filter source.

I did the following verifications :

  • milyn-smooks-csv-1.2.4.jar is in wso2esb-5.0.0\repository\components\lib
  • milyn_smooks_csv_1.2.4_1.0.0.jar is generated at startup in wso2esb-5.0.0\repository\components\dropins

bundle details from console is :

milyn_smooks_csv_1.2.4_1.0.0 [96]
  Id=96, Status=ACTIVE      Data Root=D:\tools\wso2esb-5.0.0\repository\components\default\configuration\org.eclipse.osgi\bundles\96\data
  "No registered services."
  No services in use.
  Exported packages
    org.milyn.csv; version="0.0.0"[exported]
    org.milyn.csv.prog; version="0.0.0"[exported]
    *; version="0.0.0"<unwired><dynamic>
  No fragment bundles
  Named class space
    milyn_smooks_csv_1.2.4; bundle-version="1.0.0"[provided]
  No required bundles

Local entry is :

<?xml version="1.0" encoding="UTF-8"?>
<localEntry key="smooks" src="file:/D:/tools/wso2esb-5.0.0/resources/smooks-config.xml" xmlns="http://ws.apache.org/ns/synapse"/>

smooks-config.xml is :

<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">

  <!--Configure the CSVParser to parse the message into a stream of SAX events. -->
  <resource-config selector="org.xml.sax.driver">
    <resource>org.milyn.csv.CSVParser</resource>
    <param name="fields" type="string-list">name,surname,phone</param>
  </resource-config>

</smooks-resource-list>

Any suggetsions ?

Thanks.

Community
  • 1
  • 1
Patrice
  • 1,404
  • 1
  • 14
  • 27

1 Answers1

-1

According to this topic,it looks like there is an issue when you specify the smooks config-key attribute. I believe the path in your local file should be relative to our folder, i.e it should be something like this:

<localEntry key="smooks" src="file:resources/smooks-config.xml"/>
Community
  • 1
  • 1
Rodrigo Vasconcelos
  • 1,270
  • 2
  • 14
  • 26
  • I did the change you suggested without success... I keep getting the same error. in anycase, I don't believe this is the problem as smooks-config.xml is found without complaints... the problem is on resolving the class org.milyn.csv.CSVParser – Patrice Feb 02 '17 at 16:32