Bug 189051 - DB Outpus always shows "Line 1, column 1" as error location
DB Outpus always shows "Line 1, column 1" as error location
Product: db
Classification: Unclassified
Component: SQL Editor
All All
: P2 (vote)
: 8.2
Assigned To: matthias42
: 68585 155170 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2010-07-29 13:41 UTC by kRk
Modified: 2016-01-19 02:27 UTC (History)
3 users (show)

See Also:

NB Screenshot (41.82 KB, image/jpeg)
2010-07-29 13:47 UTC, kRk
pgAdmin screenshot (29.75 KB, image/jpeg)
2010-07-29 13:51 UTC, kRk

Note You need to log in before you can comment on or make changes to this bug.
Description kRk 2010-07-29 13:41:38 UTC
After runing wrong SQL Query, output always shows "Line 1, column 1" as error location. 
Therefore debugging is difficult.

DB: PostgresSQL 8.4.2 (org.postgresql.Driver)
Product Version = NetBeans IDE 6.9 (Build 201006101454)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01
Comment 1 kRk 2010-07-29 13:47:20 UTC
Created attachment 101081 [details]
NB Screenshot
Comment 2 kRk 2010-07-29 13:51:12 UTC
Created attachment 101082 [details]
pgAdmin screenshot

For comparison: error message in pgAdmin of the same query.
It would be nice if the NB shows error information in similar way.
Comment 3 kRk 2012-02-15 12:48:12 UTC
Any updates here?
Comment 4 matthias42 2012-02-16 20:23:01 UTC
I had a quick look at the problem. The information you need is only available in a database specific way and not accessible when only using standard jdbc.

To be more specific you'd have to extract the org.postgresql.util.ServerErrorMessage from the Exception and grab the Location via getPosition().

Without a hard dependency on the driver you could only use reflection to access the parameters. A good idea who to implement this is needed.
Comment 5 matthias42 2012-07-12 19:34:45 UTC
*** Bug 68585 has been marked as a duplicate of this bug. ***
Comment 6 matthias42 2013-05-13 19:53:44 UTC
*** Bug 155170 has been marked as a duplicate of this bug. ***
Comment 7 matthias42 2016-01-17 16:52:12 UTC
The implementation of this feature was fixed as:


the fix implements position extraction for the DBs PostgresSQL, Informix, Derby and H2. MySQL, MSSQL and Oracle were checked but did not provide enought information.

In the next few days a nightly build will be produced that contains the fix. By then a message will be posted here. Please check that nightly and if you find this fixed, please change status of this issue to VERIFIED. If not please specify what did not work.
Comment 8 Quality Engineering 2016-01-19 02:27:03 UTC
Integrated into 'main-silver', will be available in build *201601190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ef124a30ae2b
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #189051: Extract error location from server reply on sql execution

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