icCube IDE throws an exception when trying to login from multiple tabs in the same browser. Do you have any idea what could be the reason?
Clearing the cookies helps but that is a very uncomfortable workaround.
The IDE shows a popup with AUTHENTICATIONERROR:
com.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details
The server logs shows the exception:
javax.servlet.ServletException: Content-Type was 'text/plain; charset=utf-8'. Expected 'text/x-gwt-rpc'.
at com.google.gwt.user.server.rpc.RPCServletUtils.checkContentTypeIgnoreCase(RPCServletUtils.java:476)
at com.google.gwt.user.server.rpc.RPCServletUtils.readContent(RPCServletUtils.java:207)
at com.google.gwt.user.server.rpc.RPCServletUtils.readContentAsGwtRpc(RPCServletUtils.java:250)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.readContent(AbstractRemoteServiceServlet.java:182)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:239)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
at crazydev.iccube.server.http.IcCubeServletHolder.handle(SourceFile:63)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at crazydev.iccube.server.authentication.IcCubeGwtAuthenticationServletFilter.doFilter(SourceFile:101)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
If you're sharing multiple isntances of icCube on the same url (different port is not enough) you're going to have a collision with the JSESSION cookies. This two URL will most likely collide :
myIcCube.myCompany.com:8282/icCube/icCube.html
myIcCube.myCompany.com:8283/icCube/icCube.html
For this setup you need un-comment the webApp part of the icCube.xml file to make them unique across your server. For example for the 8282 server :
<webApp>
<!--
An example showing how to change the name of the JSESSIONID cookie; handy for example
when having icCube part of a complex Web App (e.g., behind a proxy).
-->
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
<param-value>IC3_JSESSIONID_8282</param-value>
</context-param>
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionIdPathParameterName</param-name>
<param-value>ic3_jsessionid_8282</param-value>
</context-param>
</webApp>
After restarting your servers it should be fine (we had also this issue on our test servers).
This is also a good way changing the icCube's default JSESSION in case you're behind a Java Servlet based web server.