-
Notifications
You must be signed in to change notification settings - Fork 186
Error on call of coverage stop in java #1094
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
Comments
Hey @ksawerykarwacki - which client do you use? Have you tried utPLSQL-cli? |
I'm running call ut_runner.coverage_stop() using update method on jdbctemplate in my java code. |
As far as I know, this is not part of the official documentation and not meant to be used in that way. Maybe @PhilippSalvisberg or @jgebal can give some insights |
Ah, okay, I see - this context is important - good we have a reference now :) |
I have noticed there is an issue in Oracle package So this fails:
I'm pretty sure that there will be no block-coverage reported after second call to stop_coverage.
It is a shitty situation but since we have no control over Oracle proprietary code behavior we can only react and workaround the issues we find. @ksawerykarwacki - can you review and see if the code under test actually calls DBMS_STATS or other SYS-owned packages while coverage is gathered? |
Similar to #1097 |
I'm trying to introduce code coverage in my integration tests. Unfortunately every time I try to call ut_runner.coverage_stop() for the first time I get error listed below and no coverage is present on report generation if that was the only call. Of course starting coverage at later stage breaks some unique constraint on duplicating run id.
It is enough to wrap call in try/catch block and rerun it in catch to get everything back to normal but nevertheless it seems strange.
My DB is Oracle 12c Standard Edition docker image build using official scripts. Schema and utplsql are installed on the PDB.
`PreparedStatementCallback; uncategorized SQLException for SQL [call ut_runner.coverage_stop()]; SQL state [99999]; error code [8402]; ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
; nested exception is java.sql.SQLException: ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [call ut_runner.coverage_stop()]; SQL state [99999]; error code [8402]; ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
; nested exception is java.sql.SQLException: ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
Caused by: java.sql.SQLException: ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
Caused by: Error : 8402, Position : 5, Sql = call ut_runner.coverage_stop(), OriginalSql = call ut_runner.coverage_stop(), Error Msg = ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 38
ORA-06512: at "UT3.UT_COVERAGE", line 203
ORA-06512: at "UT3.UT_RUNNER", line 278
The text was updated successfully, but these errors were encountered: