Apache came XPATH fails when parsing xml file with content .
Please find the route below
fromF("file://%s?recursive=true", inputDir)
.routeId("PollFiles")
.log("*** file found ${header.CamelFileName}")
.toF("file://%s?recursive=true",
archiveDir)
.log("*** file found ${body}")
//.convertBodyTo(String.class)
.choice().when()
.xpath("//Available[Class='package']"). log("*** found ${body}")
.end();
Error
org.apache.camel.TypeConversionException: Error during type conversion from type: java.lang.String to the required type: org.w3c.dom.Document with value [Body is instance of java.io.InputStream] due java.io.FileNotFoundException: /Users/solution//X1.DTD (No such file or directory)
Would appreciate your assistence
It's not xpath related, your error says:
java.io.FileNotFoundException: /Users/solution//n (No such file or directory)
that means the file supplied to your method does not exist.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.