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')

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if you're not creating unused SQL entities, as it might cause this exception.

Solutions on the web

via Stack Overflow by Eddy Freeman
, 1 year ago
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')
via Stack Overflow by emeraldjava
, 2 years ago
Failed to execute SQL script statement at line 19 of resource class path resource [hsql/attribution-hsqldb.sql]: CREATE PROCEDURE policy_Attribution(p_valDate Date) MODIFIES SQL DATA BEGIN ATOMIC CREATE TABLE #retvals ( Policy_ID INT
via postgresql.org by Unknown author, 1 year ago
Failed to execute SQL script statement at line 3 of resource class path resource [db-upgradeSchema.sql]: DO $$ BEGIN IF EXISTS (SELECT COLUMN_NAME FROM information_schema.columns WHERE table_name = 'position' and column_name='org_role_id') THEN ALTER TABLE POSITION RENAME COLUMN org_role_id TO job_id                
via Stack Overflow by fxm
, 2 years ago
Failed to execute SQL script statement at line 1 of resource class path resource [org/springframework/social/connect/jdbc/JdbcUsersConnectionRepository.sql]: create table UserConnection (userId varchar(255) not null, providerId varchar(255) not
via Stack Overflow by Koohoolinn
, 1 year ago
Failed to execute SQL script statement at line 1 of resource class path resource [data.sql]: insert into tuser (userid, admin) values ("testUser0", 0)
via spring.io by Unknown author, 1 year ago
Failed to execute SQL script statement at line 1 of resource class path resource [ctl_data-scrubd.sql]: INSERT INTO xfc_ActionStartConditionType (actionStartConditionTypeId,actionStartConditionTypeName) VALUES ('1','Start After Action Completed')
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')
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103)
at org.h2.mvstore.db.MVSecondaryIndex.checkUnique(MVSecondaryIndex.java:231)
at org.h2.mvstore.db.MVSecondaryIndex.add(MVSecondaryIndex.java:190)
at org.h2.mvstore.db.MVTable.addRow(MVTable.java:704)
at org.h2.command.dml.Insert.insertRows(Insert.java:156)
at org.h2.command.dml.Insert.update(Insert.java:114)
at org.h2.command.CommandContainer.update(CommandContainer.java:98)
at org.h2.command.Command.executeUpdate(Command.java:258)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:184)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:158)
at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:187)
at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:202)
at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.populate(ResourceDatabasePopulator.java:135)
at org.springframework.jdbc.datasource.init.CompositeDatabasePopulator.populate(CompositeDatabasePopulator.java:56)
at org.springframework.jdbc.datasource.init.DatabasePopulatorUtils.execute(DatabasePopulatorUtils.java:47)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 11 months ago
Once, 1 year ago
Once, 1 year ago
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
150 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.