java.sql.SQLException

SQL statement failed: CREATE INDEX `test_some_field_idx` ON `test` ( `some_field` )

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web6007

  • SQL statement failed: CREATE INDEX `test_some_field_idx` ON `test` ( `some_field` )
  • SQL statement failed: CREATE INDEX `VlpTag_tagValue_idx` ON `VlpTag` ( `tagValue` )
  • Index already exists: S0011 Index already exists: PKEY in statement \[CREATE INDEX PKEY ON GBCL(PKEY)\]
  • Stack trace

    • java.sql.SQLException: SQL statement failed: CREATE INDEX `test_some_field_idx` ON `test` ( `some_field` ) at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) at com.j256.ormlite.table.TableUtils.doStatements(TableUtils.java:458) at com.j256.ormlite.table.TableUtils.doCreateTable(TableUtils.java:436) at com.j256.ormlite.table.TableUtils.createTable(TableUtils.java:223) at com.j256.ormlite.table.TableUtils.createTableIfNotExists(TableUtils.java:61) at OrmLiteTest.main(OrmLiteTest.java:27) Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (index test_some_field_idx already exists) at org.sqlite.DB.newSQLException(DB.java:383) at org.sqlite.DB.newSQLException(DB.java:387) at org.sqlite.DB.throwex(DB.java:374) at org.sqlite.NativeDB.prepare(Native Method) at org.sqlite.DB.prepare(DB.java:123) at org.sqlite.PrepStmt.<init>(PrepStmt.java:42) at org.sqlite.Conn.prepareStatement(Conn.java:404) at org.sqlite.Conn.prepareStatement(Conn.java:399) at com.j256.ormlite.jdbc.JdbcDatabaseConnection.compileStatement(JdbcDatabaseConnection.java:84) at com.j256.ormlite.table.TableUtils.doStatements(TableUtils.java:451)

    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

    Unknown user
    Once, 11 months ago
    36 times, 7 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago