Problems with tJDBCInput

One Star

Problems with tJDBCInput

Hi everybody,
I'm using a tJDBCInput component in a simple job and I have encountered 2 problems.
First of all, when I click the "Guess Query" button, there is "_MyTable_" instead of my table name in the generated query.
And then, when I execute my job, I have an error message saying that the table doesn't exist :
Exception in component tJDBCInput_1
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: La table 'etemptation._mytable_' n'existe pas

Is it a bug?
The second problem appears whith the use of a context variable in the dynamics settings for the Driver Jar. (see the 1st attached picture)
In this case, I have this error message when executing the job :
Exception in component tJDBCInput_1
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at test.test_0_1.test.tJDBCInput_1Process(test.java:590)
at test.test_0_1.test.runJobInTOS(test.java:937)
at test.test_0_1.test.main(test.java:844)

It seems that TOS doesn't recognise my context parameter.
I tried to write directly the name of the driver jar file instead of the context parameter and the job worked fine.
Any ideas about this problem ?
Best Regards,
Karine
Community Manager

Re: Problems with tJDBCInput

Hello
First of all, when I click the "Guess Query" button, there is "_MyTable_" instead of my table name in the generated query.

Yes, it should be a bug on TOS2.4.1 and it have been fixed on the latest version.
It seems that TOS doesn't recognise my context parameter.
I tried to write directly the name of the driver jar file instead of the context parameter and the job worked fine.

Please report a bug on our bugtracker.
Thanks for your support!
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Problems with tJDBCInput

Thanks for your answer !
I report a new issue on bugtracker : http://www.talendforge.org/bugs/view.php?id=5036
Best regards,
Karine

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 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog