smaldini/atmosphere-sample-grails2 — Issue #1: response callback function not called
Author: ozren1983
Created: 2012-03-02 10:35:57+00:00
State: open

Hi Stephane,

I'm having problems running your sample app. I'm testing it out of the box, with no changes being made to sample app. I've tested it with grails 2.0.0 and 2.0.1, on WinXP, Firefox 10.0.2 and Chrome 17.0.963.56.

When opening user list in firefox, I can see GET http://localhost:8080/atmo-sample2/atmosphere/sample?_=1330683419375 and spinner in console. Browser subscribes in regular intervals to atmosphere service:
2012-03-02 11:16:59,390 [http-nio-8080-exec-2] INFO sample.SampleHandlerService - onRequest, AtmosphereResourceImpl{, hasCode-263605858,
action=org.atmosphere.cpr.AtmosphereServlet$Action@215571,
broadcaster=org.atmosphere.cpr.DefaultBroadcaster,
cometSupport=org.atmosphere.container.Tomcat7CometSupport@7090a8,
serializer=null,
isInScope=true,
useWriter=true,
listeners=[]}

When I create a user in another browser, this is logged to grails console:
2012-03-02 11:19:25,312 [http-nio-8080-exec-7] INFO sample.UserController - broadcasting
2012-03-02 11:19:25,343 [Atmosphere-AsyncWrite-0] INFO sample.SampleHandlerService - onStateChange, message: fsd : 1 created

However, response callback function is not called in first browser where user list is opened.

Any idea what might be the issue here?

Cheers
Ozren

P.S. I'm also adding startup log from grails console:

2012-03-02 11:13:04,906 [main] INFO webxml.WebxmlGrailsPlugin - Loading default config file: class DefaultWebXmlConfig
2012-03-02 11:13:04,937 [main] WARN webxml.WebxmlGrailsPlugin - Did not find application config file: WebXmlConfig
2012-03-02 11:13:05,406 [main] INFO webxml.WebxmlGrailsPlugin - Loading default config file: class DefaultWebXmlConfig
2012-03-02 11:13:05,406 [main] WARN webxml.WebxmlGrailsPlugin - Did not find application config file: WebXmlConfig
| Running Grails application
| Enabling Tomcat NIO connector
2012-03-02 11:13:06,281 [main] INFO http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
2012-03-02 11:13:06,359 [main] INFO net.NioSelectorPool - Using a shared selector for servlet write/read
2012-03-02 11:13:06,390 [main] INFO core.StandardService - Starting service Tomcat
2012-03-02 11:13:06,390 [main] INFO core.StandardEngine - Starting Servlet Engine: Apache Tomcat/7.0.25
2012-03-02 11:13:06,625 [pool-5-thread-1] INFO startup.ContextConfig - No global web.xml found
2012-03-02 11:13:07,109 [pool-5-thread-1] INFO [localhost].[/atmo-sample2] - Initializing Spring root WebApplicationContext
2012-03-02 11:13:11,281 [pool-5-thread-1] WARN config.ConfigurationFactory - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Documents%20and%20Settings/Korisnik/.grails/ivy-cache/net.sf.ehcache/ehcache-core/jars/ehcache-core-2.4.6.jar!/ehcache-failsafe.xml
2012-03-02 11:13:12,890 [pool-5-thread-1] INFO scaffolding.DefaultGrailsTemplateGenerator - Scaffolding template generator set to use resource loader org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext@d15e01: startup date [Fri Mar 02 11:13:10 CET 2012]; parent: Root WebApplicationContext
2012-03-02 11:13:14,515 [pool-5-thread-1] INFO resource.ResourceProcessor - Performing a full reload
2012-03-02 11:13:15,296 [pool-5-thread-1] INFO resource.ResourceProcessor - Loading resource declarations...
2012-03-02 11:13:15,296 [pool-5-thread-1] INFO resource.ResourceProcessor - Forgetting all known modules...
2012-03-02 11:13:15,312 [pool-5-thread-1] INFO resource.ResourceProcessor - Forgetting all known resources...
2012-03-02 11:13:15,734 [pool-5-thread-1] WARN module.ModuleDeclarationsFactory - 'grails.resources.modules' in config does not define any modules
2012-03-02 11:13:18,109 [pool-5-thread-1] WARN util.GrailsUtil - [DEPRECATED] Method ConfigurationHolder.getConfig() is deprecated and will be removed in a future version of Grails.
2012-03-02 11:13:18,171 [pool-5-thread-1] WARN util.GrailsUtil - [DEPRECATED] Method ApplicationHolder.getApplication() is deprecated and will be removed in a future version of Grails.
2012-03-02 11:13:18,187 [pool-5-thread-1] WARN util.GrailsUtil - [DEPRECATED] Method ApplicationHolder.getApplication() is deprecated and will be removed in a future version of Grails.
2012-03-02 11:13:18,281 [pool-5-thread-1] INFO context.GrailsConfigUtils - [GrailsContextLoader] Grails application loaded.
2012-03-02 11:13:18,531 [pool-5-thread-1] INFO cpr.AtmosphereServlet - Using BroadcasterFactory class: org.atmosphere.cpr.DefaultBroadcasterFactory
2012-03-02 11:13:18,609 [pool-5-thread-1] INFO cpr.AtmosphereServlet - Installed AtmosphereHandler com.odelia.grails.plugins.atmosphere.GrailsHandler mapped to context-path: /atmosphere/sample
2012-03-02 11:13:18,625 [pool-5-thread-1] INFO cpr.AtmosphereServlet - Atmosphere is using async support: org.atmosphere.container.Tomcat7CometSupport running under container: Apache Tomcat/7.0.25
2012-03-02 11:13:18,625 [pool-5-thread-1] INFO cpr.AtmosphereServlet - Using broadcaster class: org.atmosphere.cpr.DefaultBroadcaster
2012-03-02 11:13:18,625 [pool-5-thread-1] INFO cpr.AtmosphereServlet - Atmosphere Framework 0.8.4 started.
2012-03-02 11:13:18,625 [pool-5-thread-1] INFO [localhost].[/atmo-sample2] - Initializing Spring FrameworkServlet 'grails'
2012-03-02 11:13:18,687 [main] INFO http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
| Server running. Browse to http://localhost:8080/atmo-sample2