Two versions of mysql-connector-java-<version>-bin makes Talend unable

One Star

Two versions of mysql-connector-java-<version>-bin makes Talend unable

Hello,
I?ve had a problem with running one of our ETL?s locally. Note that this ETL is currently running ok on the live system.
I got the following error message: ?Exception in thread "main" java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.Error: java.lang.IncompatibleClassChangeError: Found class com.mysql.jdbc.Statement, but interface was expected?.
I?ve got TOS_DI-Win32-r90681-V5.1.2 installed on my computer. I?ve got jre7 installed on my computer.
I looked at the live ETL version and I noticed that in ETL in the classpath.jar file there are references to ?../lib/mysql-connector-java-5.1.0-bin.jar? and ?../lib/mysql-connector-java-3.1.14-bin.jar?. I?ve taken the last one out and removed the mysql-connector-java-3.1.14-bin.jar from the lib-folder.
I imported the adjusted ETL into Talend, changed the contexts to run of my local machine and reloaded these contexts into my MainPackage. Then I ran the MainPackage job and this time the ETL runs through ok!
The next day I opened the ETL again because I wanted to make some changes. I first tested by running it through, but to my surprise I got the same error message again. I?ve been unable to find why this is happening.
I don?t know whether it is of interest, but I noticed the following:
? there is a reference in the job to modules mysql-connector-java-3.1.14-bin and mysql-connector-java-5.1.0-bin.
? in the index.xml file (in folder \TOS_DI-Win32-r90681-V5.1.2\lib\java) a reference to both .jars are made:
- <jarsToRelativePath key="mysql-connector-java-5.1.0-bin.jar" value="org.talend.designer.components.localprovider_5.1.2.r90681/components/tAmazonMysqlInput/mysql-connector-java-5.1.0-bin.jar"/>
- <jarsToRelativePath key="mysql-connector-java-3.1.14-bin.jar" value="org.talend.designer.components.localprovider_5.1.2.r90681/components/tMysqlInput/mysql-connector-java-3.1.14-bin.jar"/>
? in the folder .Java/lib in the location of where the ETL is stored both mysql-connector-<>.jar?s are showing up
Could you please help me?
Thank you,
Louisa
Community Manager

Re: Two versions of mysql-connector-java-<version>-bin makes Talend unable

Hi Louisa
I would suggest you to upgrade your product to the newest version v5.4.1. In the new version, Talend Studio requires you to install the external jars manually by yourself. Refer to How to install external modules in Talend product.

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

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog