#1 2012-07-30 15:28:08

achouhan
Member
Registered: 2012-04-02
Posts: 17

tJasperoutput throwing error

Hi,

I am using tJasperoutput component in Talend Integration Suit 5.0 to generate report. If all the filelds of the Report are of string type, then I am getting perfect output but if the jrxml has an integer or float values then the tJasperoutput step throws error. The schema of input component and tJasperoutput component is same.

The following is the error msg I am getting:-
Starting job Report3 at 16:58 30/07/2012.

[statistics] connecting to socket on port 3724
[statistics] connected
Exception in component tJasperOutput_1
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Cannot cast from Integer to String
                value = (java.lang.String)(((java.lang.Integer)field_emp_id.getValue())); //$JR_EXPR_ID=11$
                        <-------------------------------------------------------------->
2. Cannot cast from Float to String
                value = (java.lang.String)(((java.lang.Float)field_sales.getValue())); //$JR_EXPR_ID=14$
                        <----------------------------------------------------------->
3. Cannot cast from Integer to String
                value = (java.lang.String)(((java.lang.Integer)field_emp_id.getOldValue())); //$JR_EXPR_ID=11$
                        <----------------------------------------------------------------->
4. Cannot cast from Float to String
                value = (java.lang.String)(((java.lang.Float)field_sales.getOldValue())); //$JR_EXPR_ID=14$
                        <-------------------------------------------------------------->
5. Cannot cast from Integer to String
                value = (java.lang.String)(((java.lang.Integer)field_emp_id.getValue())); //$JR_EXPR_ID=11$
                        <-------------------------------------------------------------->
6. Cannot cast from Float to String
                value = (java.lang.String)(((java.lang.Float)field_sales.getValue())); //$JR_EXPR_ID=14$
                        <----------------------------------------------------------->
6 errors

    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)
    at client.report3_0_1.Report3.tFileInputDelimited_1Process(Report3.java:747)
    at client.report3_0_1.Report3.runJobInTOS(Report3.java:973)
    at client.report3_0_1.Report3.main(Report3.java:841)
[statistics] disconnected
Job Report3 ended at 16:58 30/07/2012. [exit code=1]


Thanks

Offline

#2 2012-07-31 03:11:33

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: tJasperoutput throwing error

Hi All

This issue is related to the topic [Forum, topic 25305] tJasperoutput.

Regards,
Pedro


Only Paranoid Survive.

Offline

Board footer

Powered by FluxBB