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'

JIRA | Martin Boulanger | 7 years ago
  1. 0

    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

    JIRA | 7 years ago | Martin Boulanger
    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'
  2. 0

    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

    JIRA | 7 years ago | Martin Boulanger
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unkno wn column 'key_store' in 'field list'
  3. 0

    [groovy-user] GroovyShell and exiting on exceptions

    Google Groups | 5 years ago | Eric Dalquist
    org.hibernate.JDBCException: Error during DDL export
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 4#57426909

    GitHub | 2 years ago | albagarcia
    org.exolab.castor.xml.MarshalException: org.springframework.dao.DataAccessResourceFailureException: Could not obtain last_insert_id(); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'lexevs61.lbincrement_sequence' doesn't exist{File: [not available]; line: 64; column: 14}
  6. 0

    [UP-2414] MySQL generates error when creating index UPPERM_IDX on UP_PERMISSION: Specified key was too long; max key length is 1000 bytes - JASIG Issue Tracker

    jasig.org | 1 year ago
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes

  1. Kialandei 1 times, last 2 weeks ago
  2. jshakil 1 times, last 1 month ago
  3. mortalman7 1 times, last 4 months ago
  4. MoYapro 1 times, last 2 weeks ago
  5. tvrmsmith 6 times, last 3 weeks ago
27 more registered users
66 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    Unknown column 'key_store' in 'field list'

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    4. java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    4 frames
  3. MySQL jdbc
    StatementImpl.executeUpdate
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
    2. com.mysql.jdbc.Util.getInstance(Util.java:381)
    3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
    4. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
    6. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
    7. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
    8. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
    9. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2637)
    10. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647)
    11. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566)
    11 frames
  4. Commons DBCP
    DelegatingStatement.executeUpdate
    1. org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
    2. org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
    2 frames
  5. Spring Framework
    SimpleJdbcTemplate.update
    1. org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:512)
    2. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
    3. org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:522)
    4. org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:237)
    4 frames
  6. Spring TestContext
    SimpleJdbcTestUtils.executeSqlScript
    1. org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:151)
    2. org.springframework.test.jdbc.SimpleJdbcTestUtils.executeSqlScript(SimpleJdbcTestUtils.java:115)
    2 frames
  7. org.obiba.runtime
    DefaultUpgradeManager.executeUpgrade
    1. org.obiba.runtime.upgrade.support.jdbc.SqlScriptUpgradeStep.execute(SqlScriptUpgradeStep.java:60)
    2. org.obiba.runtime.upgrade.support.DefaultUpgradeManager.executeUpgrade(DefaultUpgradeManager.java:104)
    2 frames
  8. org.obiba.opal
    OpalServer.main
    1. org.obiba.opal.server.UpgradeCommand.execute(UpgradeCommand.java:37)
    2. org.obiba.opal.server.OpalServer.<init>(OpalServer.java:37)
    3. org.obiba.opal.server.OpalServer.main(OpalServer.java:73)
    3 frames