· 10 years ago · Jul 06, 2016, 01:45 PM
1Apache Derby Ui Plug-in
2Error adding Derby jars to the project:
3org.eclipse.ui.internal.WorkbenchWindow cannot be cast to
4org.eclipse.jface.window.ApplicationWindow
5
6Commenting out these method calls from:
7AddDerbyNature.java
8//((ApplicationWindow) window).setStatus(Messages.ADDING_NATURE);
9//((ApplicationWindow) window).setStatus(Messages.DERBY_NATURE_ADDED);
10
11RemoveDerbyNature.java
12//((ApplicationWindow)window).setStatus(Messages.REMOVING_NATURE);
13//((ApplicationWindow)window).setStatus(Messages.DERBY_NATURE_REMOVED);
14
15connect 'jdbc:derby://localhost:1527/TESTDB;create=true;user=test;password=test;';
16-- drop User Indexes - ignore error if first time creating
17drop index UserNameIdx1;
18-- drop the table if it exists - ignore error if first time creating
19drop table TEST_USER;
20-- create the table
21create table TEST_USER (
22 ID integer generated by default as identity,
23 USER_NAME varchar(255) not null,
24 FIRST_NAME varchar(255),
25 LAST_NAME varchar(255),
26 PASSWORD varchar(255),
27 ENABLED integer,
28 CREATED_STAMP timestamp,
29 CREATED_TX_STAMP timestamp,
30 LAST_UPDATED_STAMP timestamp,
31 LAST_UPDATED_TX_STAMP timestamp,
32 constraint TEST_USER_PK primary key (ID)
33);
34-- insert some data -- oops --- will mess with the ID generator, see the alter table restart line below.
35insert into TEST_USER values(0, 'admin','admin','admin','admin',1,'2013-01-18 12:00:00.000','2013-01-18 12:00:00.000','2013-01-18 12:00:00.000','2013-01-18 12:00:00.000');
36-- make the USER_NAME unique
37create unique index UserNameIdx1 on TEST_USER(USER_NAME);
38-- reset the generator
39alter table TEST_USER alter column ID restart with 1;