Well, just to make sure it wasn’t anything Linux distro specific, I installed Fedora 12 with the tomcat native library through yum, and then downloaded the tomcat 6.0.24 distribution and it does the exact same thing there.  All I did was modify it so it used NIO for the connector and also so that valve was enabled in context.xml, but I still get the same errors.  There shouldn’t be anything else I have to configure elsewhere, correct?  I guess I’ll try my small example again with the TomcatCometServlet and see what happens with that.  The only thing, unless I’m missing a config somewhere else, I can think of is something else making it fail on that servlet.

 

From: Mike Brock [mailto:cbrock@redhat.com]
Sent: Monday, January 25, 2010 2:29 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

I'm really unsure as to what can be the problem.  All I know -- and this is supported by Tomcat documentation -- is that the service() method should *never* be called on a servlet that calls CometProcessor.

 

I also know that it's working in our tests, so I'm really at a loss to describe the problem.

 

Perhaps you can try writing and deploying a simple Servlet that implements CometProcessor and test to see if Tomcat calls the event() method or the servlet() method.  That should provide an objective test as to whether or not this is Errai or Tomcat.

 

On 2010-01-25, at 2:45 PM, Kevin Jordan wrote:



Well, I’ve been taking Terracotta in and out to see if it makes a difference, but I get it either way.  It’s only 3 lines in my Tomcat startup script to take it completely out.

 

From: Mike Brock [mailto:cbrock@redhat.com] 
Sent: Monday, January 25, 2010 1:44 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

I don't much know how Terracotta works, but if it is in any way getting in between the way the TomcatCometServlet deploys and Tomcat... that could explain the problem.  This is why we had to stop using Guice-Servlet.  

 

The way that Tomcat decides to use AIO is if it detects the marker interface on the servlet.  And it only supports it when deployed directly, not through any intermediary.

 

On 2010-01-25, at 2:34 PM, Kevin Jordan wrote:




And maybe not…added that in and it does show up in the stack trace now:

*************************************************************************************************

** PROBLEM!

** It appears something has been incorrectly configured. In order to use ErraiBus

** on Tomcat, you must ensure that you are using the NIO or APR connector. Also

** make sure that you have added these lines to your WEB-INF/web.xml file:

**                                              ---

**    <servlet>

**        <servlet-name>TomcatErraiServlet</servlet-name>

**        <servlet-class>org.jboss.errai.bus.server.servlet.TomcatCometServlet</servlet-class>

**        <load-on-startup>1</load-on-startup>

**    </servlet>

**

**    <servlet-mapping>

**        <servlet-name>TomcatErraiServlet</servlet-name>

**        <url-pattern>*.erraiBus</url-pattern>

**    </servlet-mapping>

**                                              ---

** If you have the following lines in your WEB-INF/web.xml, you must comment or remove them:

**                                              ---

**    <listener>

**        <listener-class>org.jboss.errai.bus.server.ErraiServletConfig</listener-class>

**    </listener>

*************************************************************************************************

 

 

java.lang.Exception: Stack tracing...

        at org.jboss.errai.bus.server.servlet.TomcatCometServlet.service(TomcatCometServlet.java:133)

        at javax.servlet.http.HttpServlet.service(Unknown Source)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)

        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)

        at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)

        at org.apache.catalina.valves.CometConnectionManagerValve.invoke(Unknown Source)

        at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)

        at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)

        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)

        at org.apache.catalina.ha.tcp.ReplicationValve.invoke(Unknown Source)

        at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(Unknown Source)

        at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(SessionValve55.java:52)

        at org.apache.catalina.connector.CoyoteAdapter.service(Unknown Source)

        at org.apache.coyote.http11.Http11NioProcessor.process(Unknown Source)

        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Unknown Source)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(Unknown Source)

        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:619)

 

From: errai-users-bounces@lists.jboss.org [mailto:errai-users-bounces@lists.jboss.org] On Behalf Of Kevin Jordan
Sent: Monday, January 25, 2010 1:30 PM
To: 'Mike Brock'
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

Well, I think just by looking at that context.xml, I can see what I’m missing then:

<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />

 

That was commented out in mine and I’ve never seen anything on that in any articles on comet  on Tomcat, but by that name and the comment above it, it has to be it.

 

From: Mike Brock [mailto:cbrock@redhat.com] 
Sent: Monday, January 25, 2010 1:25 PM
To: Kevin Jordan
Cc: errai-users@lists.jboss.org
Subject: Re: [errai-users] Trouble sending messages

 

Attached are the server.xml and context.xml files we use for testing.