org.springframework.jdbc.BadSqlGrammarException

StatementCallback; bad SQL grammar [INSERT INTO unit_key_store (unit, k ey_store) SELECT 'OpalInstance', key_store FROM study_key_store WHERE unit = 'DEFAULT_STUDY_ID']; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unkno wn column 'key_store' in 'field list'

Solutions on the web292

  • via JIRA by Martin Boulanger, 9 months ago
    StatementCallback; bad SQL grammar [INSERT INTO unit_key_store (unit, k ey_store) SELECT 'OpalInstance', key_store FROM study_key_store WHERE unit = 'DEFAULT_STUDY_ID']; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unkno wn column 'key_store' in 'field list'
  • via spring.io by Unknown author, 1 year ago
    PreparedStatementCallback; bad SQL grammar [select username,series,token,last_used from persistent_logins where series = ?]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'username' in 'field list'
  • via Stack Overflow by user962206
    , 1 year ago
    PreparedStatementCallback; bad SQL grammar [INSERT INTO PERSON (empID,password) VALUES(?,?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'empID' in 'field list'
  • Stack trace

    • org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [INSERT INTO unit_key_store (unit, k ey_store) SELECT 'OpalInstance', key_store FROM study_key_store WHERE unit = 'DEFAULT_STUDY_ID']; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unkno wn column 'key_store' in 'field list' at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:220) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:522) at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:237) at org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:151) at org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:115) at org.obiba.runtime.upgrade.support.jdbc.SqlScriptUpgradeStep.execute(SqlScriptUpgradeStep.java:60) at org.obiba.runtime.upgrade.support.DefaultUpgradeManager.executeUpgrade(DefaultUpgradeManager.java:104) at org.obiba.opal.server.UpgradeCommand.execute(UpgradeCommand.java:37) at org.obiba.opal.server.OpalServer.<init>(OpalServer.java:37) at org.obiba.opal.server.OpalServer.main(OpalServer.java:73) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'key_store' in 'field list' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2637) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228) at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:512) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396) ... 9 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    2 times, 1 month ago
    9 times, 8 months ago
    23 times, 8 months ago
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    117 more bugmates