2008年12月18日星期四

The column name xxx was not found in this ResultSet.

org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select * from t_service_transaction where id = ?]; nested exception is org.postgresql.util.PSQLException: The column name sp_id was not found in this ResultSet.
    org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:107)
    org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276)
    org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:554)
    org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588)
    org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:617)
    org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:625)
    org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:657)


sp_id is absolutely not a field of table `t_service_transaction`,
and this exception occurred many times with different table names but same field name.

restart postgres sql server, and evrything goes fine.

@see:
http://archives.postgresql.org/pgsql-jdbc/2005-06/msg00086.php

没有评论: