Wiki source code of JDBC and Entity Modeler

Version 25.1 by franc on 2012/05/26 11:29

Hide last authors
Lachlan Scott 21.1 1 ====  Problem: You encounter the 'JDBC connection failed for driver ...' error message when trying to generate SQL in Entity Modeler.   ====
franc 9.1 2
Lachlan Scott 21.1 3 [[image:JDBC connection failed.jpg||]]
franc 9.1 4
Lachlan Scott 21.1 5 ==== **Discussion** ====
franc 9.1 6
bardi 23.1 7 Either the JDBC driver genuinely cannot be found, or more likely perhaps, your JDBC settings in Entity Modeler are incorrect.
franc 9.1 8
bardi 23.1 9 On Mac OS X, the /Library/Java/Extensions directory is provided for extensions to the core Java API, and is thus the appropriate place for JDBC drivers.
franc 9.1 10
bardi 23.1 11 Put your JDBC drivers into the /Library/Java/Extensions then, and they should be picked up automatically by Eclipse.
franc 9.1 12
bardi 23.1 13 ==== **Solution - check that your JDBC driver is in your CLASSPATH:** ====
Lachlan Scott 21.1 14
15 Check your classpath settings in Eclipse as follows:
bardi 23.1 16 [[image:Checking_CLASSPATH.jpg||]]
Lachlan Scott 21.1 17
18 * Right-click the project in Package Explorer
19 * Select Java Build Path from the left hand list, and Libraries from the tabs in the main field
bardi 23.1 20 * Open the JRE System Library list, and you should see your available JDBC driver (see screenshot)
franc 25.1 21 * If you cannot see your driver listed, you must add it. WOL:instructions required
Lachlan Scott 21.1 22
23 ==== **Solution - check JDBC settings in Entity Modeler** ====
24
bardi 23.1 25 Check that the settings for your JDBC driver are correct; these details are provided by the suppliers. MySQL settings are shown in the screenshot (see screenshot). Note that drivers have peculiar use of capitalization, and that //this must be correct// for the driver to function
franc 9.1 26
Lachlan Scott 21.1 27 [[image:JDBC_correct_settings_mysql.jpg||]]
28  
29
30 ==== List of JDBC driver settings  ====
31
bardi 23.1 32 **Derby JDBC driver settings:**
33 Embedded Derby, how is it done?
34 How do you set property derby.system.home so Entity Modeler can be used?
35
franc 9.1 36 **MySQL JDBC driver settings:**
37
Lachlan Scott 11.1 38 URL: jdbc:mysql:~/~/<hostname>/<database//name>. eg. jdbc:mysql:~/~/localhost/authors
39 Driver: com.mysql.jdbc.Driver//
franc 9.1 40
41 **OpenBase JDBC driver settings:**
42
Lachlan Scott 11.1 43 URL: jdbc:openbase:~/~/<hostname>/<database//name>. eg. jdbc:openbase:~/~/localhost/authors
bardi 23.1 44 Driver: com.openbase.jdbc.ObDriver//
45
46 **FrontBase JDBC driver settings:**
47
48 URL: jdbc:FrontBase:~/~/<hostname>/<database//name>. eg. jdbc:FrontBase:~/~/localhost/authors
49 Driver:
Lachlan Scott 21.1 50 \\//
bardi 23.1 51
52 **Postgresql JDBC driver settings:**
53 URL: jdbc:postgresql:~/~/<hostname>/<databasename> eg. jdbc:postgresql:~/~/localhost/authors
54 Driver: org.postgresql.Driver
55 Plugin: Postgresql
franc 25.1 56
57 **H2 JDBC driver settings:**
58 URL: jdbc:h2:,,/<databasename>,,