Driver Definition/pre-loading JDBC drivers [message #597639] |
Wed, 14 July 2010 13:23 |
d. hartford Messages: 27 Registered: July 2010 |
Junior Member |
|
|
Hey all,
Carry over from this post: https://community.jboss.org/message/552408
Getting into some DTP specific talk, so taking it to this list! :)
My intent is to find a way to have 'portable' jdbc driver support in the Eclipse Preferences->DataManagement->Connectivity->Driver Definition section (i.e. not require file-system setup of the jdbc jars). These are for the mysql, ms-sql (whether jtds or sqljdbc.jar, depending on project), postgres, etc.
Fitz has helped out greatly to-date in the approach of using an eclipse plugin approach to provide the default jdbc jar and override the template to point to the plugin/jdbc jar location. Now at the point where getting the following errors:
for plugin name "com.mycompany.eclipse.jdbc.mysql", exporting as jar plugin to eclipse/plugins location, and using Driver Definition it says in the jarlist " [com.mycompany.eclipse.jdbc.mysql]/lib/mysql-connector-java- 5.1.6.jar "
ERROR: "File com.mycompany.eclipse.jdbc.mysql/lib/mysql-connector-java-5. 1.6.jar missing while setting up default driver definitions"
I've tried making this both as an eclipse plugin, and an OSGI:Equinox plugin, but behaving the same.
MANIFEST.MF (abbreviated)
==============================
Bundle-SymbolicName: com.mycompany.eclipse.jdbc.mysql;singleton:=true
Bundle-Version: 5.1.6
Bundle-Vendor: mycompany
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.eclipse.ui.ide,
org.eclipse.core.resources
Bundle-ClassPath: lib/mysql-connector-java-5.1.6.jar,
.
===============================
plugin.xml
===========================
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="org.eclipse.datatools.connectivity.driverExtension">
<driverTemplateOverride
createDefault="true"
jarList=" [com.mycompany.eclipse.jdbc.mysql]/lib/mysql-connector-java- 5.1.6.jar "
priority="1"
targetId="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate ">
</driverTemplateOverride>
</extension>
</plugin>
===========================
build.properties
===========================
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
lib/mysql-connector-java-5.1.6.jar
===========================
Thanks, it feels sooo close!
((note: there are no extra spaces in the actual implementation, even though it may display as such)).
|
|
|
Re: Driver Definition/pre-loading JDBC drivers [message #597656 is a reply to message #597639] |
Wed, 14 July 2010 15:22 |
Brian Fitzpatrick Messages: 500 Registered: July 2009 |
Senior Member |
|
|
Did you try flipping the slashes the other way? I hate to say it, but
that code may be slash stupid. :(
I'm on Linux, so I can't try it right now.
--Fitz
dhartford wrote:
> Hey all,
> Carry over from this post: https://community.jboss.org/message/552408
>
> Getting into some DTP specific talk, so taking it to this list! :)
>
>
> My intent is to find a way to have 'portable' jdbc driver support in the
> Eclipse Preferences->DataManagement->Connectivity->Driver Definition
> section (i.e. not require file-system setup of the jdbc jars). These
> are for the mysql, ms-sql (whether jtds or sqljdbc.jar, depending on
> project), postgres, etc.
>
> Fitz has helped out greatly to-date in the approach of using an eclipse
> plugin approach to provide the default jdbc jar and override the
> template to point to the plugin/jdbc jar location. Now at the point
> where getting the following errors:
>
> for plugin name "com.mycompany.eclipse.jdbc.mysql", exporting as jar
> plugin to eclipse/plugins location, and using Driver Definition it says
> in the jarlist "
> [com.mycompany.eclipse.jdbc.mysql]/lib/mysql-connector-java- 5.1.6.jar "
>
> ERROR: "File
> com.mycompany.eclipse.jdbc.mysql/lib/mysql-connector-java-5. 1.6.jar
> missing while setting up default driver definitions"
>
> I've tried making this both as an eclipse plugin, and an OSGI:Equinox
> plugin, but behaving the same.
>
>
> MANIFEST.MF (abbreviated)
> ==============================
> Bundle-SymbolicName: com.mycompany.eclipse.jdbc.mysql;singleton:=true
> Bundle-Version: 5.1.6
> Bundle-Vendor: mycompany
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Import-Package: org.osgi.framework;version="1.3.0"
> Require-Bundle: org.eclipse.ui.ide,
> org.eclipse.core.resources
> Bundle-ClassPath: lib/mysql-connector-java-5.1.6.jar,
> .
> ===============================
>
>
> plugin.xml
> ===========================
> <?xml version="1.0" encoding="UTF-8"?>
> <?eclipse version="3.4"?>
> <plugin>
> <extension
> point="org.eclipse.datatools.connectivity.driverExtension">
> <driverTemplateOverride
> createDefault="true"
> jarList="
> [com.mycompany.eclipse.jdbc.mysql]/lib/mysql-connector-java- 5.1.6.jar "
> priority="1"
>
> targetId="org.eclipse.datatools.enablement.mysql.5_1.driverTemplate ">
> </driverTemplateOverride>
> </extension>
> </plugin>
> ===========================
>
> build.properties
> ===========================
> source.. = src/
> output.. = bin/
> bin.includes = META-INF/,\
> .,\
> plugin.xml,\
> lib/mysql-connector-java-5.1.6.jar
> ===========================
>
>
> Thanks, it feels sooo close!
>
> ((note: there are no extra spaces in the actual implementation, even
> though it may display as such)).
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03090 seconds