I am getting the following exception :
ion: class path resource [xsl/ExtremeSearchRQ.xsl] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/data/ytxdist/SCH
The following code throws this exception :
String xslSourceFile = "xsl/ExtremeSearchRQ.xsl";
String xmlSource = "ExtremeSearchRQ.xml";
Writer paramWriter = new StringWriter();
ClassPathResource resource = new ClassPathResource(xslSourceFile);
streamSrcFile = new StreamSource(resource.getFile());
The exception is thrown by the resource.getFile() line.
I am running my project with the following line :
java -cp "libs/*:conf" com.yatra.extremesearch.ap
Here the libs folder contains the yatra_extremesearch.jar file
when i unzip the jar i also see the file xsl/ExtremeSearchRQ.xsl
Still its giving an exception saying fileNot Found
What could be reason for this.