Skip navigation links

MySQL Forums :: JDBC and Java :: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException Opening connection


Advanced Search

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException Opening connection
Posted by: Fidel Diaz ()
Date: October 20, 2009 10:03AM

Hi,

I´m having troubles with the mysql connector. I have install the driver on Tomcat 5 and when I open a single connection I receive the next exception:

com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '????????????????????????????????' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.Connection.configureClientCharacterSet(Connection.java:2515)
at com.mysql.jdbc.Connection.initializePropsFromServer(Connection.java:4111)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2762)
at com.mysql.jdbc.Connection.(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at java.sql.DriverManager.getConnection(libgcj.so.90)
at org.apache.jsp.dbtest_jsp._jspService(dbtest_jsp.java:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at java.lang.reflect.Method.invoke(libgcj.so.90)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
at java.security.AccessController.doPrivileged(libgcj.so.90)
at javax.security.auth.Subject.doAsPrivileged(libgcj.so.90)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:262)
at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:171)
at java.security.AccessController.doPrivileged(libgcj.so.90)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:548)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(libgcj.so.90)


I suspect that the cause must be in the charset, but it seems to be configured correctly in the mysql variables.

Any help would be appreciated

Regards

Options: ReplyQuote


Subject Written By Posted
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException Opening connection Fidel Diaz 10/20/2009 10:03AM
Re: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException Opening connection Mark Matthews 10/21/2009 02:57PM
Re: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException Opening connection Fidel Diaz 10/22/2009 03:33AM


Sorry, only registered users may post in this forum.