com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql

Atlassian JIRA | Gustavo Refosco | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [CRUC-6746] Migration/restore fails while using MySQL > 5.5 - Atlassian JIRA

    atlassian.com | 1 year ago
    com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql
  2. 0

    If migrating or restoring to a MySQL 5.5 database our scripts will fail due to a change in the way that MySQL references the engine type. Starting with version 5.5, MySQL changed the syntax referencing the engine type from TYPE=INNODB to ENGINE=INNODB which conflicts with our current migration scripts. *Stack trace* {noformat} 14:43:41 ERROR - Database migration failed: com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:241) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:111) at com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:78) at com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:60) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 1: "create table cru_base_star_model (cru_star_id integer not null, cru_item_type varchar(80) not null, cru_string_key1 varchar(255), cru_string_key2 varchar(255), cru_string_key3 varchar(255), cru_string_key4 varchar(255), cru_string_key5 varchar(255), cru_int_key1 integer, cru_int_key2 integer, cru_int_key3 integer, cru_int_key4 integer, cru_int_key5 integer, cru_text_key1 mediumtext, cru_text_key2 mediumtext, cru_user_name varchar(255), cru_date_created bigint, cru_label varchar(255), primary key (cru_star_id)) type=InnoDB;" (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:395) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:347) at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:235) ... 10 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1 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:2642) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:377) ... 12 more {noformat} *Workaround* The workaround is to change manually all the "TYPE=INNODB" contained in the scripts to "ENGINE=INNODB". For instance, in the logs above, it shows /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql, which means the script tables_63.sql must be changed manually.

    Atlassian JIRA | 3 years ago | Gustavo Refosco [Atlassian]
    com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql
  3. 0

    If migrating or restoring to a MySQL 5.5 database our scripts will fail due to a change in the way that MySQL references the engine type. Starting with version 5.5, MySQL changed the syntax referencing the engine type from TYPE=INNODB to ENGINE=INNODB which conflicts with our current migration scripts. *Stack trace* {noformat} 14:43:41 ERROR - Database migration failed: com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:241) at com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:111) at com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:78) at com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:60) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:695) Caused by: com.cenqua.crucible.hibernate.CruDBException: SQL script error on line 1: "create table cru_base_star_model (cru_star_id integer not null, cru_item_type varchar(80) not null, cru_string_key1 varchar(255), cru_string_key2 varchar(255), cru_string_key3 varchar(255), cru_string_key4 varchar(255), cru_string_key5 varchar(255), cru_int_key1 integer, cru_int_key2 integer, cru_int_key3 integer, cru_int_key4 integer, cru_int_key5 integer, cru_text_key1 mediumtext, cru_text_key2 mediumtext, cru_user_name varchar(255), cru_date_created bigint, cru_label varchar(255), primary key (cru_star_id)) type=InnoDB;" (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1), please contact http://www.atlassian.com/support/ at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:395) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:347) at com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:235) ... 10 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1 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:2642) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566) at com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:377) ... 12 more {noformat} *Workaround* The workaround is to change manually all the "TYPE=INNODB" contained in the scripts to "ENGINE=INNODB". For instance, in the logs above, it shows /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql, which means the script tables_63.sql must be changed manually.

    Atlassian JIRA | 3 years ago | Gustavo Refosco
    com.cenqua.crucible.hibernate.CruDBException: Problem with create tables script /Users/grefosco/Documents/Atlassian/FishEye/fecru-2.2.0/sql/MYSQL/schema/tables_63.sql
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SQL does not work with EchoPet!

    GitHub | 3 years ago | DubstepCraig
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
  6. 0

    how to insert apostrophe data in mysql using jdbc

    Stack Overflow | 3 years ago | puneetjava
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Trousers' ,'http://www.flipkart.com/voi-jeans-banana-fit-men-s- trousers/p/itmd' at line 1
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

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=InnoDB' at line 1

    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:2642)
    10. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1647)
    11. com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1566)
    11 frames
  4. com.cenqua.crucible
    DefaultDBControl.createTables
    1. com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:377)
    2. com.cenqua.crucible.hibernate.DefaultDBControl.executeScript(DefaultDBControl.java:347)
    3. com.cenqua.crucible.hibernate.DefaultDBControl.createTables(DefaultDBControl.java:235)
    3 frames
  5. com.atlassian.crucible
    DBImporter.importData
    1. com.atlassian.crucible.migration.item.DBImporter.importData(DBImporter.java:111)
    1 frame
  6. com.cenqua.crucible
    DBEditHelper$ImportRunner.call
    1. com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:78)
    2. com.cenqua.crucible.actions.admin.database.DBEditHelper$ImportRunner.call(DBEditHelper.java:60)
    2 frames
  7. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    5. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    6. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    7. java.lang.Thread.run(Thread.java:695)
    7 frames