question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

End of package body not detected with Oracle

See original GitHub issue
Which version and edition of Flyway are you using?

Flyway 6.4.0 (currently the latest)

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Maven Plugin

Which database are you using (type & version)?

Oracle 18.0

Which operating system are you using?

Windows

What did you do?

(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)

Try to run the following migration script:

CREATE OR REPLACE PACKAGE my_package AS
    PROCEDURE my_procedure (a IN VARCHAR2 DEFAULT NULL);
END;
/

CREATE OR REPLACE PACKAGE BODY my_package AS

  PROCEDURE my_procedure (a IN VARCHAR2 DEFAULT NULL) IS
  BEGIN
    dbms_output.put_line(a);
  END;

BEGIN
    my_procedure('test');
END;
/


CREATE TABLE my_table (
    my_column NUMBER(1)
);
What did you expect to see?

I expect to see no error and the package “my_package” and the table “my_table” created.

What did you see instead?

The following error:

[WARNING] DB: Warning: Ausführung mit Warnung abgeschlossen (SQL State: 99999 - Error Code: 17110)

And the table my_table is not created.

Using the debug mode, I see that the end of the package body is not recognized and Flyway try to execute the create package body and create table together as a single statement.

If I run the migration script using Toad, there is no error and everything is created correctly.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Lyeeedarcommented, Apr 23, 2020

This should be fixed by this commit https://github.com/flyway/flyway/commit/a29024b818f2bee728d192dcbbf65f406a219cfe and released in Flyway 6.4.1 (sometime next week)

0reactions
laurentgrangiercommented, Apr 23, 2020

Thank you 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Packages are invalid -- ORA-04061 - Ask TOM
Packages are invalid -- ORA-04061 Hi,In our DB, few packages became invalid. And when we verified it we saw that there are no...
Read more >
What are the causes of ORA 4068 errors? - IBM
1) Simply re-execute the package. · 2) Attempt to recompile the package by using the ALTER PACKAGE command. · 3) Verify that proper...
Read more >
How can I fix this package body creation error? - Stack Overflow
Maybe you are missing an / as the last line of your package specification . Without that the code will not be executed...
Read more >
Facing error while executing function inside the package in PL ...
SQL> create or replace package my_first_package as 2 function show_Description(par_deptno in varchar2) return varchar2; 3 end; 4 / Package ...
Read more >
Unable to See Package Bodies in SQLDeveloper 2.1.1
At this point, I've revoked both the SELECT_CATALOG_ROLE and DEBUG ANY PROCEDURE. All mike_support has now is CREATE SESSION ( via the CONNECT ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found