Four Stars

Java error when generating report in tJasperOutput

I tried to generate a pdf report using tJapserOutput however I face an error as shown below. Firstly, we does it point to C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_1510843960965_974411.java to compile a a file that doesn't exists and is not defined in the tJasperOutput component. Besides that, I have tried pointing the latest version of JDK but the same error occur. Please assists. Thank you in advance.

 

 Exception in component tJasperOutput_1 (Create_PDF_Files)
net.sf.jasperreports.engine.JRException: Error compiling report java source files: C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_1510843960965_974411.java C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_Table32Dataset321_1510843960965_974411.java C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_Table32Dataset322_1510843960965_974411.java .
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:105)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:74)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:212)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:273)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:566)
at local_project.create_pdf_files_0_1.Create_PDF_Files.tFileList_1Process(Create_PDF_Files.java:5582)
[statistics] disconnected
at local_project.create_pdf_files_0_1.Create_PDF_Files.runJobInTOS(Create_PDF_Files.java:7451)
at local_project.create_pdf_files_0_1.Create_PDF_Files.main(Create_PDF_Files.java:7300)
Caused by: java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:74)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 12 more

1 ACCEPTED SOLUTION

Accepted Solutions
Four Stars

Re: Java error when generating report in tJasperOutput

Hi Sabrina,

I manage to fixed the problem, that is to include /bin when defining the java directory in Path environment. 
Thank you.

 

Best regards,

Sam

2 REPLIES
Moderator

Re: Java error when generating report in tJasperOutput

Hi,


kedy2she wrote:

I tried to generate a pdf report using tJapserOutput however I face an error as shown below. Firstly, we does it point to C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_1510843960965_974411.java to compile a a file that doesn't exists and is not defined in the tJasperOutput component. Besides that, I have tried pointing the latest version of JDK but the same error occur. Please assists. Thank you in advance.

 

 Exception in component tJasperOutput_1 (Create_PDF_Files)
net.sf.jasperreports.engine.JRException: Error compiling report java source files: C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_1510843960965_974411.java C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_Table32Dataset321_1510843960965_974411.java C:\Talend\TOS_DI-Win32-20170623_1246-V6.4.1\report2_Table32Dataset322_1510843960965_974411.java .
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:105)
at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:74)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:212)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:273)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:566)
at local_project.create_pdf_files_0_1.Create_PDF_Files.tFileList_1Process(Create_PDF_Files.java:5582)
[statistics] disconnected
at local_project.create_pdf_files_0_1.Create_PDF_Files.runJobInTOS(Create_PDF_Files.java:7451)
at local_project.create_pdf_files_0_1.Create_PDF_Files.main(Create_PDF_Files.java:7300)
Caused by: java.io.IOException: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:74)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 12 more


Are you using 32 bit talend application? TOS_DI-win32-x86.exe for 32 OS and TOS_DI-win-x86_64.exe for 64 bit(Windows, for example)

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Java error when generating report in tJasperOutput

Hi Sabrina,

I manage to fixed the problem, that is to include /bin when defining the java directory in Path environment. 
Thank you.

 

Best regards,

Sam