Hitachi Vantara Pentaho Community Forums
Results 1 to 14 of 14

Thread: Pinpointing a conversion error

  1. #1
    Join Date
    May 2007
    Posts
    19

    Default Pinpointing a conversion error

    Hi,

    I have a transformation that fails at some point during an Insert/Update step because of a conversion error. Even at the most detailed log level (row-level), all I get is the following message:

    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : Unexpected error :
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Double
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : at org.pentaho.di.core.row.ValueMeta.getNumber(ValueMeta.java:1284)
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : at org.pentaho.di.core.row.ValueMeta.compare(ValueMeta.java:2788)
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.lookupValues(InsertUpdate.java:131)
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.processRow(InsertUpdate.java:276)
    2007/11/07 16:18:00 - Insert / Update.0 - ERROR (version 3.0.0-RC2, build 299036 from 2007/10/31 23:59:46) : at org.pentaho.di.trans.steps.insertupdate.InsertUpdate.run(InsertUpdate.java:490)


    This Insert/Update step inserts about 50 fields in each record, but the the debug output gives me absolutely no clue about which field causes the error.

    Is there any way to find out?

    Thanks in advance

    François

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    JDBC eats a lot of error messages, but this time it's not even in JDBC.

    With the current build it does not specify which field is involved... do show input fields on the input/update table and find the Number fields. Somehow you get Long data in your row which it can't cast to Number.

    You can raise a JIRA tracker for better error messages.

    Regards,
    Sven

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    We actually fixed a number of issues with regards to this kind of problem.
    Whenever the metadata says that you get a number as result and the step sends Integer data you get into trouble in subsequent step.
    A number of steps suffered from this, but without knowing which ones you use, I'm not going to guess.

  4. #4
    Join Date
    May 2007
    Posts
    19

    Default

    Hi,

    Quote Originally Posted by MattCasters View Post
    A number of steps suffered from this, but without knowing which ones you use, I'm not going to guess.

    Well, if I look at all the steps in my transformation, there are quite a few, namely:

    • Fixed file input
    • Select values
    • Sort rows
    • Modified Javascript value
    • Database join
    • Database lookup
    • and finally Insert/Update
    Could any of these be the culprit? If yes, is there any way to patch that?

  5. #5
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    The most likely candidate is the JavaScript step, although others can be at work.
    Simply do a preview on the data in each step and you should get an exception on the console (Trans log view).
    That should allow you to pinpoint the problem quite accurately.

    Also have a look at the PDI 3 migration guide:

    http://wiki.pentaho.org/display/EAI/...igration+guide

    HTH,
    Matt

  6. #6
    Join Date
    May 2007
    Posts
    19

    Default

    Hi,
    Quote Originally Posted by MattCasters View Post
    The most likely candidate is the JavaScript step, although others can be at work.
    Simply do a preview on the data in each step and you should get an exception on the console (Trans log view).
    That should allow you to pinpoint the problem quite accurately.
    OK, I'll try that. I'll also try getting the latest version from repository, so I can benefit from the patch for that case.

    Quote Originally Posted by MattCasters View Post
    Also have a look at the PDI 3 migration guide:

    http://wiki.pentaho.org/display/EAI/...igration+guide

    HTH,
    Matt
    Oh, I didn't about that document. I'll take a look.

    Thanks

    François

  7. #7
    Join Date
    May 2007
    Posts
    19

    Default

    Quote Originally Posted by fsuter View Post
    I'll also try getting the latest version from repository, so I can benefit from the patch for that case.
    Except I can't find a URL for the SVN repository... Could you point me to the right address please?

    François

  8. #8
    Join Date
    May 2006
    Posts
    4,882

    Default

    Look in the PDI-FAQ under english/doc, it's in there.

    Regards,
    Sven

  9. #9
    Join Date
    May 2007
    Posts
    19

    Default

    Gotcha.

    However I've got an error while trying to check out:

    Invalid diff stream: insn 1 cannot be decoded
    Any idea what the problem can be? I'm trying to check out using SVN Tortoise on Windows XP.

    François

  10. #10
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    No idea. Probably an SVN or network problem.
    Make sure to try the http address too : http://kettle.pentaho.org/svn/Kettle/trunk/

  11. #11
    Join Date
    May 2007
    Posts
    19

    Smile

    Hi,

    Quote Originally Posted by MattCasters View Post
    No idea. Probably an SVN or network problem.
    Make sure to try the http address too : http://kettle.pentaho.org/svn/Kettle/trunk/
    Indeed the error was in the URL. I was using svn://source.pentaho.org/svnkettleroot, which is mentioned on the page http://community.pentaho.org/getthecode/

    Maybe this page should be updated?

    Cheers

    François

  12. #12
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    No François, that address just works fine. I'm sure your firewall is simply blocking the SVN protocol, that's all.

    Matt

  13. #13
    Join Date
    May 2007
    Posts
    19

    Default

    Hi,

    Quote Originally Posted by MattCasters View Post
    The most likely candidate is the JavaScript step, although others can be at work.
    Simply do a preview on the data in each step and you should get an exception on the console (Trans log view).
    I'm coming back to that problem belatedly having left it to the side for a while. What do you call a "Trans log view" exactly?

    Thanks

    François

  14. #14
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    The log you see when you execute a transformation.
    Also available by clicking right on the transformation name in the upper left hand tree in Spoon.

    Matt

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.