Wiki source code of JDBC and Entity Modeler

Version 22.1 by Lachlan Scott on 2007/07/10 20:15

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
Lachlan Scott 21.1 7 Either the JDBC driver genuinely cannot be found, or more likely perhaps, your JDBC settings in Entity Modeler are incorrect. On Mac OS X, if JDBC drivers are added to /Library/Java/Extensions they should be picked up automatically by Eclipse.
franc 9.1 8
Lachlan Scott 21.1 9 ==== **Solution - check that the JDBC driver is in your CLASSPATH:** ====
franc 9.1 10
11
Lachlan Scott 21.1 12 \\\\
13
14 Check your classpath settings in Eclipse as follows:
15 [[image:Checking_CLASSPATH.jpg||]]
16
17 * Right-click the project in Package Explorer
18 * Select Java Build Path from the left hand list, and Libraries from the tabs in the main field
19 * Open the JRE System Library list, and you should see your available JDBC driver see screenshot
20 * If you cannot see your driver listed, you must add it. instructions required
21
22 ==== **Solution - check JDBC settings in Entity Modeler** ====
23
Lachlan Scott 19.1 24 Check that the settings for your JDBC driver are correct. Details should be provided by the suppliers. MySQL settings are shown in the screenshot see screenshot. Note that drivers have peculiar use of upper and lower case and that these must be correct for the driver to function.
franc 9.1 25
Lachlan Scott 21.1 26 [[image:JDBC_correct_settings_mysql.jpg||]]
27  
28
29 ==== List of JDBC driver settings  ====
30
franc 9.1 31 **MySQL JDBC driver settings:**
32
Lachlan Scott 11.1 33 URL: jdbc:mysql:~/~/<hostname>/<database//name>. eg. jdbc:mysql:~/~/localhost/authors
34 Driver: com.mysql.jdbc.Driver//
franc 9.1 35
36 **OpenBase JDBC driver settings:**
37
Lachlan Scott 11.1 38 URL: jdbc:openbase:~/~/<hostname>/<database//name>. eg. jdbc:openbase:~/~/localhost/authors
Lachlan Scott 17.1 39 Driver: com.openbase.jdbc.ObDriver
Lachlan Scott 21.1 40 \\//