Thursday Jun 12, 2008

How to Connect Glassfish Derby from Eclipse IDE

Below is the steps to connect Glassfish V2 "sun-appserv-samples" Derby database from Eclipse JEE 3.3 version: (Please, use Eclipse IDE for Java EE Developer version and the instruction from this document to have GF server setup)

From IDE Window menu,  select Open Perspective > Other > choose Database Development


On the Database Development panel (figure below), righ-click Databases > select New from the menu
to create a New Connection Profile and choose 'Generic JDBC Conenction' from the list.


Click Next to enter a name for the
connection profile, name it as 'TestDerbyPool' > click Next and click ...


From Driver Definition panel, select Derby > 10.2 > click Add to add a new driver


From the New Driver Definition panel, select Derby > 10.2 > Derby Client JDBC Driver > click OK

From Edit Driver Denifition panel, remove the default derbyclient.jar file > click Add Jar/Zip to add the derbyclient.jar file from Glassfish directory > edit the properties as described in the following figure:
        Connection URL:      jdbc:derby://localhost:1527/sample;create=true
        Database Name:       sun-appserv-samples
        Driver Class:             org.apache.derby.jdbc.ClientDriver
        Password:                APP
        User ID:                   APP



Click OK > OK button to go back to the New JDBC Connection Profile panel. Now you should have all the fields values configured


Start the Derby database and click  Test Connection button. You should receive the Success and tables dialogs below:




For information to connect to Derby by using DTP please, click here

About

davisn

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today