From an user report:
Either attempting to "open" a table or right-clicking on the table causes:
"Unable to read the database structure, connection is broken; ORA-01031 error:
insufficient privileges)". This issue is not present on NetBeans 4.1.
I loaded today's [20051010 daily build] development release. When I attempt to
open a table I get the error described in the prior e-mail. The error is being
caused by the call:
ANALYZE TABLE <blah> ESTIMATE STATISTICS
On 4.1 we instead see:
SELECT NULL AS table_cat, t.owner AS table_schem,
t.table_name AS table_name, t.column_name AS column_name,
'LONG RAW', -4,
) AS data_type,
t.data_type AS type_name,
) AS column_size,
0 AS buffer_length, t.data_scale AS decimal_digits,
10 AS num_prec_radix, DECODE (t.nullable, 'N', 0, 1) AS nullable,
NULL AS remarks, t.data_default AS column_def, 0 AS sql_data_type,
0 AS sql_datetime_sub, t.data_length AS char_octet_length,
t.column_id AS ordinal_position,
DECODE (t.nullable, 'N', 'NO', 'YES') AS is_nullable
FROM all_tab_columns t
WHERE t.owner LIKE :1 ESCAPE '/'
AND t.table_name LIKE :2 ESCAPE '/'
AND t.column_name LIKE :3 ESCAPE '/'
ORDER BY table_schem, table_name, ordinal_position
And this works with no problems.
The "problem" is caused by the fix of issue 55410. SQLException-s thrown while
retrieving the database metadata are thrown instead of being silently logged.
In this particular case the exception is caused by a
DatabaseMetaData.getIndexInfo() call on the Oracle driver. The driver tries to
analyze the table for retrieving the index info, and the user probably doesn't
have enough rights for this operation.
Both I and QE consider that notifying exceptions is a better behavior. Hiding
them and pretending everything went right could result in displaying incomplete
metadata without giving a clue that they are incomplete.
I get the same error against an IBM iSeries ("AS/400"), error message ends
with "[SQL0901] SQL system error".
So THIS is whats going on! I've seen this on occasion... always seems to work
the second time around. Gets my vote!
(And why was it closed?? Thats not clear in the description)
To gholmer and clever: sorry, but I need more details, such as the database
server and driver, as well as what exactly you were doing at the time the error
occured. Marking as incomplete for now.
I have never seen this issue on our testing databases, and the reason why some
people get the error on 5.0, although they did not get it on 4.1 is that now the
exceptions are reported instead of being silently logged to the message log. The
issue is closed because the error in the issue's description is not caused by
NetBeans, but by the database settings or buggy driver.
I will attach a program which makes the same calls that Database Explorer makes
and I will ask you to test it against your databases and see if you get the same
TM 5.0 -> TBD
Steps to reproduce:
1) In Runtime tab, expand Databases node. Right-click "Drivers" and select
"Add Driver". Select jt400.jar (JTOpen 5.0 version,
http://jt400.sourceforge.net/). Driver class
(com.ibm.as400.access.AS400JDBCDriver) is detected correctly. Give connection
the name "IBM AS/400 Toolbox for Java".
2) Right-click "IBM AS/400 Toolbox for Java" and select "Connect Using...".
For Database URL, enter "jdbc:as400://<machine name>". Enter a valid user ID
and password on the AS/400. A list of schemas (AS/400 "libraries") is
returned. Select any one.
3) Expand the connection icon, then the "Tables" icon. A dialog is opened with
the text "Unable to read the database structure, connection is broken;
[SQL0901] SQL system error." The turner on the "Tables" tree node disappears
when the dialog is dismissed.
Where is the attachment mentioned above?
There was no time to fix this for 5.5. Hopefully for 6.0.
Problem with AS/400 was not related to NetBeans, see this URL:
gholmer, abadea: I can't tell: is this still an issue? gholmer says the IBM issue was not related to NetBeans, and
that's the only real instructions on how to reproduce I have... Thanks.
No longer an issue here.
If this is not a problem on AS/400 anymore, it is likely a duplicate of issue 111055.
*** This issue has been marked as a duplicate of 111055 ***