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 15403 - PointBase:Table Deletion referenced by FK contraints throws Unexpected Exception
Summary: PointBase:Table Deletion referenced by FK contraints throws Unexpected Exception
Status: VERIFIED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Other
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-09-12 15:17 UTC by issues@www
Modified: 2006-06-05 11:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description issues@www 2001-09-12 15:17:20 UTC
Description: 
IDE Build RC1 (010803) EE on Solaris 8

load the attached schema into PointBase database and try deleting table 
EMPLOYEE from DBExplorer 
i.e, From FFJ Explorer : Runtime Tab : Databases : PB Db connection  : Tables: 
EMPLOYEE - Right Click & Choose Delete.

User would get the following exception : 
Tue Aug 07 10:53:26 PDT 2001: java.io.IOException: Unable to execute a command:
drop table PUBLIC.EMPLOYEEJ1
Dependent privilege descriptors still exists on SQL object EMPLOYEEJ1.
java.io.IOException: Unable to execute a command:
drop table PUBLIC.EMPLOYEEJ1
Dependent privilege descriptors still exists on SQL object EMPLOYEEJ1.
        at org.netbeans.modules.db.explorer.infos.TableNodeInfo.delete
(TableNodeInfo.java:259)
        at org.netbeans.modules.db.explorer.nodes.DatabaseNode.destroy
(DatabaseNode.java:155)
        at org.openide.explorer.ExplorerActions$1.run(ExplorerActions.java:460)
        at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:69)
        at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:366)
        at 
org.openide.explorer.ExplorerActions$DeleteActionPerformer.performAction
(ExplorerActions.java:456)
        at org.openide.util.actions.CallbackSystemAction.performAction
(CallbackSystemAction.java:78)
        at org.openide.util.actions.CallableSystemAction.actionPerformed
(CallableSystemAction.java:66)
        at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:76)
        at org.openide.util.Task.run(Task.java:124)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:626)


Evaluation: 
The exception in delete method is not handled it is propagated out only.
It should be threat there (by standard Error Message).

A comment.
Comment 1 Jiri Rechtacek 2001-12-03 17:28:14 UTC
Reassigning to Pavel, enjoy it :-)

Comment 2 Pavel Flaska 2002-03-07 13:29:15 UTC
Cannot reproduce in current build. It is possible to execute drop
table command on table which is referenced from another table. The
foreign key in second table is dropped also.

See example:

create table table1 (
   id1 integer not null,
   col1 integer not null,
   constraint pk_table1 primary key(id1)
);

create table table2 (
   id2 integer not null,
   col2 integer not null,
   constraint pk_table2 primary key(id2),
   constraint fk_table2_table1 foreign key(id2) references table1
);

It is possible to drop referenced table either by command "drop table
table1" or by table popup action "Delete". It works without exception.

It is probably related to a new version of PointBase server. I cannot
reproduce it. You didn't attach script. If you will see problem again,
feel free to reopen this bug.
Comment 3 Martin Schovanek 2003-03-12 13:01:59 UTC
VERIFIED