Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Logging changes & Unit Test Failure

  1. #1
    Phil Guest

    Default Logging changes & Unit Test Failure

    Hi,

    Just noticed the logging changes that went in today. One of the
    blackbox unit tests started failing due to the log file changing. The
    log file repeats itself now, is this intended? If so, I'll update the
    unit test expected log file.

    Previously
    testfiles/blackbox/tests/trans/steps/csvinput/csvinput-error1.ktr produced:

    datafile.0 : Unexpected error :
    datafile.0 : org.pentaho.di.core.exception.KettleException:
    datafile.0 : java.io.IOException: Unable to get VFS File object for
    filename 'ftp://bogus/testfiles/customer-dimension-test.csv' :
    org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    server on "bogus".
    datafile.0 : Unable to get VFS File object for filename
    'ftp://bogus/testfiles/customer-dimension-test.csv' :
    org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    server on "bogus".
    datafile.0 :
    datafile.0 : Caused by: java.io.IOException: Unable to get VFS File
    object for filename 'ftp://bogus/testfiles/customer-dimension-test.csv'
    : org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    server on "bogus".

    It now produces:

    datafile.0 : Unexpected error :
    datafile.0 : org.pentaho.di.core.exception.KettleException:
    datafile.0 : org.pentaho.di.core.exception.KettleFileException:
    datafile.0 :
    datafile.0 : Unable to get VFS File object for filename
    'ftp://bogus/testfiles/customer-dimension-test.csv'
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 :
    datafile.0 :
    datafile.0 : Unable to get VFS File object for filename
    'ftp://bogus/testfiles/customer-dimension-test.csv'
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 :
    datafile.0 : Caused by: org.pentaho.di.core.exception.KettleFileException:
    datafile.0 :
    datafile.0 : Unable to get VFS File object for filename
    'ftp://bogus/testfiles/customer-dimension-test.csv'
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 : Could not connect to FTP server on "bogus".
    datafile.0 :
    datafile.0 : Caused by: org.apache.commons.vfs.FileSystemException:
    Could not connect to FTP server on "bogus".
    datafile.0 : Caused by: java.net.UnknownHostException: bogus

    Thanks

    Phil

    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers+unsubscribe (AT) googlegroups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

  2. #2
    Matt Casters Guest

    Default Re: Logging changes & Unit Test Failure

    Hi Phil,

    The root cause of the double exception is incorrect use of Exception handling in Kettle at various locations.
    In fact all instances of this type of exception need to be replaced:

    throw new SomeException("Something went wrong: "+e.getMessage());

    The line needs to be replaced by :

    throw new SomeException("Something went wrong", e);

    The goal is then to create a parameter (later on) that will allow us to just print the cause of an error or the complete stack trace (for debugging).
    On a related topic, since IOException doesn't propagate the underlying exception, I recommend replacing it by KettleFileException all over the place. (as I did in KettleVFS)

    I'll chalk up a JIRA case for it later today. For now, just let it be.

    All the best,
    Matt

    Matt Casters <mcasters (AT) pentaho (DOT) org>
    Chief Data Integration
    Fonteinstraat 70, 9400 OKEGEM - Belgium - Cell : +32 486 97 29 37
    Pentaho : The Commercial Open Source Alternative for Business Intelligence



    On Saturday 07 November 2009 02:02:14 Phil wrote:
    >
    > Hi,
    >
    > Just noticed the logging changes that went in today. One of the
    > blackbox unit tests started failing due to the log file changing. The
    > log file repeats itself now, is this intended? If so, I'll update the
    > unit test expected log file.
    >
    > Previously
    > testfiles/blackbox/tests/trans/steps/csvinput/csvinput-error1.ktr produced:
    >
    > datafile.0 : Unexpected error :
    > datafile.0 : org.pentaho.di.core.exception.KettleException:
    > datafile.0 : java.io.IOException: Unable to get VFS File object for
    > filename 'ftp://bogus/testfiles/customer-dimension-test.csv' :
    > org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    > server on "bogus".
    > datafile.0 : Unable to get VFS File object for filename
    > 'ftp://bogus/testfiles/customer-dimension-test.csv' :
    > org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    > server on "bogus".
    > datafile.0 :
    > datafile.0 : Caused by: java.io.IOException: Unable to get VFS File
    > object for filename 'ftp://bogus/testfiles/customer-dimension-test.csv'
    > : org.apache.commons.vfs.FileSystemException: Could not connect to FTP
    > server on "bogus".
    >
    > It now produces:
    >
    > datafile.0 : Unexpected error :
    > datafile.0 : org.pentaho.di.core.exception.KettleException:
    > datafile.0 : org.pentaho.di.core.exception.KettleFileException:
    > datafile.0 :
    > datafile.0 : Unable to get VFS File object for filename
    > 'ftp://bogus/testfiles/customer-dimension-test.csv'
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 :
    > datafile.0 :
    > datafile.0 : Unable to get VFS File object for filename
    > 'ftp://bogus/testfiles/customer-dimension-test.csv'
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 :
    > datafile.0 : Caused by: org.pentaho.di.core.exception.KettleFileException:
    > datafile.0 :
    > datafile.0 : Unable to get VFS File object for filename
    > 'ftp://bogus/testfiles/customer-dimension-test.csv'
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 : Could not connect to FTP server on "bogus".
    > datafile.0 :
    > datafile.0 : Caused by: org.apache.commons.vfs.FileSystemException:
    > Could not connect to FTP server on "bogus".
    > datafile.0 : Caused by: java.net.UnknownHostException: bogus
    >
    > Thanks
    >
    > Phil
    >
    > >

    >
    >



    --~--~---------~--~----~------------~-------~--~----~
    You received this message because you are subscribed to the Google Groups "kettle-developers" group.
    To post to this group, send email to kettle-developers (AT) googlegroups (DOT) com
    To unsubscribe from this group, send email to kettle-developers+unsubscribe (AT) googlegroups (DOT) com
    For more options, visit this group at http://groups.google.com/group/kettle-developers?hl=en
    -~----------~----~----~----~------~----~------~--~---

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.