By the way, this is very important -- as we've recently discovered. You must use the
AsyncDispatcher when you're using the comet servlet, otherwise you'll end up
getting serious contention locks.
Add this to your ErraiServices.properties
errai.dispatcher_implementation=org.jboss.errai.bus.server.AsyncDispatcher
On 2010-01-25, at 10:20 PM, Mike Brock wrote:
These are the bare minimum files I left that made it work. So the
problem exists in some file outside these files.
errai-bus-1.0-SNAPSHOT.jar
errai-common-1.0-SNAPSHOT.jar
guice-2.0-aopalliance.jar
guice-2.0.jar
guice-servlet-2.0.jar
gwt-mosaic-dnd-0.2.0.jar
log4j-1.2.14.jar
mvel2-2.0.16-SNAPSHOT.jar
slf4j-api-1.5.10.jar
slf4j-log4j12-1.5.10.jar
On 2010-01-25, at 4:48 PM, Kevin Jordan wrote:
> Well, at least it’s reproducible. I was going crazy trying to figure out why it
would have been doing it and only on my network.
>
> From: Mike Brock [mailto:cbrock@redhat.com]
> Sent: Monday, January 25, 2010 3:42 PM
> To: Kevin Jordan
> Cc: errai-users(a)lists.jboss.org
> Subject: Re: [errai-users] Trouble sending messages
>
> Okay, this causes the problem. Hopefully I can now use this to track down the
problem.
> On 2010-01-25, at 3:58 PM, Kevin Jordan wrote:
>
>
> Same thing happened with the small example. I’ve posted it here for you to try:
http://kjordan.net/ErraiTest.war
>
>
> From: errai-users-bounces(a)lists.jboss.org
[mailto:errai-users-bounces@lists.jboss.org] On Behalf Of Kevin Jordan
> Sent: Monday, January 25, 2010 2:40 PM
> To: 'Mike Brock'
> Cc: errai-users(a)lists.jboss.org
> Subject: Re: [errai-users] Trouble sending messages
>
> 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(a)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(a)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(a)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(a)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(a)lists.jboss.org
> Subject: Re: [errai-users] Trouble sending messages
>
> Attached are the server.xml and context.xml files we use for testing.
>
>
>
_______________________________________________
errai-users mailing list
errai-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/errai-users