Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
armand22
Contributor
Contributor

Error in component tDBOutput_1 java.sql.SQLException: No database selected

Hello everyone,

I am new to Talend and want to execute a Job but I encountered an error. I don't exactly understand where the problem is. For me, normally the error shouldn't occur. Can someone help me please ?

Starting job write_movies_to_db at 17:26 10/03/2022.

[statistics] connecting to socket on port 3584

[statistics] connected

Exception in component tDBOutput_1 (write_movies_to_db)

java.sql.SQLException: No database selected

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)

at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764)

at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648)

at getting_started.write_movies_to_db_0_1.write_movies_to_db.tFileInputDelimited_1Process(write_movies_to_db.java:1165)

at getting_started.write_movies_to_db_0_1.write_movies_to_db.runJobInTOS(write_movies_to_db.java:2890)

at getting_started.write_movies_to_db_0_1.write_movies_to_db.main(write_movies_to_db.java:2739)

[statistics] disconnected

Job write_movies_to_db ended at 17:26 10/03/2022. [exit code = 1]0695b00000PK0z9AAD.png

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

Set the port as "3306", append parameter "serverTimezone=UTC#" to Additional JDBC parameters filed in the advanced settings panel of tMysqlOutput component.

 

Regards

Shong

View solution in original post

4 Replies
Anonymous
Not applicable

Hello,

Are you able to create a mysql database connection, and retrieve schema successfully?

Here is online documentation about: TalendHelpCenter: Centralizing database metadata

Please change your connection string to make it connect to the right database on localhost (such as, jdbc:mysql://localhost:3306/.... instead of 127.0.0.1).

Best regards

Sabrina

Anonymous
Not applicable

Hi

Set the port as "3306", append parameter "serverTimezone=UTC#" to Additional JDBC parameters filed in the advanced settings panel of tMysqlOutput component.

 

Regards

Shong

armand22
Contributor
Contributor
Author

Hello,

 

Thank you so much for your answer. Actually, I solved the problem. I will try the instructions mentioned in the documentation for later purpose.

 

Best regards

armand22
Contributor
Contributor
Author

Hello,

 

Thank you so much. I tried your answer and it worked for me.

 

Best regards

armand22