This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 173956 - com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zrus.tab116' doesn't exist
Summary: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zrus.tab116...
Status: RESOLVED DUPLICATE of bug 162530
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL: http://statistics.netbeans.org/except...
Keywords:
: 184492 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-07 11:43 UTC by Jiri Rechtacek
Modified: 2010-11-25 10:24 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 159692


Attachments
stacktrace (3.66 KB, text/plain)
2009-10-07 11:43 UTC, Jiri Rechtacek
Details
stacktrace (3.69 KB, text/plain)
2009-10-08 10:38 UTC, Michal Mocnak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2009-10-07 11:43:27 UTC
Build: NetBeans IDE Dev (Build 091006)
VM: Java HotSpot(TM) Client VM, 14.0-b12, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b03
OS: Linux, 2.6.28-15-generic, i386

User Comments:
jrechtacek: When deleting bunch of tables in MySQL connection.



Stacktrace: 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'zrus.tab116' doesn't exist
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
Comment 1 Jiri Rechtacek 2009-10-07 11:43:32 UTC
Created attachment 88989 [details]
stacktrace
Comment 2 Jiri Rechtacek 2009-10-07 12:43:41 UTC
Let's wait for more reports.
Comment 3 Michal Mocnak 2009-10-08 10:38:30 UTC
Build: NetBeans IDE Dev (Build 200910071536)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.1-b02-90, Java(TM) SE Runtime Environment, 1.6.0_15-b03-219
OS: Mac OS X, 10.6.1, x86_64

User Comments: 
Deleting tables from mysql connection

Stacktrace: 
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'render.user_property' doesn't exist
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
Comment 4 Michal Mocnak 2009-10-08 10:38:34 UTC
Created attachment 89081 [details]
stacktrace
Comment 5 Jiri Rechtacek 2010-11-02 18:28:03 UTC
*** Bug 184492 has been marked as a duplicate of this bug. ***
Comment 6 bht 2010-11-25 02:21:31 UTC
There are multiple nested duplicates.

If the chain of duplicates is correct, then the description may have to be changed to something like:

"In Database Explorer, two tables cannot be dropped at all if both have foreign key contraints referencing each other"

This is a very irritating showstopper because Database explorer does not provide a means to copy the names of foreign key constraints to the clipboard.

It might not be a big issue to drop constraints before dropping tables, and therefore, I change the priority to hopefully get this done in the next release.
Comment 7 bht 2010-11-25 02:29:03 UTC
Testcase:

This is relevant for one-to-one relationships.

Testcase:

CREATE TABLE TABLE_1 (ID INTEGER NOT NULL, TABLE_2_ID INTEGER NOT NULL, PRIMARY KEY (ID));
CREATE TABLE TABLE_2 (ID INTEGER NOT NULL, TABLE_1_ID INTEGER NOT NULL, PRIMARY KEY (ID));
ALTER TABLE TABLE_1 ADD CONSTRAINT FK_TABLE_1_TABLE_2_ID FOREIGN KEY (TABLE_2_ID) REFERENCES TABLE_2 (ID);
ALTER TABLE TABLE_2 ADD CONSTRAINT FK_TABLE_2_TABLE_1_ID FOREIGN KEY (TABLE_1_ID) REFERENCES TABLE_1 (ID);

When trying to drop the tables in Database Explorer by right click|delete, the error is:
Unable to execute command:
drop table "APP"."TABLE_2"
Operation 'DROP CONSTRAINT' cannot be performed on object 'SQL100704071938090' because CONSTRAINT
'FK_TABLE_1_TABLE_2_ID' is dependent on that object.

This looks like a bug because Database Explorer seems to try to drop constraints two times.

This worked as expected:

ALTER TABLE TABLE_1 DROP CONSTRAINT FK_TABLE_1_TABLE_2_ID;
ALTER TABLE TABLE_2 DROP CONSTRAINT FK_TABLE_2_TABLE_1_ID;
DROP TABLE TABLE_1;
DROP TABLE TABLE_2;
Comment 8 Jiri Rechtacek 2010-11-25 10:24:06 UTC
No too much duplicates, has been reported for 4 time since 6.7 release. More reports in the same issue 162530.
@bth - I guess your comments are irrelevant for this issue. I filed it again as issue 192457.

*** This bug has been marked as a duplicate of bug 162530 ***