
Anonymous
Not applicable
2014-03-17
12:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[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.
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.
302 Views
1 Solution
Accepted Solutions

Anonymous
Not applicable
2014-03-18
06:11 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
This problem is not a problem caused by Talend instead it is a problem caused by Oracle.
302 Views
4 Replies

Anonymous
Not applicable
2014-03-17
05:59 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
I guess the problem is the JDBC driver. Di you use the same driver on both systems or on every system the specific driver?
302 Views

Anonymous
Not applicable
2014-03-18
02:12 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
302 Views

Anonymous
Not applicable
2014-03-18
06:11 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
This problem is not a problem caused by Talend instead it is a problem caused by Oracle.
303 Views

Anonymous
Not applicable
2014-03-18
08:14 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
I guess I'll use this solution but that doesn't make me feel confident about the reliability of the interactions Talend/Mysql.
302 Views
