org.springframework.jdbc.datasource.init.ScriptStatementFailedException: 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                

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

Solutions on the web

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 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 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 Andreas
, 1 year ago
Failed to execute SQL script statement at line 3 of resource class path resource [homectrlLog-schema.sql]: CREATE TRIGGER IF NOT EXISTS cleanup AFTER INSERT ON events BEGIN DELETE FROM events WHERE time < datetime('now', '-35 days')
via coderanch.com by Unknown author, 1 year ago
Failed to execute SQL script statement at line 1 of resource class path resource [db/create-db.txt]: CREATE TABLE FIELD ( fieldID INT PRIMARY KEY, name VARCHAR(200), type VARCHAR(200) )
via hsqldb by negroscuro
, 1 year ago
Failed to execute SQL script statement at line 1 of resource class path resource [db/create-db.txt]: CREATE TABLE FIELD (  fieldID INT PRIMARY KEY,  name VARCHAR(200),  type VARCHAR(200) )
org.springframework.jdbc.datasource.init.ScriptStatementFailedException: 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                
at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:202)

Users with the same issue

You are the first who have seen this exception.

Write tip

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