strange 'context has been disposed' problems in RWTLifeCycle-class in rap 1.2.1 [message #535731] |
Tue, 25 May 2010 08:44  |
Eclipse User |
|
|
|
<font size=2 face="sans-serif">Hi there, </font>
<br>
<br><font size=2 face="sans-serif">We have one customer who claims that
our RAP.1.2.1-app crashes from time to time (no user can connect, all just
see a white page) and only a restart of Tomcat helps.</font>
<br><font size=2 face="sans-serif">Unfortunately we cannot reproduce it
locally.</font>
<br>
<br><font size=2 face="sans-serif">In the logs we found one exception which
might be the cause of that: </font>
<br><font size=2 face="sans-serif">----------</font>
<br><font size=2 face="sans-serif">Exception in thread "UIThread [4F59A62615A5A8430B03331F1995B74C]"
java.lang.IllegalStateException: The context has been disposed.</font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.service.ServiceContext.checkState(S erviceContext.java:154) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.service.ServiceContext.getRequest(S erviceContext.java:82) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.service.ContextProvider.getRequest( ContextProvider.java:129) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.service.ContextProvider.getSession( ContextProvider.java:148) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.setShutdownA dapter(RWTLifeCycle.java:350) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.access$0(RWT LifeCycle.java:347) </font>
<br><font size=2 face="sans-serif"> at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:133) </font>
<br><font size=2 face="sans-serif"> at
java.lang.Thread.run(Unknown Source)</font>
<br><font size=2 face="sans-serif">----------</font>
<br>
<br><font size=2 face="sans-serif">As you can see its within RAP and if
I look at the RWTLifeCycleClass of 1.2.1 it seems that the original 'Throwable
thr' was swallowed, so we cannot get the Root-Cause.</font>
<br><font size=2 face="sans-serif">-------------</font>
<br><font size=2 face="Courier New"> </font><font size=2 color=#820040 face="Courier New"><b>private</b></font><font size=2 face="Courier New">
</font><font size=2 color=#820040 face="Courier New"><b>final</b></font><font size=2 face="Courier New">
</font><font size=2 color=#820040 face="Courier New"><b>class</b></font><font size=2 face="Courier New">
UIThreadController </font><font size=2 color=#820040 face="Courier New"><b>implements</b></font><font size=2 face="Courier New">
Runnable { </font>
<br><font size=2 face="Courier New"> </font><font size=2 color=#820040 face="Courier New"><b>public</b></font><font size=2 face="Courier New">
</font><font size=2 color=#820040 face="Courier New"><b>void</b></font><font size=2 face="Courier New">
run() {</font>
<br><font size=2 face="Courier New"> IUIThreadHolder
uiThread = ( IUIThreadHolder )Thread.currentThread();</font>
<br><font size=2 face="Courier New"> </font><font size=2 color=#820040 face="Courier New"><b>try</b></font><font size=2 face="Courier New">
{</font>
<br><font size=2 face="Courier New">
[...]</font>
<br><font size=2 face="Courier New"> }
</font><font size=2 color=#820040 face="Courier New"><b>catch</b></font><font size=2 face="Courier New">(
</font><font size=2 color=#820040 face="Courier New"><b>final</b></font><font size=2 face="Courier New">
Throwable thr ) {</font>
<br><font size=2 face="Courier New">
</font><font size=2 color=#3f8080 face="Courier New"><b>// </b></font><font size=2 color=#71b2cf face="Courier New"><b>TODO</b></font><font size=2 color=#3f8080 face="Courier New"><b>
[rh] preliminary fix for </b></font>
<br><font size=2 face="Courier New">
</font><font size=2 color=#3f8080 face="Courier New"><b>//
</b></font><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=232289"><font size=2 color=#3f8080 face="Courier New"><b>https://bugs.eclipse.org/bugs/show_bug.cgi?id=232289</b></font></a>
<br><font size=2 face="Courier New">
</font><font size=2 color=#3f8080 face="Courier New"><b>//
For a decent solution, see these ideas</b></font>
<br><font size=2 face="Courier New">
</font><font size=2 color=#3f8080 face="Courier New"><b>//
</b></font><a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465"><font size=2 color=#3f8080 face="Courier New"><b>https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465</b></font></a>
<br><font size=2 face="Courier New">line 133: setShutdownAdapter(
</font><font size=2 color=#820040 face="Courier New"><b>null</b></font><font size=2 face="Courier New">
); // line 133</font>
<br><font size=2 face="Courier New">
IServiceStateInfo stateInfo = ContextProvider.getStateInfo();</font>
<br><font size=2 face="Courier New">
stateInfo.setAttribute( UI_THREAD_THROWABLE, thr );</font>
<br><font size=2 face="Courier New"> }</font>
<br><font size=2 face="Courier New"> }</font>
<br><font size=2 face="Courier New"> }</font>
<br><font size=2 face="sans-serif">-------------</font>
<br>
<br><font size=2 face="sans-serif">If I see correctly the RWTLifeCycleClass
was changed in 1.3.M3 , at least it doesn't call 'setShutdownAdapater()'
anymore.</font>
<br>
<br><font size=2 face="sans-serif">Could you give us any hints from your
experience what could cause the original problem in RAP 1.2.1 and how we
could circumvent it ? </font>
<br><font size=2 face="sans-serif">We are a bit reluctant to just put RAP
1.3.M3 or later into production, without testing it thoroughly (and not
even knowing if it would fix the problem).</font>
<br>
<br><font size=2 face="sans-serif">So any idea making us able to reproduce
this error or searching for strange RAP usage in our own code would help
us very much !</font>
<br>
<br><font size=2 face="sans-serif">Kind Regards</font>
<br><font size=2 face="sans-serif">Stefan </font>
|
|
|
Re: strange 'context has been disposed' problems in RWTLifeCycle-class in rap 1.2.1 [message #535734 is a reply to message #535731] |
Tue, 25 May 2010 09:00   |
Eclipse User |
|
|
|
I just realized that my NNTP-Reader produces HTML (which the Web-Forum doesn't render), so here the message again in plain text, if anyone can't read it easily.
Hi there,
We have one customer who claims that our RAP.1.2.1-app crashes from time to time (no user can connect, all just see a white page) and only a restart of Tomcat helps.
Unfortunately we cannot reproduce it locally.
In the logs we found one exception which might be the cause of that:
----------
Exception in thread "UIThread [4F59A62615A5A8430B03331F1995B74C]" java.lang.IllegalStateException: The context has been disposed.
at org.eclipse.rwt.internal.service.ServiceContext.checkState(S erviceContext.java:154)
at org.eclipse.rwt.internal.service.ServiceContext.getRequest(S erviceContext.java:82)
at org.eclipse.rwt.internal.service.ContextProvider.getRequest( ContextProvider.java:129)
at org.eclipse.rwt.internal.service.ContextProvider.getSession( ContextProvider.java:148)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.setShutdownA dapter(RWTLifeCycle.java:350)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.access$0(RWT LifeCycle.java:347)
at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:133)
at java.lang.Thread.run(Unknown Source)
----------
As you can see its within RAP and if I look at the RWTLifeCycleClass of 1.2.1 it seems that the original 'Throwable thr' was swallowed, so we cannot get the Root-Cause.
-------------
private final class UIThreadController implements Runnable {
public void run() {
IUIThreadHolder uiThread = ( IUIThreadHolder )Thread.currentThread();
try {
[...]
} catch( final Throwable thr ) {
// TODO [rh] preliminary fix for
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=232289
// For a decent solution, see these ideas
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=219465
line 133: setShutdownAdapter( null ); // line 133
IServiceStateInfo stateInfo = ContextProvider.getStateInfo();
stateInfo.setAttribute( UI_THREAD_THROWABLE, thr );
}
}
}
-------------
If I see correctly the RWTLifeCycleClass was changed in 1.3.M3 , at least it doesn't call 'setShutdownAdapater()' anymore.
Could you give us any hints from your experience what could cause the original problem in RAP 1.2.1 and how we could circumvent it ?
We are a bit reluctant to just put RAP 1.3.M3 or later into production, without testing it thoroughly (and not even knowing if it would fix the problem).
So any idea making us able to reproduce this error or searching for strange RAP usage in our own code would help us very much !
Kind Regards
Stefan
|
|
|
|
|
Re: strange 'context has been disposed' problems in RWTLifeCycle-class in rap 1.2.1 [message #536120 is a reply to message #536082] |
Thu, 27 May 2010 03:18  |
Eclipse User |
|
|
|
Am 27.05.2010 00:04, schrieb Rüdiger Herrmann:
> Hi Stefan,
>
> glad to hear that you could reproduce the problem. The only bug that
> even remotely comes close to what you describe is this one:
> Rap UI Locks up when a runnable is running, and a page reload happens
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=284202
> It was fixed in 1.2.2. However, I don't belive that this is the source
> of your problem.
Rüdiger - thanks for this suggestion.
I realize, that indeed this bug related to the one you mentioned might
be our problem:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=258102
Typically our progress-bars are not seen very long, but through the
JMeter-Tests and Garbage Collection Cycles in the end I saw some longer
progressbars (and luckily clicked around and reloaded the page while
JMeter and the progressbar was running).
I now get the same exception as in post #1 and am also running in the
Deadlock.
Running RAP1.3M3 (this is the only other version we currently allow in
production) I can't reproduce it anymore so this is good enough to
provide a new version to our customer in the hope his problems vanish.
Regards
Stefan
|
|
|
Powered by
FUDForum. Page generated in 0.04310 seconds