Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311156

Summary: [design] java.lang.IllegalArgumentException when accessing a presentation factory with a wrong branding
Product: [RT] RAP Reporter: Holger Staudacher <holger.staudacher>
Component: WorkbenchAssignee: Project Inbox <rap-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: andreas.r.fischl.work, clovis.seragiotto
Version: 1.3Keywords: needinfo
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Holger Staudacher CLA 2010-04-30 06:28:33 EDT
The RAP workbench provides the possibility to load a PresentationFactory form the PrefUtil.getAPIPreferenceStore(). If you set the saved value to one of the design presentationfactories and load an application e.g. with the rap servlet no layout will be found and an IllegalArgumentException will be thrown.

Version: latest from HEAD

Reproducible: allways

Steps to reproduce: Change the presentation factory in the workbench demo via the preferences to one of the design factories and reload the application.

StackTrace: 

!ENTRY org.eclipse.rap.ui 4 0 2010-04-30 12:14:42.648
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalArgumentException: no layout registered with default id (LayoutRegistry.DEFAULT_LAYOUT_ID) or no layout activated over branding extension.
	at org.eclipse.rap.ui.interactiondesign.layout.ElementBuilder.<init>(ElementBuilder.java:96)
	at org.eclipse.rap.internal.design.example.builder.DummyBuilder.<init>(DummyBuilder.java:23)
	at org.eclipse.rap.internal.design.example.managers.CoolBarManager.<init>(CoolBarManager.java:140)
	at org.eclipse.rap.internal.design.example.business.BusinessPresentationFactory.createCoolBarManager(BusinessPresentationFactory.java:31)
	at org.eclipse.ui.internal.WorkbenchWindow.createCoolBarManager2(WorkbenchWindow.java:3742)
	at org.eclipse.jface.window.ApplicationWindow.addCoolBar(ApplicationWindow.java:288)
	at org.eclipse.ui.internal.WorkbenchWindow.<init>(WorkbenchWindow.java:347)
	at org.eclipse.ui.internal.tweaklets.Workbench3xImplementation.createWorkbenchWindow(Workbench3xImplementation.java:29)
	at org.eclipse.ui.internal.Workbench.newWorkbenchWindow(Workbench.java:1676)
	at org.eclipse.ui.internal.Workbench.access$11(Workbench.java:1674)
	at org.eclipse.ui.internal.Workbench$16.runWithException(Workbench.java:954)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:1019)
	at org.eclipse.ui.internal.StartupThreading.runWithWorkbenchExceptions(StartupThreading.java:55)
	at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:952)
	at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1799)
	at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1735)
	at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:188)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:790)
	at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1341)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:32)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:187)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:1019)
	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:110)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1336)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2315)
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2206)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:424)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.jface.internal.databinding.realmadapter.RealmAdapter.run(RealmAdapter.java:44)
	at org.eclipse.rap.ui.internal.RealmAdapterHook.runWithDefault(RealmAdapterHook.java:48)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:427)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
	at org.eclipse.rap.demo.DemoWorkbench.createUI(DemoWorkbench.java:42)
	at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:244)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:113)
	at java.lang.Thread.run(Thread.java:613)
	at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:102)
Comment 1 Ivan Furnadjiev CLA 2013-07-16 04:14:51 EDT
*** Bug 413036 has been marked as a duplicate of this bug. ***