GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #1086

New issue
Copy link
New issue
Copy link
Closed
#1091
Closed
ORA-00001 returned before ut_coverage_html_reporter finished#1086
#1091
Copy link
Assignees
jgebal
Labels
bug
Milestone
v3.1.11

Description

@hehawe
hehawe
opened on Jun 29, 2020
Issue body actions

Hi,
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.

Activity

  1. pesse commented on Jun 29, 2020

    @pesse
    pesse
    on Jun 29, 2020
    Member
    More actions

    Can you try to uninstall and reinstall utPLSQL on your database?
    Looks similar to #568 though this is long ago solved 🤔
    @jgebal any ideas?

  2. jgebal commented on Jun 29, 2020

    @jgebal
    jgebal
    on Jun 29, 2020
    Member
    More actions

    The issue shoul be moved to utPLSQL main project

  3. jgebal commented on Jun 29, 2020

    @jgebal
    jgebal
    on Jun 29, 2020
    Member
    More actions

    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

  4. jgebal commented on Jun 29, 2020

    @jgebal
    jgebal
    on Jun 29, 2020
    Member
    More actions

    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.

  5. hehawe commented on Jun 29, 2020

    @hehawe
    hehawe
    on Jun 29, 2020
    Author
    More actions

    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

  6. hehawe commented on Jun 29, 2020

    @hehawe
    hehawe
    on Jun 29, 2020
    Author
    More actions

    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

  7. jgebal
    transferred this issue fromutPLSQL/utPLSQL-clion Jul 1, 2020
  8. jgebal
    added
    bug
    on Jul 1, 2020
  9. jgebal commented on Jul 1, 2020

    @jgebal
    jgebal
    on Jul 1, 2020
    Member
    More actions

    @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.

  10. hehawe commented on Jul 1, 2020

    @hehawe
    hehawe
    on Jul 1, 2020
    Author
    More actions

    @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

  11. jgebal commented on Jul 1, 2020

    @jgebal
    jgebal
    on Jul 1, 2020
    Member
    More actions

    Can you raise this as a separate issue please?
    I will not be able to investigate it this week.
    I'm on holidays

    Reacted by HHW
  12. jgebal
    added this to the 3.1.11 milestone on Jul 18, 2020
  13. jgebal
    self-assigned this
    on Jul 18, 2020
  14. jgebal
    added 2 commits that reference this issue on Jul 18, 2020

    Extended UK on ut_coverage_sources_tmp table.

    This issue will close once commit 89d546a is merged into the 'develop' branch.
    89d546a

    Added object type to name in coverage reports.

    This issue will close once commit e96b978 is merged into the 'develop' branch.
    e96b978
  15. jgebal
    closed this as completedin #1091on Jul 20, 2020
  16. jgebal commented on Oct 18, 2022

    @jgebal
    jgebal
    on Oct 18, 2022
    Member
    More actions

    @hehawe
    Your other problem was also identified now and will be fixed in version 3.1.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jgebal
    jgebal

Labels

bug

Type

No type

Projects

No projects

    Milestone

    • v3.1.11

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.