tMysqlOutput error

Hi,
I'm now on Talend Open Studio and I'm trying to import data from a tMap component to a tMysqlOutput component.
I've checked every data type, access and rights but I can't get through a pstmt_tMysqlOutput_1 error.
Here is the complete exception error message :
Exception in thread "main" java.lang.Error: Problèmes de compilation non résolus :
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
connected
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
pstmt_tMysqlOutput_1 ne peut pas être résolu
batchSizeCounter_tMysqlOutput_1 ne peut pas être résolu en tant que variable
batchSize_tMysqlOutput_1 ne peut pas être résolu en tant que variable
batchSizeCounter_tMysqlOutput_1 ne peut pas être résolu en tant que variable
pstmt_tMysqlOutput_1 ne peut pas être résolu
batchSizeCounter_tMysqlOutput_1 ne peut pas être résolu en tant que variable
pstmt_tMysqlOutput_1 ne peut pas être résolu en tant que variable
pstmt_tMysqlOutput_1 ne peut pas être résolu
I don't know where to search to solve this problem.
Thanks in advance for your help,
Nicolas
25 REPLIES
Community Manager

Re: tMysqlOutput error

Hi Nicolas
It is a compilation error, there must be something wrong in your job settings. We usually open the Code tab and see which line of code has error and locate the component which has the error. Some screenshots of your job will be helpful for us to find out the cause.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: tMysqlOutput error

Thanks Shong for your answer.
I think my problem comes from the fact that I want to initialize some columns with fixed values and some with datas coming from row1 (for now, a tFileInputDelimited component but at last a ldap component).
For each compilation error, should I create a variable or a field or a class or a parameter as told in the annotations ?
Here are some screenshots to help you.
Thanks in advance,
Nicolas
Community Manager

Re: tMysqlOutput error

The error is related to a tMysqloutput, please upload also a screenshot of job and the component setting of tMysqlOutput.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tMysqlOutput error

I think password and one_time_pw should be defined as string in the map output?

Re: tMysqlOutput error

@ Shong : here are the job and component screenshots
@ janhess : I'll try to define those 2 values and see what happens
Thanks to you both,
Nicolas
Community Manager

Re: tMysqlOutput error

Hi
On tmysqloutput, the option 'use an existing connection' is selected, but there is no tmysqlconnection used to create a db connection in your job! This option is always used with tMysqlconnection together, I suggest to learn tMysqlconnection.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: tMysqlOutput error

OK ! As I've created a connection in metadata panel, I thought 'use an existing connection' was refering to it... Newbie error Smiley Sad
Now there is just one last error :
 connecting to socket on port 3402
connected
Exception in component tMysqlOutput_1
java.lang.NullPointerException
at ldap_ls_connector.push_to_mysql2_0_1.push_to_mySQL2.tFileInputDelimited_1Process(push_to_mySQL2.java:2898)
at ldap_ls_connector.push_to_mysql2_0_1.push_to_mySQL2.runJobInTOS(push_to_mySQL2.java:3783)
at ldap_ls_connector.push_to_mysql2_0_1.push_to_mySQL2.main(push_to_mySQL2.java:3651)
disconnected
One Star

Re: tMysqlOutput error

Looks like a parameter missing from your connection details.

Re: tMysqlOutput error

You mean tMysqlOutput parameter details ? I've checked it when creating the Mysql connection in Metadatas, so where should I look now ?
Community Manager

Re: tMysqlOutput error

Hi
Make sure the db connection is created before it is used. The job looks like:
tMysqlConnection
|
onsubjobok
|
tFileInputDelimited---main--tMysqlOutput
--onsubjobok--tmysqlCommit
--onsubjoberror--tmysqlRollback
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: tMysqlOutput error

Hi,
I still get the same error, but maybe I've done something wrong and I can't find anything in the doc to tell me how to use tMysqlConnection and co.
Nicolas
Community Manager

Re: tMysqlOutput error

Hi
Please upload some screenshots of your job, so we can assist you further.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tMysqlOutput error

Have you checked the 'use existing connection' box in tMySQLOutput?

Re: tMysqlOutput error

Yes, 'use existing connection' box in tMySQLOutput : checked,
still the same error :
"Démarrage du job push_to_mySQL3 a 09:14 11/03/2013.
connecting to socket on port 3782
connected
Exception in component tMysqlOutput_1
java.lang.NullPointerException
at ldap_ls_connector.push_to_mysql3_0_1.push_to_mySQL3.tFileInputDelimited_1Process(push_to_mySQL3.java:3063)
at ldap_ls_connector.push_to_mysql3_0_1.push_to_mySQL3.tMysqlConnection_1Process(push_to_mySQL3.java:480)
at ldap_ls_connector.push_to_mysql3_0_1.push_to_mySQL3.runJobInTOS(push_to_mySQL3.java:4052)
at ldap_ls_connector.push_to_mysql3_0_1.push_to_mySQL3.main(push_to_mySQL3.java:3920)
disconnected
Job push_to_mySQL3 terminé à 09:14 11/03/2013.
"

Re: tMysqlOutput error

Ok, I've found why : I had a BLOB type in my DB corresponding to an OBJECT type in Talend. For such DB fields, you must use a string type in Talend...
Many thanks for your help !!!
Nicolas
Community Manager

Re: tMysqlOutput error

Hi
I don't aggree with your point for such a type, you must use a string type. Are there null value in this column?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: tMysqlOutput error

Yes there might be null value in this column. I've seen that on another post in another forum :
http://www.labdecisionnel.com/index.php?option=com_kunena&func=view&id=5172&catid=47&Itemid=101
Nicolas
Seventeen Stars

Re: tMysqlOutput error

hi all,
about the error, I had the same one just yesterday Smiley Happy
I was using a mysql connection with a pre-job and get the "smt ... error message".
I had unchecked "use a connection", run the job , and check again the option ... and It was OK Smiley Wink ( it was like it didn't see it)
(4.1.1 tis version)
But don't have the reason why
my 2 cents
regards
laurent
Community Manager

Re: tMysqlOutput error

Hi Nicolas
Still select 'Object' as talend type and 'Blob' as DB type, but try to handle the null value for this column on tMap like:
row1.columnName==null?null:row1.columnName
@Kzone, it looks like a refresh problem, the code of tMysqlConnection is not generated yet? You can try to close the job and open it again next time.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tMysqlOutput error

shong is a experts in this field. Smiley Wink
One Star

Re: tMysqlOutput error

I have the same issue and it's because i'm new to this app/tool.
I've set up an easy CSV to MySQL transfer with no transformation and i get a Null Pointer exception every time.
So I unselected the compontents "Use an existing Connection" and set the database properties adn it worked. When I select the tMysqlOuput_1 components "Use an existing Connection" and set the db properties in the connection tMysqlConnection_1 properties and then use that connection on the MysqlOutput com it doesnt seem to find it.
What am i doing wrong to set it?

if (null == conn_tMysqlOutput_1) {
java.util.Map<String, routines.system.TalendDataSource> dataSources_tMysqlOutput_1 = (java.util.Map<String, routines.system.TalendDataSource>) globalMap
.get(KEY_DB_DATASOURCES);
conn_tMysqlOutput_1 = dataSources_tMysqlOutput_1.get("")
.getConnection();
}

statistics] connecting to socket on port 3512
connected
Exception in component tMysqlOutput_1
java.lang.NullPointerException
at drilmap.datacsvtomysql_0_1.DataCSVtoMySQL.tFileInputDelimited_2Process(DataCSVtoMySQL.java:702)
at drilmap.datacsvtomysql_0_1.DataCSVtoMySQL.runJobInTOS(DataCSVtoMySQL.java:1862)
at drilmap.datacsvtomysql_0_1.DataCSVtoMySQL.main(DataCSVtoMySQL.java:1728)
disconnected
Job DataCSVtoMySQL ended at 21:29 25/08/2013.
Seven Stars

Re: tMysqlOutput error

You're probably not joining the tMysqlConnection to tFileInputDelimited with OnSubjobOK so the job is trying to run the subjobs in the wrong order i.e. use the connection in tMysqlOutput before creating it. Screenprints of your job always help.
One Star

Re: tMysqlOutput error

Hello, 
I'm having the same problem, but with a postgresql database. 
I want to make a "join" between two Mysql databases and then import them in a postgresql database. 
Here is my design ( in an attachement file );
However, I wanted to notice that in my Postgresql Db, I could'nt  get the table schemas.
Moderator

Re: tMysqlOutput error

Hi salmab,
Could you please also show us your tpostgresqlOutput component setting screenshots?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seventeen Stars

Re: tMysqlOutput error

hi all,
seems you've got an error on your tMap.
I guess that your use a output flow (transmission) that has no field (check schema output)
hope it help
regards
laurent