Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Date format exception in Kettle version 3.0 GA

  1. #1

    Default Date format exception in Kettle version 3.0 GA

    Hi All,

    I was using Kettle version 2.5.1 and in a transformation in it, I have a XML input which was working fine. I tried the same transformation in the new version 3.0 GA. It is giving the following error. Please let me know who to rectify it.

    ERROR:
    2007/11/23 14:54:03 - Trans - This is not a replay transformation
    2007/11/23 14:54:03 - Trans - This transformation can be replayed with replay date: 2007/11/23 14:54:03
    2007/11/23 14:54:03 - Trans - Initialising 2 steps...
    2007/11/23 14:54:03 - XML Input.0 - Starting to run...
    2007/11/23 14:54:03 - dummy.0 - Starting to run...
    2007/11/23 14:54:03 - XML Input.0 - Opening file: file:///D:/ETL Files/Partner_Files/PARTNER_TEST.xml
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : Unexpected error :
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : org.pentaho.di.core.exception.KettleValueException:
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : Signup_date1 String : couldn't convert string [10/23/2007 17:21:52] to a date
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : Unparseable date: "10/23/2007 17:21:52"
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) :
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.core.row.ValueMeta.convertStringToDate(ValueMeta.java:565)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.core.row.ValueMeta.getDate(ValueMeta.java:1565)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.core.row.ValueMeta.convertData(ValueMeta.java:2929)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.trans.steps.xmlinput.XMLInput.getRowFromXML(XMLInput.java:226)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.trans.steps.xmlinput.XMLInput.processRow(XMLInput.java:71)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.trans.steps.xmlinput.XMLInput.run(XMLInput.java:367)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : Caused by: java.text.ParseException: Unparseable date: "10/23/2007 17:21:52"
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at java.text.DateFormat.parse(DateFormat.java:335)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : at org.pentaho.di.core.row.ValueMeta.convertStringToDate(ValueMeta.java:561)
    2007/11/23 14:54:03 - XML Input.0 - ERROR (version 3.0.0, build 500 from 2007/11/14 14:59:11) : ... 5 more
    2007/11/23 14:54:03 - XML Input.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
    2007/11/23 14:54:03 - dummy.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=0)

    Thanks,
    Darius

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

    Default

    Hi Darius, it simply means it can't parse the date. (day/month/year is the default and this looks like month/day/year)
    Can you supply us with a sample XML file and a simple transformation showing the problem?

    Thanks,

    Matt

  3. #3

    Default

    Hi Matt,

    I have attached a sample transformation file and the XML file which I used in the transformation and also I have attached the structure of the table. Database is MYSQL.

    This transformation is working in Version 2.5.1 and not in 3.0 GA. The same problem I addressed is arising again.
    Please look into it.

    Thanks,
    Darius
    Attached Files Attached Files

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

    Default

    Darius,

    I confirmed the issue, here is the bug report: http://jira.pentaho.org/browse/PDI-507

    I fixed the problem and I should have a patch available in a few minutes.
    Please note that you used format "dd/MM/yyyy" for the dates.

    The format you want to process

    Code:
    10/23/2007 17:21:52
    is "MM/dd/yyyy HH:mm:ss".

    The date conversion is lenient and converts the date above to

    Code:
    10/11/2008 17:21:52
    Explanation: it takes the 23 months into 2007 which is the 11th month of 2008.

    Matt

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

    Default

    Here we go: put these in the lib/ directory and try again:

    http://kettle3.s3.amazonaws.com/kettle-ui-swt-3.0.jar
    http://kettle3.s3.amazonaws.com/kettle-engine-3.0.jar

    Let me know if that worked for you, either here or in the JIRA case.

    Thanks,

    Matt

  6. #6
    Join Date
    Oct 2007
    Posts
    10

    Default

    Hi Matt,
    just tried the jars for a related project but i receive:

    Exception in thread "main" java.lang.NoClassDefFoundError: org/pentaho/versionchecker/IVersionCheckDataProvider
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at org.pentaho.di.ui.spoon.Spoon.initListeners(Spoon.java:6509)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:370)

    as a response.

    Can you check it?

  7. #7

    Default

    Hi Matt,

    I downloaded the given jar files and replaced the existing files in the lib directory. But the Kettle is not starting up. When the I run the spoon.bat file, nothing is happening.
    When the replace the new JAR files with the old ones, it’s starting up.
    Please look into it.

    Thanks,
    Darius

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

    Default

    wait till Matt gets back ... it's an ongoing development version and some libraries were juggled around, so now you miss a new one. A recompilation should do the trick.

    Regards,
    Sven

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

    Default

    Throw this library in libext/ too:

    http://kettle.pentaho.org/svn/Kettle...ionchecker.jar

    Thanks,

    Matt

  10. #10

    Thumbs up

    Hi Matt,

    Its working, Now the XML file input is not throwing any date exception errors.

    Thanks,
    Darius

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.