Jetty java.lang.ClassCastException org.eclipse.jetty.continuation.Continuation

296 views
Skip to first unread message

Eduardo

unread,
Jun 15, 2011, 2:04:16 PM6/15/11
to cometd-users
Hi,

I'm trying to update cometd web application from Jetty 6.1.25 to Jetty
7.4.2.v20110526 with cometd 1.1.4.
The Jetty container run as a service in JBoss 4.2.3.GA.
Client application use dojo Javascript.
Jetty and Jboss starts fine, but when the client connect I get the
message

java.lang.ClassCastException:
org.eclipse.jetty.server.AsyncContinuation cannot be cast to
org.eclipse.jetty.continuation.Continuation
at
org.eclipse.jetty.continuation.ContinuationSupport.getContinuation(ContinuationSupport.java:
106)
at
org.cometd.server.continuation.ContinuationCometdServlet.service(ContinuationCometdServlet.java:
189)
at
org.cometd.server.AbstractCometdServlet.service(AbstractCometdServlet.java:
258)
at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)
at
org.mortbay.jetty.servlet.jsr77.Jsr77ServletHolder.handle(Jsr77ServletHolder.java:
75)
at org.eclipse.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1352)
at
br.com.unimed.chatcore.filter.CometCacheFilter.doFilter(CometCacheFilter.java:
31)
at org.eclipse.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1323)
at
br.com.substractum.quidfw.seguranca.AbstractAuthenticationFilter.doFilter(AbstractAuthenticationFilter.java:
84)
at
br.com.unimed.chatcore.login.AuthenticationFilterChatDesenvolvimento.doFilter(AuthenticationFilterChatDesenvolvimento.java:
32)
at org.eclipse.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1323)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:
476)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:
119)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:
480)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:
225)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:
937)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:
406)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:
183)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:
871)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:
117)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:
247)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:
149)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:
110)
at org.eclipse.jetty.server.Server.handle(Server.java:346)
at
org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:
589)
at org.eclipse.jetty.server.HttpConnection
$RequestHandler.content(HttpConnection.java:1065)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:823)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:
220)
at
org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:
411)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:
535)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint
$1.run(SelectChannelEndPoint.java:40)
at org.eclipse.jetty.util.thread.QueuedThreadPool
$3.run(QueuedThreadPool.java:529)
at java.lang.Thread.run(Thread.java:619)

ContinuationSupport class try cast request attribute
Continuation.ATTRIBUTE to org.eclipse.jetty.continuation.Continuation
interface, however object in request is a
org.eclipse.jetty.server.AsyncContinuation$AsyncEventState instance.

Any ideas?

thanks,
Eduardo.

Simone Bordet

unread,
Jun 15, 2011, 5:21:33 PM6/15/11
to cometd...@googlegroups.com
Hi,

On Wed, Jun 15, 2011 at 20:04, Eduardo <eduardo....@gmail.com> wrote:
> Hi,
>
> I'm trying to update cometd web application from Jetty 6.1.25 to Jetty
> 7.4.2.v20110526 with cometd 1.1.4.

Why not moving to 2.x ?

> The Jetty container run as a service in JBoss 4.2.3.GA.
> Client application use dojo Javascript.
> Jetty and Jboss starts fine, but when the client connect I get the
> message
>
> java.lang.ClassCastException:
> org.eclipse.jetty.server.AsyncContinuation cannot be cast to
> org.eclipse.jetty.continuation.Continuation
>

> [snip]


>
> ContinuationSupport class try cast request attribute
> Continuation.ATTRIBUTE to org.eclipse.jetty.continuation.Continuation
> interface, however object in request is a
> org.eclipse.jetty.server.AsyncContinuation$AsyncEventState instance.

Uhm, that's not what the exception says.

> Any ideas?

I think you have classloading problems. Perhaps 2 versions of
jetty-continuations loaded by different classloaders.

Simon
--
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz

Eduardo Milanese

unread,
Jun 16, 2011, 10:59:24 AM6/16/11
to cometd...@googlegroups.com
Hi Simon,

Thanks for your help.
I deployed cometd-demo, downloaded with cometd api,  in same server (war file). Cometd-demo uses Jetty 7.3.1 libs.
My application is a ear package with classloading isolation, but apparently isolation did not work.
When I removed cometd-demo war file application works fine, without errors. 


Eduardo.

2011/6/15 Simone Bordet <sbo...@intalio.com>

--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users

Visit the CometD website at http://www.cometd.org

Reply all
Reply to author
Forward
0 new messages