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'

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 1) Deploy a new Opal 1.0.1 (start with a clean database schema) 2) opal --upgrade (this will initialize the schema) 3) keystore -a dcc --size 2048 -g RSA 4) Deploy a new Opal 1.1 (don't forget to change OPAL_HOME to this new installation) 5) Configuration Opal 1.1 to point towards the Opal 1.0.1 shema 6) opal --upgrade (this will perform the upgrade) CRASH DURING UPGRADE! JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02 JAVA_OPTS=-Xmx512M OPAL_HOME=C:\opal OPAL_BIN C:\opal-server-1.1-SNAPSHOT\bin\ 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - Error during VersionMigrationStep execution. Error messag e: 'StatementCallback; bad SQL grammar [INSERT INTO unit_key_store (unit, key_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'' 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - VersionMigrationStep applies to version '1.1.0'. 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - VersionMigrationStep description: 'Copy 'DEFAULT_STUDY_ID ' keystore from study_key_store to unit_key_store, then drop study_key_store.'. 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - Exception: 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(SQLErrorCodeSQLExceptionTrans lator.java:220) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptio nTranslator.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
    via by Martin Boulanger,
  • 1) Deploy a new Opal 1.0.1 (start with a clean database schema) 2) opal --upgrade (this will initialize the schema) 3) keystore -a dcc --size 2048 -g RSA 4) Deploy a new Opal 1.1 (don't forget to change OPAL_HOME to this new installation) 5) Configuration Opal 1.1 to point towards the Opal 1.0.1 shema 6) opal --upgrade (this will perform the upgrade) CRASH DURING UPGRADE! JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02 JAVA_OPTS=-Xmx512M OPAL_HOME=C:\opal OPAL_BIN C:\opal-server-1.1-SNAPSHOT\bin\ 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - Error during VersionMigrationStep execution. Error messag e: 'StatementCallback; bad SQL grammar [INSERT INTO unit_key_store (unit, key_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'' 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - VersionMigrationStep applies to version '1.1.0'. 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - VersionMigrationStep description: 'Copy 'DEFAULT_STUDY_ID ' keystore from study_key_store to unit_key_store, then drop study_key_store.'. 2010-04-06 11:43:59,341 - ERROR - gingUpgradeManagerListener - Exception: 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(SQLErrorCodeSQLExceptionTrans lator.java:220) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptio nTranslator.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
    via by Martin Boulanger,
  • GitHub comment 4#57426909
    via GitHub by albagarcia
    ,
  • Error starting server
    via symmetricds by robgielen
    ,
  • Experiences with unitils 3.2
    via unitils by chrish1
    ,
    • 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

    Users with the same issue

    rocday
    rocday2 times, last one,
    Kialandei
    Kialandei9 times, last one,
    jshakil
    jshakil23 times, last one,
    mortalman7
    mortalman71 times, last one,
    Unknown visitor1 times, last one,
    115 more bugmates