Route configured with Apache Camel split xtokenize fails in Studio

Problem Description

A route configured to use the split xtokenize method, as described on the Apache Camel Splitter page, runs as expected outside of Talend Studio, but fails to run in Studio, with the following exception:

javax.xml.stream.XMLStreamException: reader not supporting Location
    at org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.getNextToken(XMLTokenExpressionIterator.java:470)
    at org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.<init>(XMLTokenExpressionIterator.java:233)
    at org.apache.camel.support.XMLTokenExpressionIterator$XMLTokenIterator.<init>(XMLTokenExpressionIterator.java:185)
    at org.apache.camel.support.XMLTokenExpressionIterator.createIterator(XMLTokenExpressionIterator.java:92)
...

 

Root Cause

Camel split xtokenize uses StAX Location API and requires a StAX Reader implementation (for example, woodstox). These require stax2-api and woodstox-core libraries.

 

Solution

Add a cConfig to the route, then select the following JAR files from the drop-down list of libraries:

  • stax2-api-3.1.4
  • woodstox-core-asl-4.4.1
Version history
Revision #:
7 of 7
Last update:
‎08-16-2019 09:20 AM
Updated by: