Community
Participate
Working Groups
The Driver Definitions in the DTP Connectivity preferences (Preferences -> Data Management -> Connectivity -> Driver Definitions) are not saved when the preferences are saved (File -> Export... -> General -> Preferences). Steps to reproduce: (Note: this is most clear if you start with a new runtime workspace) 1. Open the Preferences window and navigate to the Driver Definitions page (Preferences -> Data Management -> Connectivity -> Driver Definitions) 2. Click the Add... button and add a driver definition, for example Derby Embedded JDBC Driver. 3. Click OK in the New Driver Definition window and OK in the Preferences window to save the new driver definition preference. 4. Back in the main window, do File -> Export... -> General -> Preferences, click Next. Enter or select and export file name and click Finish. 5. Close Eclipse. 6. Launch Eclipse with a new runtime workspace. 7. Do File -> Import... General -> Preferences and import the .epf file you exported previously. 8. Open the Database Definitions preference page and verify that the database definition was not imported.
Created attachment 183512 [details] Patch for plugin o.e.d.connectvity
Hi Fitz, can you take a look at this patch?
I'm leery of doing this kind of change in 1.8.2 to be honest. This isn't as straightforward a patch as it might be. And anything that has the potential to affect the driver and connection profiles stored in the preferences could have some less than desirable consequences. I'm not saying that's the case - but I'd want the chance to test the heck out of this stuff before we deliver it. For 1.9, I'm fine with it.
I'm going to go ahead and commit this change. (As per Fitz's comment, this was originally going to go into DTP 1.9.) Here's the Git commit record: http://git.eclipse.org/c/datatools/org.eclipse.datatools.connectivity.git/commit/?id=df556a7e086f5f489ed823b752fc1ebf6153a6f5
(In reply to comment #4) The changes committed for DTP 1.10 RC1 relies on the internal platform of Eclipse OSGi, which will cause NPE when running the DTP connectivity component on an OSGi-less platform. It also triggers a re-read of the driverStorage.xml file whenever getting a driver instance from the DriverManager, which is rather inefficient.
Created attachment 216081 [details] Patch Fix for OSGi-less platform Attached is a Git patch for review. It fixes the bug impl. to work on OSGi-less platform. Also in order to reduce run-time performance impact, comment out calls that re-read the driverStorage.xml file each time when simply getting a driver instance from the cached map.
Created attachment 216084 [details] Correct Patch for OSGi-less platform fix
Created attachment 216086 [details] Additional Patch for existing preference store with no driver values This additional patch fixes the problem of wiping out the content of an existing driverStorage.xml file. This occurred when run in a workspace whose Preference store does not contain any DRIVER_VALUES entry.
Pushed my 2 patches to the Git repo, to allow more time for testing before RC2. Git commit logs: * fix for OSGi-less platform: http://git.eclipse.org/c/datatools/org.eclipse.datatools.connectivity.git/commit/?id=e56c2a6e71413e82a719bede0a7e38f2d28b5d43 * fix for wiping out content of driverStorage.xml file: http://git.eclipse.org/c/datatools/org.eclipse.datatools.connectivity.git/commit/?id=bb5753f9a7194335e3abc5568f99f878d5797f11
This fix just isn't ready for prime time. (See bug 382153) I'm going to disable it.