MySQL - java.sql.SQLException: Unknown character set index for field..

One Star

MySQL - java.sql.SQLException: Unknown character set index for field..

Good Day,
I am getting the following error when I run my job that reads data from MySQL db table using a tMySQLInput component.
java.sql.SQLException: Unknown character set index for field ....... received from server.
I have data that has special characters so my characterset is definied as "utf8mb4_general_ci" when creating the tables (varchar fields).
Please see attached Talend job along with the MySQL connector modules installed. Is there a specific connector that works to resolve this issue? How can we resolve this issue. Please advise.
Error details below:
Exception in component tMysqlInput_6
java.lang.NullPointerException
at fusionseven.etl_ods_ads_0_5.etl_ods_ads.tForeach_1Process(etl_ods_ads.java:6336)
at fusionseven.etl_ods_ads_0_5.etl_ods_ads.tMysqlConnection_2Process(etl_ods_ads.java:1278)
at fusionseven.etl_ods_ads_0_5.etl_ods_ads.tForeach_2Process(etl_ods_ads.java:1110)
at fusionseven.etl_ods_ads_0_5.etl_ods_ads.runJobInTOS(etl_ods_ads.java:7496)
at fusionseven.etl_ods_ads_0_5.etl_ods_ads.main(etl_ods_ads.java:7135)
Exception in component tMysqlCommit_1
java.sql.SQLException: Unknown character set index for field '12338' received from server.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ConnectionImpl.getCharsetNameForIndex(ConnectionImpl.java:2991)
at com.mysql.jdbc.Field.<init>(Field.java:200)
at com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:758)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:423)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2728)
at com.mysql.jdbc.ConnectionImpl.rollbackNoChecks(ConnectionImpl.java:4908)
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4794)
disconnected
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4403)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1594)
Community Manager

Re: MySQL - java.sql.SQLException: Unknown character set index for field..

Hi
A user met the same issue, he fixed it by upgrading the mysql connector to another high version. Please see this page
Hope it would help.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: MySQL - java.sql.SQLException: Unknown character set index for field..

Thanks Shong for your prompt response. I did not get alerts (email) for some reason when you responded.
Cheers,
Shaun
Community Manager

Re: MySQL - java.sql.SQLException: Unknown character set index for field..

You should subscribe automatically your topic by default, and receive the email notification once someone reply your topic. Please check that you have subscribed to the topic.

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business