Jetty 6.1.14 and Bayeux

22 views
Skip to first unread message

O. Esner

unread,
Jan 29, 2009, 2:52:26 AM1/29/09
to cometd-dev
Hello,

I've used Jetty 6.1.11 server with Bayeux cometd implementation (Maven
jetty plugin, ContinuationCometdServlet, BayeuxService, dojox cometd
client in javascript), everything have been working excellent.

If I try to use Jetty 6.1.12, 6.1.14 or 6.1.15.rc2, ContinuationBayeux
raise following exception (on Windows, jdk 1.6.0, cometd-bayeux
6.1.11):

2009-01-29 08:01:55.640::INFO: jetty-6.1.14
2009-01-29 08:02:02.156:/:INFO: Initializing Spring root
WebApplicationContext
2009-01-29 08:02:31.765:/:INFO: Initializing Spring FrameworkServlet
'dispatcher'
Exception in thread "ContinuationBayeux-0"
java.lang.NoSuchMethodError: org.mort
bay.thread.Timeout.setNow()V
at org.mortbay.cometd.continuation.ContinuationBayeux$1.run
(Continuation
Bayeux.java:68)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
2009-01-29 08:02:35.359::INFO: Started
SelectChann...@0.0.0.0:8080
2009-01-29 08:02:40.578::INFO: Started
SslSocket...@0.0.0.0:8443

Even if is exception raised, cometd communication works. Does anybody
know, what's the reason of this error?

My web xml:
<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>
org.mortbay.cometd.continuation.ContinuationCometdServlet
</servlet-class>
<init-param>
<param-name>timeout</param-name>
<param-value>200000</param-value>
</init-param>
<init-param>
<param-name>interval</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>maxInterval</param-name>
<param-value>30000</param-value>
</init-param>
<init-param>
<param-name>multiFrameInterval</param-name>
<param-value>1500</param-value>
</init-param>
<init-param>
<param-name>logLevel</param-name>
<param-value>1</param-value>
</init-param>
<init-param>
<param-name>JSONCommented</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>alwaysResumePoll</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

The next question: How is the optimal value for timeout and
maxInterval in ContinuationCometdServlet for poor internet connections
(e.g. WiFi) ?

Thanks a lot for any reply.

Greg Wilkins

unread,
Jan 29, 2009, 4:12:56 AM1/29/09
to comet...@googlegroups.com

O.Esner,

With jetty-6, the org.mortbay.util classes are visible to the webapp and
used in preference to those bundled in WEB-INF/lib

Thus it is best that you use 6.1.14 cometd with 6.1.14 jetty.

Alternately you can configure the context classloader to hide the
mortbay util classes by using the serverClasses configuration on the context.

In jetty 7, this will be the default.

If you are on a poor network, then it is best to upgrade
to the latest 6.1.14 (or 6.1.15 out soon), as they
have much better reconnect handling for short breaks in connectivity.

regards

O. Esner

unread,
Feb 2, 2009, 2:37:21 AM2/2/09
to cometd-dev
Thank you very much, the problem is solved! I didn't know, that some
maven packages have been renamed (http://groups.google.com/group/
cometd-users/browse_thread/thread/61305e3211698ba9). In
org.mortbay.jetty/cometd-bayeux package is the newest versin 6.1.11,
so I changed it to 6.1.14 from org.mortbay.jetty/cometd-jetty.

best regards,
O. Esner
Reply all
Reply to author
Forward
0 new messages