Not applicable

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

Hello,
I'm trying to search a register in my database that is in a remote host with a routine that, my routine is called from a tmap in a job, when I run the job I got the exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'user'@'xxx.xxx.xxx.xxx' to database 'databaseSmiley Tongueort'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.Util.getInstance(Util.java:384)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3566)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4004)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1284)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2312)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at routines.MyRoutine.getAportante(MyRoutine.java:79)
at simpletest.dispersion_0_1.Dispersion.tMysqlInput_1Process(Dispersion.java:1132)
at simpletest.dispersion_0_1.Dispersion.runJobInTOS(Dispersion.java:1647)
at simpletest.dispersion_0_1.Dispersion.main(Dispersion.java:1515)
Somebody knows this exception and how to fix it?
Thank a lot.
4 REPLIES
One Star

Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

Hi
The exception indicates that the basic configuration of mysql is not correct.
Please upload a screen shot about your job.
Regards,
Pedro
Not applicable

Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

Hi
The exception indicates that the basic configuration of mysql is not correct.
Please upload a screen shot about your job.
Regards,
Pedro

Hi, thanks for your answer, I think that this expcetion is because the user don't have all grants necessary because I export and import the database locally and create an user with all the grants, I get another exception, I'm going to consult with the DBA of the remote database, thank you.
If you can help me with the other error, the exception is:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1118)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2308)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2122)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:774)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:49)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:375)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:289)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at routines.MyRoutine.getAportante(MyRoutine.java:79)
at simpletest.dispersion_0_1.Dispersion.tMysqlInput_1Process(Dispersion.java:1130)
at simpletest.dispersion_0_1.Dispersion.runJobInTOS(Dispersion.java:1645)
at simpletest.dispersion_0_1.Dispersion.main(Dispersion.java:1513)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)
... 17 more
Not applicable

Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

Hi
The exception indicates that the basic configuration of mysql is not correct.
Please upload a screen shot about your job.
Regards,
Pedro

This is the screenshot of my job
One Star

Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

Hi
I think you'd better contact with the DBA.
Because all exceptions shows that the parameters(host, port, username, password and so on) of mysql are not correct.
Regards,
Pedro