Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kedy2she
Contributor
Contributor

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

Labels (3)
1 Solution

Accepted Solutions
kedy2she
Contributor
Contributor
Author

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

View solution in original post

3 Replies
Anonymous
Not applicable

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

 

kedy2she
Contributor
Contributor
Author

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

Anonymous
Not applicable

Hi Kedy2she,

I am facing the same issue. You are solving this issue, by setting JAVA_PATH variable in environment variable.

Is it necessary to declare path variable?

I have added only JAVA_HOME.

So please tell me the exact way.

Thnx in advance.