Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3A4E57F5C for ; Sun, 4 Sep 2011 16:12:24 +0000 (UTC) Received: (qmail 65349 invoked by uid 500); 4 Sep 2011 16:12:23 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 65069 invoked by uid 500); 4 Sep 2011 16:12:21 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 65053 invoked by uid 99); 4 Sep 2011 16:12:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Sep 2011 16:12:19 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=FREEMAIL_FROM,SPF_SOFTFAIL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of sdwcn@hotmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Sep 2011 16:12:12 +0000 Received: from joe.nabble.com ([192.168.236.139]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1R0FIV-0000hT-Mg for users@activemq.apache.org; Sun, 04 Sep 2011 09:11:51 -0700 Date: Sun, 4 Sep 2011 09:11:51 -0700 (PDT) From: sdwcn To: users@activemq.apache.org Message-ID: <1315152711668-3789511.post@n4.nabble.com> Subject: amq5.5 + ajax + glassfish MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi All, I embedded amq5.50 to glassfish v3, and successfully deployed activemq-web-demo-5.5.0.war into glassfish, when i run the example from demo (i.e. ajax client - chat.html, after click 'join'), it seems everything work as expected, however when i open up glassfish server.log, i found it throws the same exceptions every second as shown below (guessing the frequency that the exceptions triggered is same as long polling that you get an empty ajax-response when ur client listening) /[#|2011-09-04T21:46:54.250+0800|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=28;_ThreadName=Thread-2;|StandardWrapperValve[AjaxServlet]: PWC1406: Servlet.service() for servlet AjaxServlet threw exception java.lang.IllegalStateException: Request is within the scope of a filter or servlet that does not support asynchronous operations at org.apache.catalina.connector.Request.startAsync(Request.java:3865) at org.apache.catalina.connector.Request.startAsync(Request.java:3817) at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1040) at org.eclipse.jetty.continuation.Servlet3Continuation.suspend(Servlet3Continuation.java:184) at org.apache.activemq.web.MessageListenerServlet.doMessages(MessageListenerServlet.java:321) at org.apache.activemq.web.MessageListenerServlet.doGet(MessageListenerServlet.java:241) at org.apache.activemq.web.AjaxServlet.doGet(AjaxServlet.java:47) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217) at org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:45) ..../ *by googling for a possible solution to this issue, i found some clues and added "true" into web.xml (certainly required to change root tag 'web-app' to version 3.0) for the AjaxServlet, MessageServlet and SessionFilter. The above exceptions vanished, but there are new exceptions thrown:* /[#|2011-09-05T00:03:04.218+0800|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=25;_ThreadName=Thread-2;|2011-09-05 00:03:04,218 [ Session Task-1] ERROR AjaxListener - Error receiving message java.lang.IllegalStateException: Asynchronous dispatch already in progress, must call ServletRequest.startAsync first java.lang.IllegalStateException: Asynchronous dispatch already in progress, must call ServletRequest.startAsync first at org.apache.catalina.connector.AsyncContextImpl.dispatch(AsyncContextImpl.java:183) at org.eclipse.jetty.continuation.Servlet3Continuation.resume(Servlet3Continuation.java:153) at org.apache.activemq.web.AjaxListener.onMessageAvailable(AjaxListener.java:74) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1252) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:127) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) |#]/ Anyone got any ideas on this? Is there anything we can configure in GF3? Regards, David -- View this message in context: http://activemq.2283324.n4.nabble.com/amq5-5-ajax-glassfish-tp3789511p3789511.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.