I have a few packages on my oracle instance. When I recreate my database from scratch, I get zero invalid objects, and no warnings from liquibase.
Then, when I call a package method, like so:
new SimpleJdbcCall(jdbcTemplate).withCatalogName(packageName).withProcedureName(storedProcedureName).execute(parameterMap);
It gives me the following error:
org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL [{call CALENDAR_MANAGEMENT.CREATE_SUMMARIES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; SQL state [72000]; error code [4063]; ORA-04063: package body "ETPDEV.CALENDAR_MANAGEMENT" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ETPDEV.CALENDAR_MANAGEMENT"
ORA-06512: at line 1;
nested exception is java.sql.SQLException: ORA-04063: package body "ETPDEV.CALENDAR_MANAGEMENT" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ETPDEV.CALENDAR_MANAGEMENT"
ORA-06512: at line 1
Caused by: java.sql.SQLException: ORA-04063: package body "ETPDEV.CALENDAR_MANAGEMENT" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ETPDEV.CALENDAR_MANAGEMENT"
ORA-06512: at line 1
Checking for invalid objects again turns up nothing. Compiling CALENDAR_MANAGEMENT again completes normally without errors.
I've tried a full schema recompile, but that did not work.
When I call it from SQLDeveloper, it works normally.
I was running into this error in my integration checks, and I didn't think to check the validity of the package WHILE it was running.
Dropping a simple bit of code right before the call for the package:
select name || ' - ' || line || ' - ' || text from user_errors order by name, sequence;
I found that a different test was not cleaning up after itself, but this one was, so when I looked at the DB before and after, it looked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With