Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Oracle error - show the ORA code #770

PeeZu opened this issue May 30, 2014 · 2 comments

Improve Oracle error - show the ORA code #770

PeeZu opened this issue May 30, 2014 · 2 comments


Copy link

@PeeZu PeeZu commented May 30, 2014

On Flyway 3.0 within ANT the error stack when an Oracle error occur should be more detailed.

Example: if my migration script contain this statement:


And this table doesn't exist, I expect:

ORA-00942 : table or view does not exist 

But I got:

Flyway Error: org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: Error executing statement at line 4: DROP TABLE FOO$

Please add, at less, the ORA error code on the error information.

@axelfontaine axelfontaine added this to the Flyway 3.1 milestone May 30, 2014
Copy link

@gmathias gmathias commented Jul 21, 2014

this is not specific to Oracle. The AbstractFlywayTask throws a BuildException (displayed by ant) but the message does not contains the root cause message (ex: the SQL error).

Moreover "FlywaySqlScriptException : Error executing statement at line ..." is often useless as it points to the first line of a multi-line statement (create table, etc). That doesn't help to find the problem.

Please append the root cause message to the BuildException message.

Copy link

@axelfontaine axelfontaine commented Nov 21, 2014

This is now fixed for all DBs and all clients.

Sample output of Flyway 3.1:

Migration V1__Should_Fail.sql failed
SQL State  : 42000
Error Code : 900
Message    : ORA-00900: invalid SQL statement
Location   : migration/failed/V1__Should_Fail.sql (C:\Workspaces\flyway\flyway-core\target\test-classes\migration\failed\V1__Should_Fail.sql)
Line       : 21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants