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

ORA-19011: Character string buffer too small returned when generating coverage report #1087

Closed
hehawe opened this issue Jul 1, 2020 · 6 comments
Assignees
Labels
Milestone

Comments

@hehawe
Copy link

hehawe commented Jul 1, 2020

When running coverage report by
begin ut.run(ut_coverage_html_reporter()); end;

I get the following error

begin ut.run(ut_coverage_html_reporter()); end;
Error report -
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 558
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

version used: utPLSQL v3.1.10.3349

@jgebal jgebal added the bug label Jul 20, 2020
@jgebal
Copy link
Member

jgebal commented Jul 20, 2020

What version of database are you using?

@jgebal
Copy link
Member

jgebal commented Jul 20, 2020

It looks like the schema you're running coverage on contains some really long lines.
Those lines mist contain lots of special characters (from XML/HTML point of view) and so they get converted and after that conversion, the line doesn't fit into 32757 chars anymore.

It will be quite difficult to fix without a good example on where it fails.
It could be as simple as a single/double quote for 4000 chars:
https://www.advancedinstaller.com/user-guide/xml-escaped-chars.html

In that case, we will not be able to display such line too I think.

declare
 v varchar2(32767) := lpad('x',4000,'''');
begin
  v := dbms_xmlgen.convert(v);
  dbms_output.PUT_LINE(length(v));
end;

See the code above fails as the result of conversion of variable v gives more than 32767 chars.

@jgebal
Copy link
Member

jgebal commented Jul 20, 2020

We could probably trim the source code when it is too long, that's the one option that I see a possible.

@hehawe
Copy link
Author

hehawe commented Jul 20, 2020

What version of database are you using?

I’m using v3.1.10.3349

@hehawe
Copy link
Author

hehawe commented Jul 20, 2020

Hi,
I think that the trim is good idea as, honestly, I cannot imagine why and where such a long string might be ... But if it is the whole path to a file, yes, I can imagine, there could be some. And if so, the crucial information (the filename at the end of a path) would disappear. So if trim, maybe, trim from beginning of the string.
However, there’s LOB mentioned in the error message, so it is another approach to consider.
Many thanks

PS: Now I’m on my vacation and I will be able to retest any fix not earlier than on Aug-12

@jgebal
Copy link
Member

jgebal commented Oct 26, 2022

This got probably fixed in #1240
@hehawe - can you see if it works on latest develop version of utPLSQL?
If you still see this issue when using utPSLQL 3.1.13 or above, please reopen this issue.

@jgebal jgebal closed this as completed Oct 26, 2022
@jgebal jgebal added this to the 3.1.13 milestone Oct 26, 2022
@jgebal jgebal self-assigned this Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants