Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Logout fails
Logout fails [message #1059376] Fri, 17 May 2013 14:38 Go to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Hi All,

I'm trying to evaluate the Bahbah project I downloaded from github (https://github.com/BSI-Business-Systems-Integration-AG/org.eclipsescout.demo.git)

First of all as the examples that I write myself, the disconnection appears to fail, one's immediately reconnected after clicking "Logout" from the menu, by cons when we put a breakpoint in the method "AbstractClientSession#stopSession (int)", a step-by-step run leads to some effective logout but an exception is thrown as this:

!ENTRY org.eclipse.scout.rt.client 1 0 2013-05-17 20:17:03.921
!MESSAGE org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:374) logout on server
!STACK 0
java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy16.logout(Unknown Source)
	at org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:370)
	at org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:344)
	at org.eclipse.scout.bahbah.client.ui.desktop.Desktop$LogoutMenu.execAction(Desktop.java:86)
	at org.eclipse.scout.rt.client.ui.action.AbstractAction.doAction(AbstractAction.java:292)
	at org.eclipse.scout.rt.client.ui.action.AbstractAction$P_UIFacade.fireActionFromUI(AbstractAction.java:629)
	at org.eclipse.scout.rt.ui.rap.action.AbstractRwtMenuAction$2.run(AbstractRwtMenuAction.java:220)
	at org.eclipse.scout.rt.ui.rap.concurrency.RwtScoutSynchronizer$1.runVoid(RwtScoutSynchronizer.java:61)
	at org.eclipse.scout.rt.client.ClientJob.runStatus(ClientJob.java:189)
	at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
	at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: ProcessingException[ProcessingStatus[ERROR code=0 Calling ILogoutService.logout() java.lang.InterruptedException: Annulé par l'utilisateur]]
	at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:163)
	at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalHttpServiceTunnel.invokeService(InternalHttpServiceTunnel.java:175)
	at org.eclipse.scout.rt.client.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:115)
	at org.eclipse.scout.rt.client.servicetunnel.ServiceTunnelInvocationHandler.invoke(ServiceTunnelInvocationHandler.java:47)
	at com.sun.proxy.$Proxy16.logout(Unknown Source)
	at org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:370)
	at org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:344)
	at org.eclipse.scout.bahbah.client.ui.desktop.Desktop$LogoutMenu.execAction(Desktop.java:86)
	at org.eclipse.scout.rt.client.ui.action.AbstractAction.doAction(AbstractAction.java:292)
	at org.eclipse.scout.rt.client.ui.action.AbstractAction$P_UIFacade.fireActionFromUI(AbstractAction.java:629)
	at org.eclipse.scout.rt.ui.rap.action.AbstractRwtMenuAction$2.run(AbstractRwtMenuAction.java:220)
	at org.eclipse.scout.rt.ui.rap.concurrency.RwtScoutSynchronizer$1.runVoid(RwtScoutSynchronizer.java:61)
	at org.eclipse.scout.rt.client.ClientJob.runStatus(ClientJob.java:189)
	at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
	at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
	at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:167)
	at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalHttpServiceTunnel.invokeService(InternalHttpServiceTunnel.java:175)
	at org.eclipse.scout.rt.client.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:115)
	at org.eclipse.scout.rt.client.servicetunnel.ServiceTunnelInvocationHandler.invoke(ServiceTunnelInvocationHandler.java:47)
	... 12 more
Caused by: java.lang.InterruptedException: Annulé par l'utilisateur
	at org.eclipse.scout.rt.client.servicetunnel.http.internal.InternalHttpServiceTunnel.tunnelOnline(InternalHttpServiceTunnel.java:181)
	at org.eclipse.scout.rt.client.servicetunnel.http.HttpServiceTunnel.tunnelOnline(HttpServiceTunnel.java:122)
	at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.tunnel(AbstractServiceTunnel.java:194)
	at org.eclipse.scout.rt.client.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:125)
	... 15 more

!ENTRY org.eclipse.scout.rt.client 1 0 2013-05-17 20:17:08.738
!MESSAGE org.eclipse.scout.rt.client.AbstractClientSession.stopSession(AbstractClientSession.java:378) end session event loop


So what's really happening?
Is the session properly closed and resources freed at "Logout" click?
If not, what are the best practices to adopt, especially in this case where It seems to me that the processing of notifications prevents clients' disconnection.

Thanks!
  • Attachment: bahbah.zip
    (Size: 280.66KB, Downloaded 56 times)


Once You Go Scout, You Never Come Out!
Re: Logout fails [message #1060178 is a reply to message #1059376] Thu, 23 May 2013 08:08 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
SOLVED (I suppose)!

one just have to override AbstractStandaloneRwtEnvironment#getLogoutLocation!


Once You Go Scout, You Never Come Out!
Re: Logout fails [message #1060276 is a reply to message #1060178] Thu, 23 May 2013 15:49 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
Thanks for sharing!

Can you elaborate on what was missing? Do you think this is something that should be back ported to Scout?
Re: Logout fails [message #1060289 is a reply to message #1060276] Thu, 23 May 2013 18:11 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
One should just be aware that this implementation in AbstractStandaloneRwtEnvironment is a default behaviour
protected String getLogoutLocation() {

	String path = RWT.getRequest().getServletPath();
	if ((path.length() > 0) && ('/' == path.charAt(0))) {
		path = path.substring(1);
	}
	path += "?" + LogoutFilter.LOGOUT_PARAM;
	return path;
}


For mine I got for example:
protected String getLogoutLocation() {

	return "http://www.eclipse.org/forums/index.php";
}


there's so nothing to port to scout!


Once You Go Scout, You Never Come Out!
Re: Logout fails [message #1060431 is a reply to message #1060289] Fri, 24 May 2013 11:35 Go to previous messageGo to next message
Claudio Guglielmo is currently offline Claudio Guglielmo
Messages: 126
Registered: March 2010
Senior Member
Hi Boy

Overriding this method is not recommended. This logout location is the url which is responsible to logout and not the url after a logout. So if you override this method, you just redirect the call but don't invalidate the session.

The automatic relogin happens because the redirect url after a logout is the base url which typically is /web. If you want to change it you can do this by setting a property in the config.ini of the rap plugin:

org.eclipse.scout.rt.ui.rap.servletfilter.LogoutFilter#redirectUrl=res/logout.html

See the javadoc of the LogoutFilter for more details.

I'm not sure why the exception occurs. It may be because rap cancels all running jobs when stopping the session. Which version of scout are you using?

Regards
Claudio
Re: Logout fails [message #1060505 is a reply to message #1060431] Sat, 25 May 2013 11:27 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Thank you dear Claudio.

I felt that this solution was not consistent, reason why I put "solved, I suppose".

ok, I take the recommended solution into account.

The Scout version I currently use is 3.8.2, but It's the same case on 3.9 (Bahbah project is buitt ont Scout 3.9)

So could you give me your opinion about the solution I provided to this problem: http://www.eclipse.org/forums/index.php/t/487941/ , because I do not really approve it myself!


Once You Go Scout, You Never Come Out!
Re: Logout fails [message #1060515 is a reply to message #1060505] Sat, 25 May 2013 17:23 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 529
Registered: October 2011
Senior Member
Boy D'Poy wrote on Sat, 25 May 2013 17:27
The Scout version I currently use is 3.8.2, but It's the same case on 3.9 (Bahbah project is built on Scout 3.9)


As indicated on the presentation page of the scout demo applications, these demo apps are a work in progress.

You have different branches in the repository:
* master -> Eclispe Kepler EPP (Eclipse 4.3 + Scout 3.9)
* 3.8 -> Eclispe Juno EPP (Eclipse 4.2 + Scout 3.8)

We plan to add other branches for other combinations in the future.


Be aware that there is a big difference for RAP between Juno and Kepler: with Kepler we have upgraded RAP to Kepler 2.0.

[Updated on: Sat, 25 May 2013 17:24]

Report message to a moderator

Re: Logout fails [message #1060626 is a reply to message #1060515] Mon, 27 May 2013 07:32 Go to previous messageGo to next message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Thumbs Up Quote:

As indicated on the presentation page of the scout demo applications, these demo apps are a work in progress.
Thumbs Up

Right! But the same problem happens on both 3.8.2 & 3.9 versions even on a started from scratch project Sad

Furthermore, I tried to implement the solution Claudio indicated, but I the current Scout releases 3.8.2 & 3.9[.0.20130522-0147] only include the :
org.eclipse.scout.rt.ui.rap.servletfilter.LogoutFilter#doLogout

parameter, not the:
org.eclipse.scout.rt.ui.rap.servletfilter.LogoutFilter#redirectUrl

one!


Once You Go Scout, You Never Come Out!

[Updated on: Mon, 27 May 2013 07:33]

Report message to a moderator

Re: Logout fails [message #1061178 is a reply to message #1060626] Thu, 30 May 2013 08:17 Go to previous message
Boy D'Poy is currently offline Boy D'Poy
Messages: 56
Registered: October 2011
Member
Quote:
I tried to implement the solution Claudio indicated, but I the current Scout releases 3.8.2 & 3.9[.0.20130522-0147]


Ignore this partially plz, only for 3.9, not for 3.8.2, beacause it was due to a bad upgrade from eclipse 4.3.M.7 to 4.3.RC1.


I implemented the solution as recommended and it worked fine!

Thank you, but I would be very grateful to take a look at this question I submit a few days ago : http://www.eclipse.org/forums/index.php/t/487941/


Once You Go Scout, You Never Come Out!
Previous Topic:Using the Accessive library in the unit tests.
Next Topic:How to change theme(color)
Goto Forum:
  


Current Time: Thu Apr 17 05:51:21 EDT 2014

Powered by FUDForum. Page generated in 0.05405 seconds