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

Error message when running ut_coverage_cobertura_reporter #190

Open
TobiasDo1 opened this issue Jan 8, 2021 · 4 comments
Open

Error message when running ut_coverage_cobertura_reporter #190

TobiasDo1 opened this issue Jan 8, 2021 · 4 comments
Assignees

Comments

@TobiasDo1
Copy link

Hi all,

I do have a problem, when executing utplsql based on a tag.

This is what I am executing:
utplsql run <schema>/<pw>@<host>:<port>/<service> --tags=erudities --debug -f=ut_coverage_cobertura_reporter -o=hex_cc_erudities.xml -s --failure-exit-code=0

And this is the output the cmd is spooling:

2021-01-08 16:15:33 [main] INFO  org.utplsql.cli.RunAction - ########################## utPLSQL cli '###########################
'#                                                                #
'#   utPLSQL-cli 3.1.8-SNAPSHOT.local                             #
'#   utPLSQL-java-api 3.1.8.546                                   #
'#   Java-Version: 1.8.0_211                                      #
'#   ORACLE_HOME: C:\oracle\os18\client\product\18.0.0\client_1   #
'#   NLS_LANG: .AL32UTF8                                          #
'#                                                                #
'#   Thanks for testing!                                          #
'#                                                                #
'##################################################################
2021-01-08 16:15:33 [main] INFO  org.utplsql.cli.RunAction -
2021-01-08 16:15:34 [main] INFO  o.u.c.d.TestedDataSourceProvider - Use connection string jdbc:oracle:thin:****/****@<host>:<port>/<service>
2021-01-08 16:15:34 [main] INFO  org.utplsql.cli.RunAction - Successfully connected to database. UtPLSQL core: v3.1.10.3349
2021-01-08 16:15:35 [main] INFO  org.utplsql.cli.RunAction - Oracle-Version: 19.0.0.0.0
2021-01-08 16:15:35 [main] DEBUG org.utplsql.api.reporter.Reporter - Database-reporter initialized, Type: UT_COVERAGE_COBERTURA_REPORTER, ID: 56DD7CF3C9D947649C37D841F9FB343E
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.cli.RunTestRunnerTask - Running tests now.
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.cli.RunTestRunnerTask - --------------------------------------
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.api.TestRunner - TestRunner initialized
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.api.TestRunner - Running on utPLSQL v3.1.10.3349
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.api.TestRunner - Initializing reporters
2021-01-08 16:15:35 [pool-1-thread-1] INFO  org.utplsql.api.TestRunner - Running tests
ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 45
ORA-06512: at "UT3.UT_COVERAGE", line 221
ORA-06512: at "UT3.UT_COVERAGE_COBERTURA_REPORTER", line 142
ORA-06512: at "UT3.UT_REPORTER_BASE", line 193
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 70
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 80
ORA-06512: at "UT3.UT_RUN", line 74
ORA-06512: at "UT3.UT_SUITE_ITEM", line 49
ORA-06512: at "UT3.UT_RUNNER", line 172
ORA-06512: at line 1

java.sql.SQLException: ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 45
ORA-06512: at "UT3.UT_COVERAGE", line 221
ORA-06512: at "UT3.UT_COVERAGE_COBERTURA_REPORTER", line 142
ORA-06512: at "UT3.UT_REPORTER_BASE", line 193
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 70
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 80
ORA-06512: at "UT3.UT_RUN", line 74
ORA-06512: at "UT3.UT_SUITE_ITEM", line 49
ORA-06512: at "UT3.UT_RUNNER", line 172
ORA-06512: at line 1

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:461)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1104)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:550)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:268)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:265)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:86)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:965)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1205)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)
at oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1358)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3778)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4251)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1081)
at org.utplsql.api.testRunner.DynamicTestRunnerStatement.execute(DynamicTestRunnerStatement.java:84)
at org.utplsql.api.TestRunner.run(TestRunner.java:213)
at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:45)
at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:24)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Caused by: Error : 8402, Position : 0, Sql = BEGIN ut_runner.run(a_paths => :1 , a_reporters => :2 , a_color_console => (case :3  when 1 then true else false end), a_fail_on_errors => (case :4  when 1 then true else false end), a_client_character_set => :5 , a_random_test_order => (case :6  when 1 then true else false end), a_tags => :7 );END;, OriginalSql = BEGIN ut_runner.run(a_paths => ?, a_reporters => ?, a_color_console => (case ? when 1 then true else false end), a_fail_on_errors => (case ? when 1 then true else false end), a_client_character_set => ?, a_random_test_order => (case ? when 1 then true else false end), a_tags => ?);END;, Error Msg = ORA-08402: error executing PL/SQL code coverage
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "SYS.DBMS_PLSQL_CODE_COVERAGE", line 148
ORA-06512: at "UT3.UT_COVERAGE_HELPER_BLOCK", line 45
ORA-06512: at "UT3.UT_COVERAGE", line 221
ORA-06512: at "UT3.UT_COVERAGE_COBERTURA_REPORTER", line 142
ORA-06512: at "UT3.UT_REPORTER_BASE", line 193
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 70
ORA-06512: at "UT3.UT_EVENT_MANAGER", line 80
ORA-06512: at "UT3.UT_RUN", line 74
ORA-06512: at "UT3.UT_SUITE_ITEM", line 49
ORA-06512: at "UT3.UT_RUNNER", line 172
ORA-06512: at line 1

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
... 22 more

Other reporters are working and issue is also not coming, if I select another tag. So obviously it is something dealing with the packages that are selected with this tag, but I cannot figure it out from the error message.
All packages in schema are in valid state.

Any help is appreciated.
Thank you and best regards

@jgebal
Copy link
Member

jgebal commented Jan 8, 2021

The issue is with oracle internal packages.
For some reason, DBMS_PLSQL_CODE_COVERAGE fails when code has calls to some of SYS packages.
I saw this issue myself when code was calling DBMS_STATS package.

There is no solution for this from our side, only workaround.
I was wondering if we should implement it at all, but is seems to be quite common issue so maybe workaround is needed.

@jgebal jgebal self-assigned this Jan 8, 2021
@TobiasDo1
Copy link
Author

Hi Jacek,
thanks for your reply.
So does it mean that you are already aware of a workaround to overcome this?
Best regards
Tobias

@jgebal
Copy link
Member

jgebal commented Jan 9, 2021

Yes. It requires a change to utPLSQL code.

@TobiasDo1
Copy link
Author

Great.
Then I will wait for your changes to come.
Thanks a lot, Jacek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants