Community
Participate
Working Groups
The DTP SQL Results view fails to initialize and open on Eclipse 3.7 when there are any previous results in the result history. This is due to a runtime mismatch on the Lucene analysis service that the SQL Results view uses. Apparently components compiled with the version of Lucene included in Eclipse 3.6 do not work with the version of Lucene shipped with Eclipse 3.7. (I guess that's why the major version of the Lucene plugin changed :-(
*** This bug has been marked as a duplicate of bug 330571 ***
The problem in bug 330571 went away after the reporter reinstalled DTP, so this bug must not be a duplicate of that one after all.
I am removing the "Require-Bundle" entry for bundle org.apache.lucene.analysis from the MANIFEST.MF file of the DTP plugin org.eclipse.datatools.result.ui for both DTP 1.8.2 and 1.9. This bundle is not used. The Lucene "analysis" classes that the SQL Results view uses are actually located in the base Lucene plugin. Note: this does not solve the runtime problem on Eclipse 3.7 with Lucene. This just removes one roadblock for running DTP on Eclipse 3.7.
Checked in MANIFEST.MF change, tagged to v201101140400 (v1.8.2) and v201101140415 (v1.9)
I consulted the Eclipse cross-project-issues-dev mailing list, and the recommended solution for this problem is to use Import-Package rather than Require-Bundle. Then the classes will resolve no matter what bundle they are in. I will modify the MANIFEST.MF file in plugin org.eclipse.datatools.sqltools.result to replace the Require-Bundle of org.apache.lucene with Import-Package statements for all the Lucene packages we use. Note: I'm setting the package version range to [1.9.0,3.0.0). There is a possibility that the Eclipse platform will move to Lucene 3.x, but that version removes some deprecated Lucene classes, and I noticed that we use a deprecated class (org.apache.lucene.search.Hits).
I just confirmed that Hits will be removed in Lucene 3.0. So I will leave the version range as [1.9.0,3.0.0), and we'll have to deal with it if Eclipse platform adopts Lucene 3.x.
Created attachment 186801 [details] Patch for plugin o.e.d.sqltools.result
Grrr, Lucene 2.9.1 has version numbers attached to the exported packages, but 1.9.1 does not. So I have to redo my patch without the version ranges on the Import-Package statements.
Created attachment 186841 [details] Patch for plugin o.e.d.sqltools.result Reworked the patch to remove the Import-Package version ranges, which don't work with Lucene 1.9.1.
Checked in fix, tagged to v201101150300
Created attachment 186861 [details] Patch for plugin o.e.d.sqltools.result Additional patch that adds version ranges of "[0.0.0,3.0.0)" to the Lucene Import-Package statements.
Added package version ranges of "[0.0.0,3.0.0)" to the Import-Package statements. Tagged change to v201101150715.
Uh oh, now that I have the new DTP v1.9 build to test, I found the Import-Package statements do not solve the original problem of the missing Lucene class at runtime. I also tried adding an optional Require-Bundle statement for the plugin org.apache.lucene.core, and that does not work either.
We have decided to try including the old version of Lucene (v1.9.1) with our DTP 1.9 distributions. If we set our version range properly (to "[1.9.0,2.0.0)") and the Eclipse platform help plugin does the same (to "[2.9.0,3.0.0)"), then things should work OK. (Keeping fingers crossed...)
I opened IPZilla bug CQ 4815 ( https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4815 ) for the use of Apache Lucene 1.9.1 from Orbit in DTP 1.9.
I opened bug 334838 to the DTP build team to add the org.apache.lucene plugin v1.9.1 to our DTP 1.9 distributions. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=334838
FYI, the Eclipse platform team is updating the Lucene plugin version ranges in the MANIFEST.MF of plugin org.eclipse.help.base in Eclipse 3.7 to limit the lower version to 2.9.0. See bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=334694. This will prevent conflicts between our old version of the Lucene plugin and the newer version used by the Eclipse platform.
Changed the MANIFEST.MF of plugin org.eclipse.datatools.sqltools.result to have a Require-Bundle of org.apache.lucene with version range of [1.9.0,2.0.0) (in place of the Import-Package statements) to make sure we pick up the old version of Lucene, which is now bundled with the DTP distribution packages. Tagged change to v201101210500.
OK, this problem appears to be finally resolved. I tested the v20110121-1029 build against Eclipse 3.7, and it's working OK.
Go to work space directory > Open ".metadata" folder > Open ".plugins" folder > Open "org.eclipse.datatools.sqltools.result" folder. Delete the "results" file. Re-start the product and try again.