JDBC and Entity Modeler

Version 18.1 by Lachlan Scott on 2007/07/10 20:12

Problem: You encounter the 'JDBC connection failed for driver ...' error message when trying to generate SQL in Entity Modeler.  

JDBC connection failed.jpg

Discussion

either the JDBC driver genuinely cannot be found, or more likely perhaps, your JDBC settings in Entity Modeler are incorrect.

Solution: Check that the JDBC driver is in your CLASSPATH:

On the Mac, if JDBC drivers are added to /Library/Java/Extensions they should be picked up automatically by Eclipse. Check your classpath settings in Eclipse as follows: Checking_CLASSPATH.jpg

  • Right-click the project in Package Explorer
  • Select Java Build Path from the left hand list, and Libraries from the tabs in the main field
  • Open the JRE System Library list, and you should see your available JDBC driver see screenshot
  • If you cannot see your driver listed, you must add it. instructions required

Check JDBC settings in Entity Modeler

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. JDBC_correct_settings_mysql.jpg
 

List of JDBC settings 

MySQL JDBC driver settings:

URL: jdbc:mysql://<hostname>/<databasename>. eg. jdbc:mysql://localhost/authors
Driver: com.mysql.jdbc.Driver

OpenBase JDBC driver settings:

URL: jdbc:openbase://<hostname>/<databasename>. eg. jdbc:openbase://localhost/authors
Driver: com.openbase.jdbc.ObDriver