GeezerVison is showing github.com — ORA-00001 returned before ut_coverage_html_reporter finished · Issue #1086 · utPLSQL/utPLSQL
ORA-00001 returned before ut_coverage_html_reporter finished #1086DescriptionHi,
When I run something like
utPLSQL-cli/bin/utplsql run xxx/yyy@//zzz:1521/localpdb -c -f=ut_coverage_html_reporter -o=coverage.html
I get the following error
Successfully connected to database. UtPLSQL core: v3.1.10.3349
Oracle-Version: 18.0.0.0.0
Running tests now.
TestRunner initialized
Running on utPLSQL v3.1.10.3349
Initializing reporters
Running tests
ORA-00001: unique constraint (UT3.UT_COVERAGE_SOURCES_TMP_PK) violated
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "UT3.UT_COVERAGE_HELPER", line 37
ORA-06512: at "UT3.UT_COVERAGE", line 166
ORA-06512: at "UT3.UT_COVERAGE", line 235
ORA-06512: at "UT3.UT_COVERAGE_HTML_REPORTER", line 35
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)
Am I doing something wrong or there's a bug?
I get the same result running ut_coverage_html_reporter in sql developer, so it's not related just to cli. Activitypesse commented on Jun 29, 2020 Can you try to uninstall and reinstall utPLSQL on your database?
Looks similar to #568 though this is long ago solved 🤔
@jgebal any ideas? jgebal commented on Jun 29, 2020 The issue shoul be moved to utPLSQL main project jgebal commented on Jun 29, 2020 This is really odd.
It seems like you have duplicate:
Owner/name/line amongst:
package body
trigger
type body
procedure
function
I didn't realize it's possible jgebal commented on Jun 29, 2020 Just checked. Trigger name can overlap with package or procedure or function name.
Can you check if this is duplicated in your case?
We need a fix in utPLSQL core code to fix it. hehawe commented on Jun 29, 2020 Can be at least the duplicate name identified?
I can also see the following:
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: Error : 1, 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));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));END;, Error Msg = ORA-00001: unique constraint (UT3.UT_COVERAGE_SOURCES_TMP_PK) violated hehawe commented on Jun 29, 2020 Even when I do just:
create or replace package testFunction_firstTest as
--%suite(testSuite)
--%test
procedure firstTest;
end;
/
create or replace package body testFunction_firstTest as
procedure firstTest
is
begin
ut.expect( 1 ).to_equal( 1 );
end;
end;
/
begin ut.run('testFunction_firstTest', ut_coverage_html_reporter()); end;
I got the same error jgebal commented on Jul 1, 2020 @hehawe
You can run the following query to identify duplicate object names that are causing this problem in your test run.
select
owner, object_name,
min(object_type) first_object_type, max(object_type) last_object_type,
count(1) duplicate_object_name_count
from dba_objects
where object_type in ('PACAKGE BODY','TYPE BODY','PROCEDURE','FUNCTION','TRIGGER')
group by owner, object_name
having count(1) > 1
order by owner, object_name
I've managed to reproduce the issue using the following steps:
create or replace package test_duplicate_name is
procedure some_procedure;
end;
create or replace package body test_duplicate_name is
procedure some_procedure is
begin
null;
end;
end;
/
create table test_table (id integer);
create or replace trigger test_duplicate_name
before insert on test_table
begin
null;
end;
begin
ut.run(ut_coverage_html_reporter());
end;
And I go the error as described:
ORA-00001: unique constraint (UT3.UT_COVERAGE_SOURCES_TMP_PK) violated
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "UT3.UT_COVERAGE_HELPER", line 37
ORA-06512: at "UT3.UT_COVERAGE", line 166
ORA-06512: at "UT3.UT_COVERAGE", line 235
ORA-06512: at "UT3.UT_COVERAGE_HTML_REPORTER", line 35
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 "UT3.UT", line 134
ORA-06512: at "UT3.UT", line 488
ORA-06512: at "UT3.UT", line 558
ORA-06512: at line 2
Workaround for now
Rename duplicate objects.
It should be easiest to rename triggers as they should have no code depending on them and so the impact of rename should be zero.
Long-term, a fix is needed in utPLSQL to address this issue.
Should be relatively easy to fix now that we know what the cause is. hehawe commented on Jul 1, 2020 @jgebal
Hi Jacek,
Thanks for the workaround. We have a really big project, and yes, I could identify the duplicates. And there's a progress. However still with no success at the end. Now I have the following error:
ORA-19011: Character string buffer too small
ORA-06512: at "UT3.UT_RUNNER", line 180
ORA-06512: at "SYS.DBMS_XMLGEN", line 19
ORA-06512: at "SYS.DBMS_XMLGEN", line 295
ORA-06512: at "UT3.UT_COVERAGE_REPORT_HTML_HELPER", line 190
ORA-06512: at "UT3.UT_COVERAGE_REPORT_HTML_HELPER", line 202
ORA-06512: at "UT3.UT_COVERAGE_REPORT_HTML_HELPER", line 334
ORA-06512: at "UT3.UT_COVERAGE_HTML_REPORTER", line 37
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 "UT3.UT", line 134
ORA-06512: at "UT3.UT", line 488
ORA-06512: at "UT3.UT", line 623
ORA-06512: at line 1
19011. 00000 - "Character string buffer too small"
*Cause: The string result asked for is too big to return back
*Action: Get the result as a lob instead
Thanks for your effort,
HHW jgebal commented on Jul 1, 2020 Can you raise this as a separate issue please?
I will not be able to investigate it this week.
I'm on holidays added 2 commits that reference this issue on Jul 18, 2020This issue will close once commit 89d546a is merged into the 'develop' branch.89d546a This issue will close once commit e96b978 is merged into the 'develop' branch.e96b978 jgebal commented on Oct 18, 2022
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|