-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Db2 JDBC driver should be included from Maven repository #455
Comments
I think you also have to add the file to the bin.includes section in the
build.properties file. Alternatively you can open the MANIFEST.MF file
in the Manifest Editor, under the Runtime Tab add your file to the
"Classpath" section.
You may have to "update the classpath settings" for the project
afterwards. I'm not sure.
Emily
…On 2021-05-24 10:44 a.m., David Adler wrote:
In the past, the Db2 JDBC driver was not publicly available and there
was special logic in the Db2 pom-libs.xml to create dummy driver files
that were copied into the deployment. At runtime, a dialog was displayed
for the user to specify the location of the real driver files which were
then copied into the deployment.
The Db2 JDBC driver is now available from Maven central but I haven't
been successful in getting the uDig 'mvn install -f pom-libs.xml' to
copy the driver files to the needed places.
In attempting to make this work, I did the following:
* removed from udig-platform-master/pom-libs.xml
plugins/org.locationtech.udig.libs.db2/pom-libs.xml
* added to
udig-platform-master/plugins/org.locationtech.udig.libs/pom-libs.xml
com.ibm.db2
jcc
11.5.5.0
* added to
udig-platform-master/plugins/org.locationtech.udig.libs/META-INF/MANIFEST.MF
in Bundle-ClassPath: section
lib/jcc-11.5.5.0.jar,
in Export-Package: section
com.ibm.db2,
It does populate jcc-11.5.5.0.jar to the local Maven repository but it
doesn't copy the driver as it does with, for example, postgresql-42.2.5.jar.
I have very little understanding of how the mvn pom files or MANIFEST.MF
files work.
Help would be appreciated.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#455>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAE367BUYGA4SMM6ULQRUUDTPKGATANCNFSM45NURPVA>.
|
Looks like your found the magic places ;)
However, its quite complicated from user-perspective and useablity . Therefore I can try to create a CQ Request at eclipse.org first to verify if its allowed to bundle db2 jdbc drivers. Maybe BIRT-Project created a similar request in the past, we will see Independent from this, just a question : Are the db2 jdbc-drivers compatible with oder versions of db-installations? Means if I use the newest drivers, can I still acces older db2 database installations? @dwadler please do not change the libs-download (these are common geospatial libraries), In terms of seperation of concerns, the db2 bundle has been created to allow to create GIS application with or without db2 capabilities. Please use the pom-libs.xml from libs bundle as a template (or even better a smaller one https://github.com/locationtech/udig-platform/blob/master/plugins/org.locationtech.udig.libs.jfreechart/pom-libs.xml) and adapt it in libs.db2 bundle. There is already a libs folder where the dummy-jars are copied to. Theser are bundled into libs.db2 because build.properties has libs folder in bin.includes configured already. Could you test uDig first with the existing aproach to configure libs at runtime? If changes are required (as it was fffde2f) we can fix it. |
After thinking about this, I think there are 3 options:
|
In the past, the Db2 JDBC driver was not publicly available and there was special logic in the Db2 pom-libs.xml to create dummy driver files that were copied into the deployment. At runtime, a dialog was displayed for the user to specify the location of the real driver files which were then copied into the deployment.
The Db2 JDBC driver is now available from Maven central but I haven't been successful in getting the uDig 'mvn install -f pom-libs.xml' to copy the driver files to the needed places.
In attempting to make this work, I did the following:
plugins/org.locationtech.udig.libs.db2/pom-libs.xml
in Bundle-ClassPath: section
lib/jcc-11.5.5.0.jar,
in Export-Package: section
com.ibm.db2,
It does populate jcc-11.5.5.0.jar to the local Maven repository but it doesn't copy the driver as it does with, for example, postgresql-42.2.5.jar.
I have very little understanding of how the mvn pom files or MANIFEST.MF files work.
Help would be appreciated.
The text was updated successfully, but these errors were encountered: