Thursday, 6 November 2008

Waking up a sleeping Debrief dev environment

Yesterday I started Debrief development again. The SVN log indicates that the last code change was in July. There were a couple of aborted trials with Eclipse 3.4 later that month, but it appears that Eclipse p2 provisioning still isn't stable enough for Debrief to adopt.

Anyway, two problems were faced, and unfortunately I had to step back to 'Getting Debrief Dev Env Up & Running 101' again. Here are the range of problems faced, with their fixes:
  1. Build errors, zipped log file in deploy directory. This problem was fixed on the second Clean all projects followed by Rebuild all
  2. Export wizard finishing, but deployed app won't load (EclipseStarter). I only remembered the fix to this problem on the way home last night. After updating the version of Eclipse being used, the features in the product configuration need to be removed and replaced - to ensure that the product refers to the correct versions of the eclipse features.
  3. Application won't launch from 'Run' button in Eclipse - reporting "Exception launching the eclipse platform: classnotfoundexception". Go into the Run dialog & check that all Debrief plugins are selected in the Plug-ins tab. Then check that the Required plugins are also selected.
  4. Build operation from Site Map results in 'compilation errors occured during the build. The big challenge here is finding which feature failed to build. The term 'Error' marks the point in the log files where the error occurred, but this term also appears (legitimately) in warning associated with the error-handling code. Build the features one by one, starting with the cmap.feature and debrief.feature (since these contain the legacy libraries that most other features rely on). More on this below.
Compilation errors during 'build all' in Site.xml. I've been into the log files, and identified the error as occurring in CorePlugin.java, where it calls the 'init' method of the RangeCalc operation (to supply it with its prefs provider - to determine the user pref for units). The problem appears to be that: The method init(DebriefToolParent) is undefined for the type rangeCalc. Hey, it is. Try casting to ToolParent - the interface instead of the concrete class. Nope, that didn't work. I've just seen there's a warning appearing before the error message:

Access restriction: The type rangeCalc is not accessible due to restriction on classpath entry xxxx:\xxxxxxxxx\.metadata\.plugins\org.eclipse.pde.core\temp\destination\plugins\org.mwc.debrief.legacy_1.0.57\debrief_legacy.jar

That deserves further investigation. I had a look at the plugin.xml for this legacy code project, and it requested that I generate an OSGI bundle. Hey, give it a shot... It didn't appear to work at first, but after I also repeated the operation for the MWC_Legacy plugins, the 'build all' appears to have worked. Very cool. Quick, get it commited.

The last thing to go wrong (check) was to (once again) remove the modified features from the debrief.product Configuration tab and replace them. They just don't seem to update to reflect the newer versions.

[Update, 11 dec 08] Problem remains for site.xml build producing errors in logs.zip. Single Build works for all features, fails on Build All. Tried the following:
  • numerous project clean operations
  • remove then replace features
  • move core features to top of list
Then, restarting Eclipse with 'clean' operation did the trick. Build all just worked...

[Update, 18 Feb 09] Again, I have compiler bugs reported from 'Build all' operation. Closing then re-opening with a -clean command line option didn't overcome it. Removing then replacing all the features did, however, do the trick. Maybe it's the combination of 'clean' and remove/replace that's needed.

No comments:

Post a Comment