I am generating a pdf report by reading a jrxml file.The pdf report is read and displayed as a repview in the browser.When i deploy the war file in my local and try to do this operation it is working fine.But when i try to do the same in the DEV server it is throwing filenotfound exception.
The structure of my deployed app in
tomcat directory is apache-tomcat-6.0.29\webapps\lpsr\reports where i am storing my reports in reports directory.
My pdf previewing code snippet is as below
generateReport method from where report gets generated
As i mentioned before it is working fine in local environment but in DEV server it is throwing
java.io.FileNotFoundException: /app/tomcat/tomcat-inst1/tomcat-current/webapps/lpsr/reports/generalCoverageReport.pdf (No such file or directory)
and stacktrace is pointing to
input = new BufferedInputStream(new FileInputStream(file), DEFAULT_BUFFER_SIZE); in generatePreview method.
I am not able to figure out reason for this and right now i cannot view server log.
Please help me to solve this issue.Thanks in advance.