Fixing Eclipse Update Issues

// March 2nd, 2010 // Dev, Mobile

After a bit of a break, I’m about to start a stint of Blackberry development and really wanted to try out the new Blackberry JDE integration with Eclipse – something that promises to reduce the immense tedium of running Blackberry simulators somewhat. Anyone who has ever tried to do that will understand how valuable this could be, both financially (time is money after all) and to your sanity.

The plugin requires at least Eclipse 3.4, though, and I was stuck way back on 3.3. Eclipse was reluctant to update itself to any new version from any of the obvious “update” menu items, so I went for the simple brute force method:

  1. Zipping the old Eclipse app folder, then delete it
  2. Download the latest Eclipse, and add the latest version of whatever plugins are needed
  3. Reattach to the old workspace folder.

This initially appeared to work, but didn’t.

Ant Integration

The most visible problem was that Ant builds would no longer run. They’d start, and the red ‘stop’ button on the console would light up (indicating I could stop the running Ant process, not that it was stopped) but no logging at all reached the console. No dialogues appeared explaining the problem.

The clue lay in the workspace’s .metadata/.log file – there were two exceptions, at least one of which was being thrown every time I tried to run Ant:

!ENTRY org.eclipse.core.resources 4 75 2010-03-01 21:17:55.921
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.mtj.core 2 75 2010-03-01 21:17:55.921
!MESSAGE Errors running builder 'Preverification Builder' on project 'Framework'.
org.eclipse.core.runtime.CoreException: Build state machine has not been initialized.


!ENTRY org.eclipse.ant.ui 4 120 2010-03-01 21:21:16.468
!MESSAGE Error logged from Ant UI:
!STACK 0 Accept timed out

Not, admittedly, much of a clue but enough to eventually track down the problem. Ant’s configuration – in particular, the locations of its jars – are stored in your workspace, despite it being a plugin integrated into Eclipse. If the location of Ant’s plugin folder changes, Ant stops working with this workspace.

To fix the problem, go to Preferences > Ant > Runtime. Remove all jars under Ant Home Entries, and then find the new versions in the Eclipse plugin folder (as an External Jar Location). Apply the changes, and your builds shoudl run again.

JavaME Emulation

The JavaME plugin is notoriously bad at introducing breaking changes whenever it updates. This time was no exception – my JavaME projects appeared fine in the IDE, but produced the following exception (to the console, at least) whenever a WTK emulator was run:

Running with storage root C:\Documents and Settings\Tom\j2mewtk\2.5.2\appdb\rms
Running with locale: English_United Kingdom.1252
Running in the identified_third_party security domain
java.lang.ClassNotFoundException: framework/midp/Application
	at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
	at com.sun.midp.midlet.Scheduler.schedule(+52)
	at com.sun.midp.main.Main.runLocalClass(+28)
	at com.sun.midp.main.Main.main(+80)
Execution completed.

The fix turned out to be simple – delete the project, and check it out again. The new version will start with fresh metadata that works with the new plugin. Not very nice, but hardly fatal (if you’re using version control).

Incompatible Plugins

At the end of this, I discovered that the Blackberry JDE plugin does not support the very latest Galileo, so it was all a bit of a pointless exercise. Such is life in mobile development…

Share and Enjoy

  • Digg
  • TwitThis
  • LinkedIn
  • Facebook
  • Google Bookmarks
  • Slashdot
  • email
  • Print
  • PDF

Leave a Reply