Announcement Announcement Module
Collapse
No announcement yet.
Does JdbcTemplate work with Mysql proxy well? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does JdbcTemplate work with Mysql proxy well?

    I have a try but get errors. I think it is a result of prepared statement, but I am not sure. Any suggestion? Thanks.

    Code:
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)
            at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
            at java.lang.Thread.run(Thread.java:679)
    Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Proxy Warning - Syntax Forbidden
            at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
            at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:628)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:693)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:725)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:735)
            at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:785)
            at hello.Application.main(Application.java:22)
            ... 6 more
    Caused by: java.sql.SQLException: Proxy Warning - Syntax Forbidden
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
            at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4874)
            at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3431)
            at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2045)
            at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
            at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
            at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
            at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
            at org.springframework.jdbc.datasource.SimpleDriverDataSource.getConnectionFromDriver(SimpleDriverDataSource.java:140)
            at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:155)
            at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:120)
            at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
            at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
            ... 12 more:
Working...
X