Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Developer 4.2 error line numbers mismatch

Alexander ZMay 24 2017 — edited May 26 2017

Hi Team,

I discovered the strange behavior of the latest version of the SQL Developer 4.2.0.17.089: line numbers in error messages sometimes mismatch with a real line numbers in source code.

For example worksheet:

pastedImage_11.png

Compile:

pastedImage_12.png

SQL Developer says "Error at line 2".

Check source of procedure:

SELECT LINE, TEXT FROM USER_SOURCE WHERE TYPE='PROCEDURE' AND NAME='TST';

pastedImage_13.png

In the source code, the error is in line 3.

Check user_errors:

SELECT ATTRIBUTE, MESSAGE_NUMBER, SEQUENCE, LINE, POSITION, TEXT

FROM USER_ERRORS

WHERE TYPE='PROCEDURE' AND NAME='TST'

ORDER BY SEQUENCE;

pastedImage_17.png

Real error line number is 3.

Insert some lines to worksheet:

pastedImage_21.png

Result:

pastedImage_22.png

Now SQL Developer says "Error at line 6".

SQLDeveloper 4.1.5.21 for this example always output correct line number: 3.

In fact, I compile many source files in the following way:

@c:\somepath\somefilename.pks

@c:\somepath\somefilename.pkb

and I get a similar problem but with even more unpredictable results..

Now I use this workaround: place at the top of each worksheet this lines:

EXECUTE DBMS_OUTPUT.ENABLE(1000000); -- 1-st line may be with any text

CREATE PROCEDURE $$$$$$$$$; /*-- SQL Developer 4.2 workaround*/

/

All lines below this compiles with correct line numbers in error report.

Thank You for your attention.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2017
Added on May 24 2017
9 comments
2,570 views