Announcement Announcement Module
Collapse
No announcement yet.
Unable to translate SQLException Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to translate SQLException

    Hi,

    I am new to Spring and I am trying the step-by-step tutorial come with Spring 1.2 release. The database is MySQL 5.0.
    After creating all the project following the instruction, I got Unable to translate SQLException pasted below.
    Can anyone help me out?

    Tim

    2005-05-18 13:06:53,156 DEBUG [org.springframework.jdbc.datasource.DataSourceUtil s] - Opening JDBC Connection
    2005-05-18 13:06:53,156 DEBUG [org.springframework.jdbc.datasource.DriverManagerD ataSource] - Creating new JDBC connection to [jdbc:mysql://localhost:3306/spring]
    2005-05-18 13:06:53,187 DEBUG [org.springframework.jdbc.datasource.DataSourceUtil s] - Closing JDBC Connection
    2005-05-18 13:06:53,187 DEBUG [org.springframework.jdbc.support.SQLErrorCodesFact ory] - Database product name cached for DataSource [org.springframework.jdbc.datasource.DriverManagerD ataSource@ff6348]: name is 'MySQL'
    2005-05-18 13:06:53,187 DEBUG [org.springframework.jdbc.support.SQLErrorCodesFact ory] - SQL error codes for 'MySQL' found
    2005-05-18 13:06:53,187 DEBUG [org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator] - Unable to translate SQLException with errorCode '0', will now try the fallback translator
    2005-05-18 13:06:53,187 DEBUG [org.springframework.jdbc.support.SQLStateSQLExcept ionTranslator] - Translating SQLException with SQLState 'S1000' and errorCode '0' and message [Unknown type '246 in column 2 of 3 in binary-encoded result set.]; SQL was [SELECT id, description, price from products] for task [executing PreparedStatementCallback [PreparedStatementCreatorFactory.PreparedStatementC reatorImpl: sql=[SELECT id, description, price from products]: params=[]]]
    2005-05-18 13:06:53,203 DEBUG [org.springframework.jdbc.datasource.DataSourceUtil s] - Closing JDBC Connection
    2005-05-18 13:06:53,218 ERROR [org.springframework.web.servlet.DispatcherServlet] - Could not complete request
    org.springframework.jdbc.UncategorizedSQLException : (executing PreparedStatementCallback [PreparedStatementCreatorFactory.PreparedStatementC reatorImpl: sql=[SELECT id, description, price from products]: params=[]]): encountered SQLException [Unknown type '246 in column 2 of 3 in binary-encoded result set.]; nested exception is java.sql.SQLException: Unknown type '246 in column 2 of 3 in binary-encoded result set.
    java.sql.SQLException: Unknown type '246 in column 2 of 3 in binary-encoded result set.
    at com.mysql.jdbc.MysqlIO.unpackNativeEncodedColumn(M ysqlIO.java:4149)
    at com.mysql.jdbc.MysqlIO.unpackBinaryResultSetRow(My sqlIO.java:3672)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1335)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.ja va:2253)

  • #2
    Looks like you need to upgrade your Connector/J JDBC driver to 3.1.8 or later - see this post on the MySQL support forum: http://forums.mysql.com/read.php?39,...1447#msg-21447

    Comment

    Working...
    X