<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Converting date '0000-00-00' from MySQL to Java in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222408#M16039</link>
    <description>Hello, 
&lt;BR /&gt;I'm using TOS 4 to extract data from a MySQL database to another MySQL DB. 
&lt;BR /&gt;In the datasource, it seems that some dates are filled with '0000-00-00', which leadds to a problem when the job tries to manipulate data, even if the field is not mapped. 
&lt;BR /&gt;here's the generated error: 
&lt;BR /&gt;Exception in component tMysqlInput_1 
&lt;BR /&gt;java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056) 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getDateFromString(ResultSet.java:2129) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5833) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5645) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlInput_1Process(ODS_Risques_Alertes.java:2899) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlConnection_2Process(ODS_Risques_Alertes.java:1393) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlConnection_1Process(ODS_Risques_Alertes.java:1281) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tFileInputProperties_1Process(ODS_Risques_Alertes.java:1088) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.runJobInTOS(ODS_Risques_Alertes.java:7512) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.main(ODS_Risques_Alertes.java:7329) 
&lt;BR /&gt; 
&lt;BR /&gt;I read some threads about this problem (known as bug in the version 2), I tried to use "zeroDateTimeBehavior=convertToNull" additional parameter, but it seems to be not taken into account. 
&lt;BR /&gt;Please could you help me with this problem? 
&lt;BR /&gt;Here are the TOS and Java versions: 
&lt;BR /&gt;TOS: 
&lt;BR /&gt;Version: 4.0.2 
&lt;BR /&gt;Build id: r43696-20100604-0918 
&lt;BR /&gt;java version "1.6.0_21" 
&lt;BR /&gt;Java(TM) SE Runtime Environment (build 1.6.0_21-b07) 
&lt;BR /&gt;Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing) 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks.</description>
    <pubDate>Sat, 16 Nov 2024 13:18:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:18:48Z</dc:date>
    <item>
      <title>Converting date '0000-00-00' from MySQL to Java</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222408#M16039</link>
      <description>Hello, 
&lt;BR /&gt;I'm using TOS 4 to extract data from a MySQL database to another MySQL DB. 
&lt;BR /&gt;In the datasource, it seems that some dates are filled with '0000-00-00', which leadds to a problem when the job tries to manipulate data, even if the field is not mapped. 
&lt;BR /&gt;here's the generated error: 
&lt;BR /&gt;Exception in component tMysqlInput_1 
&lt;BR /&gt;java.sql.SQLException: Value '0000-00-00' can not be represented as java.sql.Date 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1056) 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) 
&lt;BR /&gt; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getDateFromString(ResultSet.java:2129) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getStringInternal(ResultSet.java:5833) 
&lt;BR /&gt; at com.mysql.jdbc.ResultSet.getString(ResultSet.java:5645) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlInput_1Process(ODS_Risques_Alertes.java:2899) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlConnection_2Process(ODS_Risques_Alertes.java:1393) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tMysqlConnection_1Process(ODS_Risques_Alertes.java:1281) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.tFileInputProperties_1Process(ODS_Risques_Alertes.java:1088) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.runJobInTOS(ODS_Risques_Alertes.java:7512) 
&lt;BR /&gt; at bo_project_mgt_kpi.ods_risques_alertes_0_1.ODS_Risques_Alertes.main(ODS_Risques_Alertes.java:7329) 
&lt;BR /&gt; 
&lt;BR /&gt;I read some threads about this problem (known as bug in the version 2), I tried to use "zeroDateTimeBehavior=convertToNull" additional parameter, but it seems to be not taken into account. 
&lt;BR /&gt;Please could you help me with this problem? 
&lt;BR /&gt;Here are the TOS and Java versions: 
&lt;BR /&gt;TOS: 
&lt;BR /&gt;Version: 4.0.2 
&lt;BR /&gt;Build id: r43696-20100604-0918 
&lt;BR /&gt;java version "1.6.0_21" 
&lt;BR /&gt;Java(TM) SE Runtime Environment (build 1.6.0_21-b07) 
&lt;BR /&gt;Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing) 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Sat, 16 Nov 2024 13:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222408#M16039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date '0000-00-00' from MySQL to Java</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222409#M16040</link>
      <description>Hi
&lt;BR /&gt;You can find a solution on 12687.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 17 Aug 2010 08:20:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222409#M16040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-17T08:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date '0000-00-00' from MySQL to Java</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222410#M16041</link>
      <description>Hello, 
&lt;BR /&gt;thank you for your answer.
&lt;BR /&gt;Following your advice, I added this line to job properties:
&lt;BR /&gt;AdditionalParams=noDatetimeStringSync=true&amp;amp;zeroDateTimeBehavior=convertToNull
&lt;BR /&gt;and it is working fine now.</description>
      <pubDate>Fri, 20 Aug 2010 08:20:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222410#M16041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-20T08:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date '0000-00-00' from MySQL to Java</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222411#M16042</link>
      <description>&lt;P&gt;Thank you for this solution.&amp;nbsp; I got similar problem in Java 11 version and Talend 7.3.&amp;nbsp; I heard&amp;nbsp;&lt;SPAN&gt;noDatetimeStringSync=true is deprecated in Java 11.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used this option&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;AdditionalParams="zeroDateTimeBehavior=convertToNull"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 19:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222411#M16042</guid>
      <dc:creator>rameshramaswamy</dc:creator>
      <dc:date>2020-05-31T19:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting date '0000-00-00' from MySQL to Java</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222412#M16043</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/005390000069LutAAE"&gt;@rchinta&lt;/A&gt;, thanks for sharing the information and solutions.</description>
      <pubDate>Mon, 01 Jun 2020 03:10:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Converting-date-0000-00-00-from-MySQL-to-Java/m-p/2222412#M16043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-01T03:10:26Z</dc:date>
    </item>
  </channel>
</rss>

