tomasbilek / gwteventservice

Automatically exported from code.google.com/p/gwteventservice
Other
0 stars 0 forks source link

Problem with Session Management #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What version of the product are you using?
1.2.0

Please provide any additional information below.

The server push is implemented within an application with an embedded session 
management mechanism. As can be seen in the logs provided below,  although the 
sessionId is generated prior to the addition of the listener, an 
NoSessionAvailableException is thrown:

Session registration - User:giorgos, ID:1dfql14k1qy6, Creation Time:15:31:43 
26/11/2011
de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Configuration changed - EventServiceConfiguration (Default 
Configuration)
  Min.: 0ms; Max.: 20000ms; Timeout: 90000ms
26 Nov 2011 3:31:46 μμ de.novanic.eventservice.logger.DefaultServerLogger log
INFO: Server: Client "1dfql14k1qy6" initialized.
Starting Jetty on port 8888
   [WARN] Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public 
abstract void 
de.novanic.eventservice.client.event.service.EventService.register(de.novanic.ev
entservice.client.event.domain.Domain,de.novanic.eventservice.client.event.filte
r.EventFilter)' threw an unexpected exception: 
de.novanic.eventservice.service.exception.NoSessionAvailableException: There is 
no session available! Maybe no session was generated explicitly by the 
connection id generator.
    at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Caused by: 
de.novanic.eventservice.service.exception.NoSessionAvailableException: There is 
no session available! Maybe no session was generated explicitly by the 
connection id generator.
    at de.novanic.eventservice.service.connection.id.SessionConnectionIdGenerator.getConnectionId(SessionConnectionIdGenerator.java:64)
    at de.novanic.eventservice.service.EventServiceImpl.getClientId(EventServiceImpl.java:350)
    at de.novanic.eventservice.service.EventServiceImpl.getClientId(EventServiceImpl.java:341)
    at de.novanic.eventservice.service.EventServiceImpl.register(EventServiceImpl.java:146)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    ... 22 more
[ERROR] 500 - POST /mypet/gwteventservice (127.0.0.1) 57 bytes
   Request headers
      Host: 127.0.0.1:8888
      User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
      Accept-Language: en-us,en;q=0.5
      Accept-Encoding: gzip,deflate
      Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
      Keep-Alive: 115
      Connection: keep-alive
      Referer: http://127.0.0.1:8888/MyPet.html?gwt.codesvr=127.0.0.1:9997
      Cookie: http%3A%2F%2F127.0.0.1%3A8888%2Fmypet%2Ftheme=%7B%22state%22%3A%7B%22id%22%3A%22s%3Ablue%22%2C%20%22file%22%3A%22s%3Agxt-all.css%22%7D%7D; JSESSIONID=1dfql14k1qy6
      Cache-Control: no-cache
      X-GWT-Permutation: HostedMode
      X-GWT-Module-Base: http://127.0.0.1:8888/mypet/
      Content-Type: text/x-gwt-rpc; charset=utf-8
      Content-Length: 341
      Pragma: no-cache
   Response headers
      Content-Type: text/plain

Any help would be appreciated.
Thank you in advance.

Original issue reported on code.google.com by athanaso...@gmail.com on 26 Nov 2011 at 2:21

GoogleCodeExporter commented 8 years ago
I discovered that this exception occurs when the max. waiting time is greater 
than the session max. inactive interval. 

Original comment by athanaso...@gmail.com on 28 Nov 2011 at 11:07

GoogleCodeExporter commented 8 years ago
Hi, does it mean that this issue can be closed because it was a configuration 
problem?

Original comment by sven.strohschein@googlemail.com on 8 Dec 2011 at 7:23

GoogleCodeExporter commented 8 years ago
Yes, you can close it - I do not consider the problem encountered a bug.

Original comment by athanaso...@gmail.com on 8 Dec 2011 at 10:46

GoogleCodeExporter commented 8 years ago
Web server configuration problem

Original comment by sven.strohschein@googlemail.com on 9 Dec 2011 at 5:05

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi.
I'm using version 1.2.and meet this problem.
I tried to add to web.xml
<session-config>
    <session-timeout>15</session-timeout>
-config>
but can't solve it.
Please help me. how to fix this.
Thank you in advance.

Original comment by leeffa...@gmail.com on 4 Jan 2012 at 9:06

GoogleCodeExporter commented 8 years ago
Hi,

Same here: on version 1.2 max. inactive interval is 15 min and  max. waiting is 
20 sec. Still getting the same exception. But it's intermittent. It's on Apache 
+ Tomcat workers configuration.

Caused by: 
de.novanic.eventservice.service.exception.NoSessionAvailableException: There is 
no session available! Maybe no session was generated explicitly by the 
connection id generator.
    at de.novanic.eventservice.service.connection.id.SessionConnectionIdGenerator.getConnectionId(SessionConnectionIdGenerator.java:64)
    at de.novanic.eventservice.service.EventServiceImpl.getClientId(EventServiceImpl.java:350)
    at de.novanic.eventservice.service.EventServiceImpl.getClientId(EventServiceImpl.java:341)
    at de.novanic.eventservice.service.EventServiceImpl.unlisten(EventServiceImpl.java:262)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    ... 21 more

Original comment by ngu...@gmail.com on 13 Feb 2012 at 6:18

GoogleCodeExporter commented 8 years ago
Hi 
From time to time, I have the same problem 
de.novanic.eventservice.service.exception.NoSessionAvailableException: There is 
no session available! Maybe no session was generated explicitly by the 
connection id generator
I am using glassfish and ListeEventListener V1.2
Changing rhe session-timeout in web-xml has no effect on this problem.
Thanks for your help

Original comment by paul75...@gmail.com on 13 Apr 2012 at 4:54

GoogleCodeExporter commented 8 years ago
Same here: on version 1.2 max. waiting is 20 sec. Still getting the same 
exception. But it's intermittent. 
This is not invalid.

Original comment by prof.d...@gmail.com on 15 Jun 2012 at 6:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hello :)

I have the same exception

Exception in thread "Thread-23" 
de.novanic.eventservice.service.exception.NoSessionAvailableException: There is 
no session available! Maybe no session was generated explicitly by the 
connection id generator.
    at de.novanic.eventservice.service.connection.id.SessionConnectionIdGenerator.getConnectionId(SessionConnectionIdGenerator.java:64)
    at de.novanic.eventservice.service.EventExecutorServiceFactory.getEventExecutorService(EventExecutorServiceFactory.java:97)
    at de.novanic.eventservice.service.RemoteEventServiceServlet.getEventExecutorService(RemoteEventServiceServlet.java:102)
    at de.novanic.eventservice.service.RemoteEventServiceServlet.addEventUserSpecific(RemoteEventServiceServlet.java:58)

I do like to know the reason the exception takes place and how to fix it

GWT 2.3
GWTEventService 1.2.0

Original comment by ytdrt...@gmail.com on 12 Sep 2012 at 6:46

GoogleCodeExporter commented 8 years ago
I am facing similar issue,

de.novanic.eventservice.service.exception.NoSessionAvailab
        at de.novanic.eventservice.service.connection.id.SessionConnectionIdGenerator.getConnectionId(SessionConnectionIdGenerator.java:64)                                 
        at de.novanic.eventservice.service.EventExecutorServiceFactory.getEventExecutorService(EventExecutorServiceFactory.java:97)                                         
        at de.novanic.eventservice.service.RemoteEventServiceServlet.getEventExecutorService(RemoteEventServiceServlet.java:111)                                            
        at de.novanic.eventservice.service.RemoteEventServiceServlet.addEvent(RemoteEventServiceServlet.java:64)        

I would like to know the answer and to solution for this.

~Kalyani

Original comment by kalyanik...@gmail.com on 21 Jan 2015 at 9:33