找不到外部组件库

时间:2017-02-02 12:31:06

标签: wso2esb

我正在尝试从wso2文档运行“Sample 271:File Processing”并运行以下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.

我做了以下验证:

  • milyn-smooks-csv-1.2.4.jar位于wso2esb-5.0.0\repository\components\lib
  • milyn_smooks_csv_1.2.4_1.0.0.jarwso2esb-5.0.0\repository\components\dropins
  • 启动时生成
来自控制台的

捆绑详细信息是:

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

本地输入是:

<?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是:

<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>

任何建议?

感谢。

1 个答案:

答案 0 :(得分:-1)

根据this topic,当您指定smooks config-key属性时,似乎存在问题。 我相信你本地文件中的路径应该与我们的文件夹相关,即它应该是这样的:

<localEntry key="smooks" src="file:resources/smooks-config.xml"/>