Nov 20 2012
Recently I decided to finally give Eclipse 4 RCP a try. I created small application in a few minutes. Everything worked smoothly in Eclipse IDE. Next step was to prepare Maven build. Using Tycho 0.16.0 I was able to build my brand new RCP application using command line. The problems started when I tried to run application built by Maven.
Here are three problems I experienced:
- Application crashing on start-up with an exception like this:
org.eclipse.core.runtime.AssertionFailedException: null argument:applicationXMI argument missing
In order to resolve that I had to add new program argument (Launching tab in Product Configuration Editor)
- Application crashing on start-up with another exception:
!ENTRY org.eclipse.osgi 4 0 2012-11-20 20:43:46.516 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
When you run your RCP application from IDE start-up levels for bundles are set appropriately, but this does not happen in product configuration. These three bundles should have Auto-Start set to true and following start levels (Configuration tab in Editor):
- org.eclipse.core.runtime 2
- org.eclipse.equinox.ds 3
- org.eclipse.equinox.event 3
- Application starting up fine but no controls being rendered inside a part. Eclipse remote debug helped me to determine that an part object was instantiated as expectged but a method creating all the controls wasn’t actually called. For some reason annotation @PostConstruct wasn’t respected. In order to resolve this issue I had to replace bundle javax.annotation 1.1.0 with version 1.0.0. Eclipse Juno IDE is shipped with version 1.0.0 so everything worked fine there but Tycho picked up version 1.1.0 from Eclipse p2 repository for Juno.
5 Responses to “Three problems with starting brand new Eclipse 4 RCP application”
Leave a Reply
You must be logged in to post a comment.