Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] jdbc driver packaged as plugin

Seems to have issue on Mac; logged as bug; https://bugs.eclipse.org/bugs/show_bug.cgi?id=174113

Anthos
On 13/02/2007, at 3:39 AM, brian.fitzpatrick@xxxxxxxxxx wrote:


Hi guys!

The syntax is pretty easy...
for the jarList property, use the format "[plug-in ID]\mypath\myjar.jar"

So for example, if we have Sybase's jConnect 6.0 exposed via a plug-in with the id "com.sybase.jconnect60", it would be:

[com.sybase.jconnect60]\lib\jconn3.jar

This basically uses the root directory for the plug-in as the root of the jar path and then appends the extra path and file information to it.

--Fitz

Brian Fitzpatrick
Senior Software Engineer/DTP Committer
Sybase, Inc.



rcernich@xxxxxxxxxx
Sent by: dtp-dev-bounces@xxxxxxxxxxx

02/12/2007 09:30 AM

Please respond to
DTP development mailing list <dtp-dev@xxxxxxxxxxx>

To
DTP development mailing list <dtp-dev@xxxxxxxxxxx>
cc
Subject
Re: [dtp-dev] jdbc driver packaged as plugin





Hey Anthos,

>
> but when I try ping the db connection () it is resulting
>
> java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
>
> Any thoughts ?
>

This is because the driver definition creates a classloader using the
defined JAR files as the classpath (i.e. the plugin classloaders are not
used).

You have two options here:
1.  Do not use the driver framework.  Create a custom wizard for your DB.
Make sure you populate the fields required by the ConnectionInfo connection
factory (IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID and
DATABASE_VERSION_PROP_ID).  Create a custom connection factory for
java.sql.Connection.  You will have direct control over how the connection
is created and can make use of the plugin classloader.  (Note, this
approach will require that the driver is distributed with your plugin.)

2.  You can reference the classpath created by the driver definition when
creating your connection.  (Note, you can define the location of the jar
using a plugin relative location.  I'm not exactly sure what the syntax is
for that in your driver definition.)

Hope that helps.
Rob

_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev


_______________________________________________
dtp-dev mailing list


Back to the top