tisdag, september 04, 2007

A Small Comment on MySQL in JDeveloper 11 (Preview Release)

Today I've been doing some tests using MySQL together with the JDeveloper 11 Preview Release. This worked fine, most of the info is covered in the Help chapter, "Working with Non-Oracle Database". However, I missed out one small piece; how to get it to work together with the Embedded OC4J, or rather, where to put the MySQL JDBC JAR file? This as I got an

"Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver"

when trying to run my application.

As of JDeveloper 11, a new default directory structure for user-specific content in JDeveloper for Windows is used. The default location for the system subdirectory is now %APPDATA%\JDeveloper\systemXX.XX.XX.XX, where:

  • %APPDATA% is the Windows Application Data directory for the user (usually C:\Documents and Settings\<username>\Application Data)
  • XX.XX.XX.XX is a unique number of the product build, for example, system11.1.1.0.17.45.02

So, in my case, the MySQL JDBC JAR file (mysql-connector-java-3.1.12-bin.jar) should go into the directory:

C:\Documents and Settings\
<username>\Application Data\JDeveloper\system11.1.1.0.17.45.24\o.j2ee\embedded-oc4j\applib

Once I put it there, and restarted the embedded OC4J, it worked fine.

Inga kommentarer:

Skicka en kommentar