Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359054 - [Link] NullPointerException in LCA after deserialization when running in cluster
Summary: [Link] NullPointerException in LCA after deserialization when running in cluster
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 341761
  Show dependency tree
 
Reported: 2011-09-27 09:09 EDT by Florian Waibel CLA
Modified: 2011-09-29 07:28 EDT (History)
1 user (show)

See Also:


Attachments
Extension of the test cast SessionSerialization_Test (2.04 KB, patch)
2011-09-27 09:11 EDT, Florian Waibel CLA
no flags Details | Diff
Complete patched JUnit test SessionSerialization_Test.java (2.29 KB, text/plain)
2011-09-27 14:37 EDT, Florian Waibel CLA
ruediger.herrmann: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Waibel CLA 2011-09-27 09:09:07 EDT
Using a Link widget in a clustered RWT application results in a NPE:

Exception in thread "qtp1148428095-32" java.lang.NullPointerException
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.getTextObject(LinkLCA.java:108)
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.renderText(LinkLCA.java:82)
	at org.eclipse.swt.internal.widgets.linkkit.LinkLCA.renderChanges(LinkLCA.java:70)
	at org.eclipse.rwt.lifecycle.AbstractWidgetLCA.render(AbstractWidgetLCA.java:36)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$RenderVisitor.render(DisplayLCA.java:71)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA$RenderVisitor.doVisit(DisplayLCA.java:55)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor$AllWidgetTreeVisitor.visit(WidgetTreeVisitor.java:30)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:66)
	at org.eclipse.swt.internal.widgets.WidgetTreeVisitor.accept(WidgetTreeVisitor.java:55)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.renderShells(DisplayLCA.java:173)
	at org.eclipse.swt.internal.widgets.displaykit.DisplayLCA.render(DisplayLCA.java:146)
	at org.eclipse.rwt.internal.lifecycle.Render.execute(Render.java:29)
	at org.eclipse.rwt.internal.lifecycle.PhaseExecutor.execute(PhaseExecutor.java:34)
	at org.eclipse.rwt.internal.lifecycle.SimpleLifeCycle.execute(SimpleLifeCycle.java:127)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.runLifeCycle(LifeCycleServiceHandler.java:77)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.synchronizedService(LifeCycleServiceHandler.java:55)
	at org.eclipse.rwt.internal.service.LifeCycleServiceHandler.service(LifeCycleServiceHandler.java:45)
	at org.eclipse.rwt.internal.service.ServiceManager$HandlerDispatcher.service(ServiceManager.java:34)
	at org.eclipse.rwt.internal.engine.RWTDelegate.handleValidRequest(RWTDelegate.java:62)
	at org.eclipse.rwt.internal.engine.RWTDelegate.doPost(RWTDelegate.java:41)
	at org.eclipse.rwt.internal.engine.RWTDelegate.doGet(RWTDelegate.java:33)
Comment 1 Florian Waibel CLA 2011-09-27 09:11:14 EDT
Created attachment 204073 [details]
Extension of the test cast SessionSerialization_Test

The modified test reproduces the reported NPE.
Comment 2 Rüdiger Herrmann CLA 2011-09-27 13:40:02 EDT
(In reply to comment #1)
> Created attachment 204073 [details]
> Extension of the test cast SessionSerialization_Test
> The modified test reproduces the reported NPE.
I am afraid, the patch doesn't apply. Could you provide a working patch? Please make sure to select 'workspace' as the root of the patch
Comment 3 Florian Waibel CLA 2011-09-27 14:35:29 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > Created attachment 204073 [details]
> > Extension of the test cast SessionSerialization_Test
> > The modified test reproduces the reported NPE.
> I am afraid, the patch doesn't apply. Could you provide a working patch? Please
> make sure to select 'workspace' as the root of the 

I can apply the patch without any errors against the current git mirror of RAP with:

> git apply 0001-NPE-in-link-widget.patch

commit aa848df6d77114f62c8a39f30c0491ca4bbc6dc8
Author: ifurnadjiev <ifurnadjiev>
Date:   Mon Sep 26 18:54:00 2011 +0000

I'll add the patched file for convenience.
Comment 4 Florian Waibel CLA 2011-09-27 14:37:34 EDT
Created attachment 204114 [details]
Complete patched JUnit test SessionSerialization_Test.java
Comment 5 Rüdiger Herrmann CLA 2011-09-28 04:03:06 EDT
The WidgetAdapter for the Display wasn't serialized. This prevented the widget properties from being preserved after read-data. The WidgetAdapter is now being serialized.
Changes are in CVS HEAD.