Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: BigNumber does not implement this method

  1. #1
    Join Date
    Dec 2017
    Posts
    6

    Default BigNumber does not implement this method

    Hi All,

    For Pentaho 7.0 getting below error in the user defined java expression step.
    Can anyone please help me on this?






    2017/12/26 13:29:38 - Join Rows (cartesian product).0 - Finished processing (I=0, O=0, R=31, W=30, U=0, E=0)
    2017/12/26 13:29:38 - Filter rows.0 - Finished processing (I=0, O=0, R=30, W=0, U=0, E=0)
    2017/12/26 13:29:38 - Formulas.0 - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : Unexpected error
    2017/12/26 13:29:38 - Formulas.0 - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : org.pentaho.di.core.exception.KettleException:
    2017/12/26 13:29:38 - Formulas.0 - org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.trans.steps.janino.Janino.processRow(Janino.java:113)
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
    2017/12/26 13:29:38 - Formulas.0 - at java.lang.Thread.run(Unknown Source)
    2017/12/26 13:29:38 - Formulas.0 - Caused by: org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.trans.steps.janino.Janino.calcFields(Janino.java:220)
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.trans.steps.janino.Janino.processRow(Janino.java:104)
    2017/12/26 13:29:38 - Formulas.0 - ... 2 more
    2017/12/26 13:29:38 - Formulas.0 - Caused by: org.pentaho.di.core.exception.KettleValueException:
    2017/12/26 13:29:38 - Formulas.0 - BigNumber does not implement this method
    2017/12/26 13:29:38 - Formulas.0 -
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.core.row.value.ValueMetaBase.getNativeDataTypeClass(ValueMetaBase.java:5055)
    2017/12/26 13:29:38 - Formulas.0 - at org.pentaho.di.trans.steps.janino.Janino.calcFields(Janino.java:155)
    2017/12/26 13:29:38 - Formulas.0 - ... 3 more
    2017/12/26 13:29:38 - Formulas.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
    2017/12/26 13:29:38 - trf_1 - Transformation detected one or more steps with errors.
    2017/12/26 13:29:38 - trf_1- Transformation is killing the other steps!
    2017/12/26 13:29:38 - Group by Non Experts.0 - Finished processing (I=0, O=0, R=5176, W=2, U=0, E=0)
    2017/12/26 13:29:38 - User Defined Java Expression.0 - Finished processing (I=0, O=0, R=15276, W=15276, U=0, E=0)
    2017/12/26 13:29:38 - Stream lookup.0 - Finished processing (I=0, O=0, R=15377, W=15377, U=0, E=0)
    2017/12/26 13:29:38 - Filter rows 2.0 - Finished processing (I=0, O=0, R=5276, W=5276, U=0, E=0)
    2017/12/26 13:29:38 - sales.0 - Finished reading query, closing connection.
    2017/12/26 13:29:38 - If field value is null.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
    2017/12/26 13:29:39 - sales.0 - Finished processing (I=17910, O=0, R=0, W=17908, U=0, E=0)
    2017/12/26 13:29:39 - trf_1 - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : Errors detected!
    2017/12/26 13:29:39 - trf_1 - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : Errors detected!
    2017/12/26 13:29:39 - trf_1 - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : Errors detected!
    Last edited by pshinde; 12-26-2017 at 05:44 AM.

  2. #2
    Join Date
    May 2016
    Posts
    282

    Default

    Maybe if you put the calculation you are performing, someone might have a clue, or if it's a long formula, breaking it into smaller pieces to get the expression which is giving you problems.
    Regards
    OS: Ubuntu 16.04 64 bits
    Java: Openjdk 1.8.0_131
    Pentaho 6.1 CE

  3. #3
    Join Date
    Dec 2017
    Posts
    6

    Default

    Thanks for your A2A.
    PFA image of the expressions used in UDJC.
    Name:  BIGNUMBER.jpg
Views: 103
Size:  18.2 KB
    Attached Images Attached Images  
    Last edited by pshinde; 01-02-2018 at 08:42 AM.

  4. #4
    Join Date
    Aug 2016
    Posts
    290

    Default

    Images on this forum is resized to very small sizes, so we can't read anything in the ones you uploaded. Share the text instead.

  5. #5
    Join Date
    Dec 2017
    Posts
    6

    Default

    Sorry for the inconvenience.
    Here are the expressions in the UDJC step. Input to this step is from the output of Replace Null Value step(replace null by 0).


    New field Java expression Value type Length
    cph_contribute_amt_tmp cph_contribute_amt.doubl Number
    ctr_rate (sph_net_sales_amt == 0) ? 0 : cph_contribute_amt_tmp/sph_net_sales_amt Number
    pa_spp_eligible_net_sales_amt pa_eligible_net_sales_amt + spp_eligible_net_sales_amt Number
    pa_to_parity (pa_spp_eligible_net_sales_amt == 0 ) ? 0 : (pa_net_sales_amt + spp_net_sales_amt - pa_divisional_standard_net_sales_amt ) / pa_spp_eligible_net_sales_amt Number
    credit_share (tot_credit_sales_amt == 0 ) ? 0 : srs_credit_sales_amt / tot_credit_sales_amt Number
    lmd_rate (tot_lmd_net_sales_amt == 0) ? 0 : tot_local_markdowns_amt/ tot_lmd_net_sales_amt Number
    return_rate (rr_tot_net_sales_amt == 0) ? 0 : (return_sales_amt + exchange_sales_amt) / rr_tot_net_sales_amt Number
    SPH (sph_hr_worked == 0) ? 0 : sph_net_sales_amt / sph_hr_worked Number
    member (double)((feedback_count == 0) ? 0 : (promoters_count - detractors_count) / feedback_count)*100 Number
    CPH (cph_hr_worked == 0) ? 0 : cph_contribute_amt_tmp /cph_hr_worked Number

    And breaking the expression into smaller pieces throws the same error.
    Thanks in advance.

  6. #6
    Join Date
    Dec 2017
    Posts
    6

    Default

    Sorry for the inconvenience.
    Here are the expressions in the UDJC step. Input to this step is from the output of Replace Null Value step(replace null by 0).



    New field Java expression Value type Length Precision Replace value
    cph_contribute_amt_tmp cph_contribute_amt.doubleValue() Number
    ctr_rate (sph_net_sales_amt == 0) ? 0 : cph_contribute_amt_tmp/sph_net_sales_amt Number
    pa_spp_eligible_net_sales_amt pa_eligible_net_sales_amt + spp_eligible_net_sales_amt Number
    pa_to_parity (pa_spp_eligible_net_sales_amt == 0 ) ? 0 :
    (pa_net_sales_amt + spp_net_sales_amt - pa_divisional_standard_net_sales_amt ) / pa_spp_eligible_net_sales_amt
    Number
    credit_share (tot_credit_sales_amt == 0 ) ? 0 : srs_credit_sales_amt / tot_credit_sales_amt Number
    lmd_rate (tot_lmd_net_sales_amt == 0) ? 0 : tot_local_markdowns_amt/ tot_lmd_net_sales_amt Number
    return_rate (rr_tot_net_sales_amt == 0) ? 0 : (return_sales_amt + exchange_sales_amt) / rr_tot_net_sales_amt Number
    SPH (sph_hr_worked == 0) ? 0 : sph_net_sales_amt / sph_hr_worked Number
    member (double)((feedback_count == 0) ? 0 : (promoters_count - detractors_count) / feedback_count)*100 Number
    CPH (cph_hr_worked == 0) ? 0 : cph_contribute_amt_tmp /cph_hr_worked Number

    And breaking the expression into smaller pieces throws the same error.
    Thanks in advance.

  7. #7
    Join Date
    Nov 2009
    Posts
    688

    Default

    Perhaps it has to do with this error?
    http://jira.pentaho.com/browse/PDI-15836

  8. #8
    Join Date
    Dec 2017
    Posts
    6

    Default

    Yes. The error is similar as that of JIRA.

  9. #9
    Join Date
    Aug 2016
    Posts
    290

    Default

    I run a different version than you, but what I had to do was to encapsulate the result value in "new Integer()". So for example this line:

    (sph_net_sales_amt == 0) ? 0 : cph_contribute_amt_tmp/sph_net_sales_amt

    Would be written like this:

    (sph_net_sales_amt == 0) ? 0 : new Integer(cph_contribute_amt_tmp/sph_net_sales_amt)

    However I'm not sure what java data type corresponds to Pentaho "Number", but it seems like Double from your first line?

    What you could also do is to try each java expression individually to see which one(s) cause the crash.

  10. #10
    Join Date
    Dec 2017
    Posts
    6

    Default

    Thanks everyone..

    We used modified java script instead of user defined java script..
    and changed the doublevalue() to parseFloat() i.e
    cph_contribute_amt_tmp=cph_contribute_amt.doubleValue()
    to
    cph_contribute_amt_tmp=parseFloat(cph_contribute_amt)
    And its working fine.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.