Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] MySQL "Enable stream" option generates java.lang.IncompatibleClassChan

Hello,
I made several jobs on my local machine and built them. Some of them have tMysqlInput Components with the option "Enable stream". When I run the built job on my local machine, it works fine. When I try to run the same jobs on a test environment, I get this error when executing the tMysqlInput with the enable stream option option :
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface com.mysql.jdbc.Statement, but class was expected
My local environment settings :
Mysql : /Applications/MAMP/Library/bin/mysql Ver 14.14 Distrib 5.5.33, for osx10.6 (i386) using EditLine wrapper
Java : java version "1.7.0_51"
My test environment settings :
Mysql : mysql Ver 14.14 Distrib 5.5.21, for Linux (x86_64) using readline 5.1
Java : java version "1.6.0"
In TOS, I set the JDK compliance so that it uses the 1.6 level but it's not working.
I really need to use the "Enable stream" option here, any idea of how I can make it work ?
Thanks.
Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Your solution is Ok and to be honest I have done similar things.
This problem is not a problem caused by Talend instead it is a problem caused by Oracle.

View solution in original post

4 Replies
Anonymous
Not applicable
Author

I understand you build the job on your Mac and move the artifact to the linux machine ?
I guess the problem is the JDBC driver. Di you use the same driver on both systems or on every system the specific driver?
Anonymous
Not applicable
Author

Thank you jiolling for your help.
Yes I build the job on my Mac and move it to the linux machine.
Is there a way to build the jobs on the linux machine without having to install Talend ?
I actually found a solution but I'm not sure if it's ideal.
The problem occurs when I'm using the component tMysqlInput with the option "Enable stream". This component by default uses the driver mysql-connector-java-5.1.22-bin.jar.
So I modified the file /TOS_DI-r111943-V5.4.1 2/plugins/org.talend.designer.components.localprovider_5.4.1.r111943/components/tMysqlInput/tMysqlInput_java.xml and I replaced the line
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.1.22-bin.jar" UrlPath="platform:/plugin/org.talend.libraries.jdbc.mysql/lib/mysql-connector-java-5.1.22-bin.jar" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
by this one
<IMPORT NAME="Mysql_Driver5" MODULE="mysql-connector-java-5.0.8-bin.jar" UrlPath="platform:/plugin/org.talend.libraries.jdbc.mysql/lib/mysql-connector-java-5.0.8-bin.jar" REQUIRED_IF="(DB_VERSION == 'MYSQL_5') AND (USE_EXISTING_CONNECTION == 'false')" />
Then I added the driver mysql-connector-java-5.0.8-bin.jar to my modules, I rebuilt the job and now it's working on my linux machine.
What do you think of this solution ? This is not clean at all.
Anonymous
Not applicable
Author

Your solution is Ok and to be honest I have done similar things.
This problem is not a problem caused by Talend instead it is a problem caused by Oracle.
Anonymous
Not applicable
Author

Alright, thank you.
I guess I'll use this solution but that doesn't make me feel confident about the reliability of the interactions Talend/Mysql.