I'd like to configure Apache Camel FOP component to use configuration file (as described here). It seems Camel is looking for the file in server base path, because I got exception:
Caused by: java.io.FileNotFoundException: C:\Users\user\Eclipse\eclipse\src\main\webapp\WEB-INF\fop.xml
What I want is to store configuration file path in classpath along with other configuration files.
Here is Camel route:
from("direct:renderer").routeId("direct:renderer")
.onException(Exception.class)
// Exception handling
.end()
// I want fop.xml config file to be looked for in classpath
.to("fop:application/pdf?userConfigURL=src/main/webapp/WEB-INF/fop.xml")
.setHeader("CamelFileName", simple("${property.job.id}.pdf"))
.to("file:eiocha/pdf")
I'm using Apache Camel of version 2.10.3
Thanks in advance