Forum Discussion

Awesome's avatar
Awesome
Frequent Contributor
15 years ago

net.sf.jasperreports.engine.JRException

when trying to export jasper report

cmd.exe /C %soapui_bin%\testrunner.bat -e%soapui_endpoint% -r -j -R"Project Report" -FPDF -fresults\1\ -o -g %soapui_project_dir%\%soapui_project_file%



---stack------
00:43:29,807 DEBUG [SoapUIJReportProtocolFactory] Creating handler for protocol [subreport]
00:43:29,807 DEBUG [SubReportProtocolHandler] Getting subreport for url [subreport:CoverageReport]
00:43:31,338 DEBUG [SoapUIJReportProtocolFactory] Creating handler for protocol [logo]
00:43:31,338 DEBUG [SoapUIJReportProtocolFactory] Creating handler for protocol [logo]
00:43:31,354 DEBUG [SoapUIJReportProtocolFactory] Creating handler for protocol [logo]
net.sf.jasperreports.engine.JRException: Error trying to export to file : ..\results\2\Project Report.pdf
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:388)
at com.eviware.soapui.reporting.engine.jasper.GenerateJasperReport.a(SourceFile:387)
at com.eviware.soapui.reporting.engine.jasper.GenerateJasperReport.generateJasperReport(SourceFile:317)
at com.eviware.soapui.reporting.engine.jasper.JasperReportEngine$GeneratableJasperReport.generate(SourceFile:121)
at com.eviware.soapui.SoapUIProTestCaseRunner.generateReports(SourceFile:200)
at com.eviware.soapui.SoapUIProTestCaseRunner.runProject(SourceFile:179)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:310)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:128)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:72)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:48)
Caused by: java.io.FileNotFoundException: ..\results\2\Project Report.pdf (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:382)
... 9 more

6 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi again,

    just a quick check.. does the ..\results\2 folder exist?

    regards!

    /Ole
    eviware.com
  • Awesome's avatar
    Awesome
    Frequent Contributor
    yes, and both the junit report (.html) and coverage report (.html) are generated.
    i tried the other export formats for the jasper report, but no luck...
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    hmm.. could you try specifying absolute folder path in the -f argument just to see if that helps?

    regards,

    /Ole
    eviware.com
  • Awesome's avatar
    Awesome
    Frequent Contributor
    hi Ole,

    thanks that seems to have fixed it!

    would i need to wait for a fix in a nightly-build to use relative paths?

    cmd.exe /C %soapui_bin%\testrunner.bat -e%soapui_endpoint% -r -j -R"Project Report" -FPDF -fC:\workspace\soapui-nightly\SOAP_Workspace\results\2\ -o -g
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    unfortunately I can't reproduce it myself with relative paths yet.. I'll keep trying..

    regards,

    /Ole
    eviware.com