Realm cannot be null

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Realm cannot be null

Postby hogger » Fri Feb 27, 2009 12:04 am

When I try to add an composite (made by JFace Automatic Databinding, in this case "") to an existing Shell-Application (in this case ""), the error-message "Realm cannot be null" appears:

Code: Select all
org.eclipse.core.runtime.AssertionFailedException: null argument:Realm cannot be null
   at org.eclipse.core.runtime.Assert.isNotNull(
   at org.eclipse.core.databinding.observable.ChangeManager.<init>(
   at org.eclipse.core.databinding.observable.AbstractObservable.<init>(
   at org.eclipse.core.databinding.observable.value.AbstractObservableValue.<init>(
   at org.eclipse.core.internal.databinding.beans.JavaBeanObservableValue.<init>(
   at org.eclipse.core.internal.databinding.beans.JavaBeanObservableValue.<init>(
   at org.eclipse.core.databinding.beans.BeansObservables.observeValue(
   at org.eclipse.core.databinding.beans.BeansObservables.observeValue(
   at ch.clicdesign.artistadmin.simpleclient.PeopleDB.initDataBindings(
   at ch.clicdesign.artistadmin.simpleclient.PeopleDB.<init>(
   at ch.clicdesign.artistadmin.simpleclient.PersonList.createContents(

I know, there're some workarounds to replace the code made by the Automatic Databinding, but it's not a real solution.
Does anyone have the same problem or a good tip?
Posts: 1
Joined: Thu Feb 26, 2009 1:51 am

Re: Realm cannot be null

Postby Eric Clayberg » Fri Feb 27, 2009 4:17 am

The realm needs to be set up when your application starts. Composites will use the realm set up in the parent shell. If you don't have a realm set up in your shell, you need to do so.

The databinding example project provided with SWT Designer shows how to do this, or you can simply refer to the Eclipse Data Binding docs.
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests