Closed RukshiW closed 3 years ago
Description:
The following are the steps followed:
Create an XML file with the following content:
<?xml version="1.0" encoding="UTF-8"?> <flights> <flightevent> <flight>QR-1405</flight> <details> <destination>lisbon</destination> <passengers>200</passengers> <duration>6 35m</duration> </details> </flightevent> <flightevent> <flight>QR-0273</flight> <details> <destination>amsterdam</destination> <passengers>220</passengers> <duration>7h 40m</duration> </details> </flightevent> <flightevent> <flight>QR-1019</flight> <details> <destination>amsterdamn</destination> <passengers>210</passengers> <duration>7h 35m</duration> </details> </flightevent> </flights>
Save it is a preferred location (e.g., /Users/foo directory).
In the Streaming Integrator Tooling milestone pack, create and save the following Siddhi application.
@App:name('ConvertXMLFormatApp') @App:description('Description of the plan') @source(type = 'file', file.uri = "file:/users/foo/flights.xml", @map(type = 'xml', enclosing.element = "/flights/flightevent", enclosing.element.as.event = "true", @attributes(flight = "flight", destination = "details/destination", passengers = "details/passengers", timeDuration = "details/duration"))) define stream FlightInfoStream (flight string, destination string, passengers int, timeDuration string); @sink(type = 'file', file.uri = "file:/users/foo/formatttedflights.xml", @map(type = 'xml')) define stream FormattedFlightInfoStream (flight string, destination string, passengers int, timeDuration string); @info(name = 'Publish formatted events') from FlightInfoStream select * insert into FormattedFlightInfoStream;
Start the Siddhi application. An error log appears and it includes the "java.lang.NoClassDefFoundError" error. The complete error log is attached.
XML Custom Mapping Error Log.txt
This issue is not there anymore in the latest pack.
Description:
The following are the steps followed:
Create an XML file with the following content:
Save it is a preferred location (e.g., /Users/foo directory).
In the Streaming Integrator Tooling milestone pack, create and save the following Siddhi application.
Start the Siddhi application. An error log appears and it includes the "java.lang.NoClassDefFoundError" error. The complete error log is attached.
XML Custom Mapping Error Log.txt