org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement at line 1 of resource class path resource [test-data.sql]: insert into contact (first_name, last_name, birth_date) values ('Chris', 'Schaefer', '1981-05-03')

Stack Overflow | Eddy Freeman | 5 months ago
  1. 0

    Spring and Hibernate Database Tables Relationship Issues

    Stack Overflow | 5 months ago | Eddy Freeman
    org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement at line 1 of resource class path resource [test-data.sql]: insert into contact (first_name, last_name, birth_date) values ('Chris', 'Schaefer', '1981-05-03')
  2. 0

    Spring boot application is failing to insert data

    Stack Overflow | 5 months ago | Hadrian Blackwater
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookingRepository': Cannot create inner bean '(inner bean)#126f8f24' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#126f8f24': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of URL [file:/C:/Users/Naveen/Documents/workspace-sts-3.8.0.RELEASE/BookingManagement/target/classes/data.sql]: insert into booking(booking_name) values("Chris"); nested exception is org.h2.jdbc.JdbcSQLException: Column "Chris" not found; SQL statement: insert into booking(booking_name) values("Chris") [42122-192]
  3. 0

    H2.sql missing dist_reindex tables

    GitHub | 3 years ago | wezell
    com.dotmarketing.exception.DotDataException: Table "DIST_LOCK" not found; SQL statement: select * from dist_lock for update [42102-169]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Syntax error when you try to delete the pushed asset history from maintenance

    GitHub | 2 years ago | bryanboza
    com.dotmarketing.exception.DotDataException: Syntax error in SQL statement "TRUNCATE PUBLISHING_PUSHED_ASSETS[*] "; expected "TABLE"; SQL statement: TRUNCATE publishing_pushed_assets [42001-176]
  6. 0

    dbColumnName problem in Mapper, schemify, CRUDify in 1.1-M6 and 1.1-SHAPSHOT

    GitHub | 7 years ago | econoplas
    org.h2.jdbc.JdbcSQLException: Duplicate column name ACTIVE; SQL statement: ---> ALTER TABLE PROJECT_TYPE ADD COLUMN ACTIVE BOOLEAN [42121-121]

  1. archenroot 1 times, last 1 month ago
  2. tvrmsmith 1 times, last 2 months ago
  3. Kawada 3 times, last 2 months ago
  4. Shadd518 3 times, last 3 months ago
11 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. org.h2.jdbc.JdbcSQLException

    Unique index or primary key violation: "UQ_CONTACT_1_INDEX_6 ON PUBLIC.CONTACT(FIRST_NAME, LAST_NAME) VALUES ('Chris', 'Schaefer', 1)"; SQL statement: insert into contact (first_name, last_name, birth_date) values ('Chris', 'Schaefer', '1981-05-03') [23505-192]

    at org.h2.message.DbException.getJdbcSQLException()
  2. H2 Database Engine
    JdbcStatement.execute
    1. org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    2. org.h2.message.DbException.get(DbException.java:179)
    3. org.h2.message.DbException.get(DbException.java:155)
    4. org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)
    5. org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)
    6. org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:190)
    7. org.h2.mvstore.db.MVTable.addRow(MVTable.java:704)
    8. org.h2.command.dml.Insert.insertRows(Insert.java:156)
    9. org.h2.command.dml.Insert.update(Insert.java:114)
    10. org.h2.command.CommandContainer.update(CommandContainer.java:98)
    11. org.h2.command.Command.executeUpdate(Command.java:258)
    12. org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:184)
    13. org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
    13 frames
  3. org.springframework.jdbc
    DatabasePopulatorUtils.execute
    1. org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:187)
    2. org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:202)
    3. org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:135)
    4. org.springframework.jdbc.datasource.init.CompositeDatabasePopulator.populate(CompositeDatabasePopulator.java:56)
    5. org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:47)
    5 frames