Advertisement
Guest User

Untitled

a guest
Jul 6th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. Apache Derby Ui Plug-in
  2. Error adding Derby jars to the project:
  3. org.eclipse.ui.internal.WorkbenchWindow cannot be cast to
  4. org.eclipse.jface.window.ApplicationWindow
  5.  
  6. Commenting out these method calls from:
  7. AddDerbyNature.java
  8. //((ApplicationWindow) window).setStatus(Messages.ADDING_NATURE);
  9. //((ApplicationWindow) window).setStatus(Messages.DERBY_NATURE_ADDED);
  10.  
  11. RemoveDerbyNature.java
  12. //((ApplicationWindow)window).setStatus(Messages.REMOVING_NATURE);
  13. //((ApplicationWindow)window).setStatus(Messages.DERBY_NATURE_REMOVED);
  14.  
  15. connect 'jdbc:derby://localhost:1527/TESTDB;create=true;user=test;password=test;';
  16. -- drop User Indexes - ignore error if first time creating
  17. drop index UserNameIdx1;
  18. -- drop the table if it exists - ignore error if first time creating
  19. drop table TEST_USER;
  20. -- create the table
  21. create 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.
  35. insert 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
  37. create unique index UserNameIdx1 on TEST_USER(USER_NAME);
  38. -- reset the generator
  39. alter table TEST_USER alter column ID restart with 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement