Bug 152885 - IndexOutOfBoundsException: Invalid line index=57 >= lineCount=55
IndexOutOfBoundsException: Invalid line index=57 >= lineCount=55
Status: RESOLVED DUPLICATE of bug 171865
Product: db
Classification: Unclassified
Component: Code
6.x
All All
: P3 with 1 vote (vote)
: 6.x
Assigned To: Jiri Skrivanek
issues@db
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-10 16:07 UTC by Victoria Zhukovskaya
Modified: 2009-09-15 10:36 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (3.02 KB, text/plain)
2008-11-10 16:07 UTC, Victoria Zhukovskaya
Details
SQL file that produces issue (26.50 KB, text/plain)
2009-03-13 19:25 UTC, soliver
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victoria Zhukovskaya 2008-11-10 16:07:16 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06, Java(TM) SE Runtime Environment, 1.6.0_02-b06
OS: Windows XP, 5.1, x86

User Comments:
aldobrucale: click in a link in an sql output tab

aldobrucale: following a link in db output



Stacktrace: 
java.lang.IndexOutOfBoundsException: Invalid line index=57 >= lineCount=55
        at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:112)
        at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:669)
        at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1362)
        at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:644)
        at org.openide.text.NbDocument.findLineOffset(NbDocument.java:176)
        at org.openide.text.DocumentLine$Set.offset(DocumentLine.java:1026)
Comment 1 Victoria Zhukovskaya 2008-11-10 16:07:29 UTC
Created attachment 73584 [details]
stacktrace
Comment 2 David Vancouvering 2008-11-10 19:47:18 UTC
I think what's happening here is you are executing SQL with an error in it that refers to a line number, but the line
number is wrong, so the hyperlink fails.

The line number comes from the database server, so if the server is sending us the wrong line number, there's not much
we can do here.

It would be great if you could tell us what database vendor you are using, and what version of their driver you are using.

If you can provide an example of a SQL statement that doesn't work, that would be awesome.

Anyway, even though we can't prevent the exception, what we can do is see if there is a way to report the error that
isn't just an exception report.
Comment 3 David Vancouvering 2008-11-10 19:54:00 UTC
Hm, I think I need to retract what I said before.  For example, if I execute this:

select a.actor_id,
 a.first_name,
 a.last_name,
 a.last_update,
from actor a

I get this:

Error code 1064, SQL state 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'from actor a LIMIT 20 OFFSET 0' at line 5
Line 1, column 1

Execution finished after 0 s, 1 error(s) occurred.

Notice that the server says "line 5" but the hyperlink says "Line 1, column 1".  So it does sound like *we're* the ones
generating the line number, and we're doing it wrong for some reason.

victoriaz: can you please provide the SQL that caused the error?  That would be really helpful.

I have tried various ways to get a bad line number but don't seem to have the right magic key to make it happen...
Comment 4 Jiri Rechtacek 2009-02-10 15:21:07 UTC
Reassigned to new owner.
Comment 5 soliver 2009-03-13 19:23:20 UTC
I just received this error, so here is some more info:
Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.5.0_16; Java HotSpot(TM) Client VM 1.5.0_16-133
System: Mac OS X version 10.5.6 running on i386; MacRoman; en_US (nb)
Userdir: /Users/stevenoliver/.netbeans/6.5

I was using a MySQL database:
Server version: 6.0.9-alpha MySQL Community Server (GPL)
Comment 6 soliver 2009-03-13 19:25:18 UTC
Created attachment 78164 [details]
SQL file that produces issue
Comment 7 soliver 2009-03-13 19:40:06 UTC
Sorry, one more thing I forgot,

Database Connection Driver:
com.mysql.jdbc.Driver
Comment 8 Jiri Rechtacek 2009-07-01 07:43:55 UTC
NB6.7 was released already - http://www.netbeans.org/community/releases/67/
Postpone fixing this issue on the next release.
Comment 9 Jiri Skrivanek 2009-09-15 10:36:21 UTC
Caused by improper handling of line comments.

*** This issue has been marked as a duplicate of 171865 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo