Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no suitable serializer #34

Open
nfranke opened this issue Nov 11, 2019 · 1 comment
Open

There is no suitable serializer #34

nfranke opened this issue Nov 11, 2019 · 1 comment

Comments

@nfranke
Copy link

nfranke commented Nov 11, 2019

I'm trying to use the demo application with Tapestry 5.4.5 and Atmosphere 2.5.9. When I do so, I get this error:

There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage

It happens in Chrome and Firebox. I do have Hazelcast enabled, so further down the error page appears to be the source of the issue:

com.hazelcast.nio.serialization.HazelcastSerializationException
There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage

Here is what is dumped to the console:

[WARN] cpr.AsynchronousProcessor Websocket protocol not supported
[INFO] hazelcast.HazelcastBroadcaster Added message listener to topic
[ERROR] ioc.Registry There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage
[ERROR] ioc.Registry Operations trace:
[ERROR] ioc.Registry [ 1] Handling Ajax 'action' component event request for ChatDemo:chatform.
[ERROR] ioc.Registry [ 2] Triggering event 'action' on ChatDemo:chatform
[ERROR] ioc.Registry [ 3] Triggering event 'success' on ChatDemo:chatform
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: org.apache.tapestry5.runtime.ComponentEventException: There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage [at classpath:org/lazan/t5/atmosphere/demo/pages/ChatDemo.tml, line 50]
org.apache.tapestry5.runtime.ComponentEventException: There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage [at classpath:org/lazan/t5/atmosphere/demo/pages/ChatDemo.tml, line 50]
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1126)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:57)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1047)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1044)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
	at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
	at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
	at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:154)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1043)
	at org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110)
	at org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateFilter.handle(AjaxFormUpdateFilter.java:56)
	at $ComponentEventRequestHandler_1dc5846bb0e7b4.handle(Unknown Source)
	at $ComponentEventRequestHandler_1dc5846bb0e761.handle(Unknown Source)
	at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
	at $ComponentEventRequestHandler_1dc5846bb0e762.handle(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$37.handle(TapestryModule.java:2218)
	at $ComponentEventRequestHandler_1dc5846bb0e762.handle(Unknown Source)
	at $ComponentEventRequestHandler_1dc5846bb0e66d.handle(Unknown Source)
	at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
	at org.apache.tapestry5.internal.services.DeferredResponseRenderer.handleComponentEvent(DeferredResponseRenderer.java:45)
	at $ComponentRequestHandler_1dc5846bb0e66f.handleComponentEvent(Unknown Source)
	at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
	at $ComponentRequestHandler_1dc5846bb0e66f.handleComponentEvent(Unknown Source)
	at org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:55)
	at org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:52)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)
	at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.perform(PerThreadOperationTracker.java:84)
	at org.apache.tapestry5.ioc.internal.RegistryImpl.perform(RegistryImpl.java:1266)
	at org.apache.tapestry5.internal.services.RequestOperationTracker.handleComponentEvent(RequestOperationTracker.java:47)
	at $ComponentRequestHandler_1dc5846bb0e66f.handleComponentEvent(Unknown Source)
	at org.lazan.t5.atmosphere.services.internal.PageGlobalsComponentRequestFilter.handleComponentEvent(PageGlobalsComponentRequestFilter.java:22)
	at $ComponentRequestHandler_1dc5846bb0e66f.handleComponentEvent(Unknown Source)
	at $ComponentRequestHandler_1dc5846bb0e642.handleComponentEvent(Unknown Source)
	at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:48)
	at $Dispatcher_1dc5846bb0e644.dispatch(Unknown Source)
	at $Dispatcher_1dc5846bb0e639.dispatch(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:305)
	at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
	at $RequestHandler_1dc5846bb0e63a.service(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:848)
	at $RequestHandler_1dc5846bb0e63a.service(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:838)
	at $RequestHandler_1dc5846bb0e63a.service(Unknown Source)
	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
	at $RequestHandler_1dc5846bb0e63a.service(Unknown Source)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:83)
	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
	at $RequestHandler_1dc5846bb0e63a.service(Unknown Source)
	at $RequestHandler_1dc5846bb0e62f.service(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:256)
	at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
	at $HttpServletRequestHandler_1dc5846bb0e631.service(Unknown Source)
	at org.lazan.t5.atmosphere.services.internal.HttpServletHttpServletRequestFilter.service(HttpServletHttpServletRequestFilter.java:72)
	at org.lazan.t5.atmosphere.services.internal.AtmosphereHttpServletRequestFilter.service(AtmosphereHttpServletRequestFilter.java:50)
	at $HttpServletRequestHandler_1dc5846bb0e631.service(Unknown Source)
	at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
	at $HttpServletRequestFilter_1dc5846bb0e62c.service(Unknown Source)
	at $HttpServletRequestHandler_1dc5846bb0e631.service(Unknown Source)
	at org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:798)
	at $HttpServletRequestHandler_1dc5846bb0e631.service(Unknown Source)
	at $HttpServletRequestHandler_1dc5846bb0e62b.service(Unknown Source)
	at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.tapestry5.ioc.internal.OperationException: There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage [at classpath:org/lazan/t5/atmosphere/demo/pages/ChatDemo.tml, line 50]
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:186)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:90)
	at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:72)
	at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1260)
	at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:154)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1043)
	at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:288)
	at org.apache.tapestry5.corelib.components.Form.onAction(Form.java:549)
	at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:917)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1102)
	... 92 more
Caused by: org.apache.tapestry5.runtime.ComponentEventException: There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage [at classpath:org/lazan/t5/atmosphere/demo/pages/ChatDemo.tml, line 50]
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1126)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:57)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1047)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1044)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:82)
	... 101 more
Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable serializer for class org.lazan.t5.atmosphere.model.TopicMessage
	at com.hazelcast.nio.serialization.SerializationServiceImpl.toData(SerializationServiceImpl.java:215)
	at com.hazelcast.nio.serialization.SerializationServiceImpl.toData(SerializationServiceImpl.java:200)
	at com.hazelcast.spi.impl.NodeEngineImpl.toData(NodeEngineImpl.java:180)
	at com.hazelcast.topic.impl.TopicProxy.publish(TopicProxy.java:33)
	at org.atmosphere.plugin.hazelcast.HazelcastBroadcaster.outgoingBroadcast(HazelcastBroadcaster.java:137)
	at org.atmosphere.util.AbstractBroadcasterProxy.b(AbstractBroadcasterProxy.java:134)
	at org.atmosphere.util.AbstractBroadcasterProxy.broadcast(AbstractBroadcasterProxy.java:121)
	at org.lazan.t5.atmosphere.services.internal.AtmosphereBroadcasterImpl.broadcast(AtmosphereBroadcasterImpl.java:20)
	at $AtmosphereBroadcaster_1dc5846bb0e75b.broadcast(Unknown Source)
	at org.lazan.t5.atmosphere.demo.services.ChatManagerImpl.sendRoomMessage(ChatManagerImpl.java:89)
	at $ChatManager_1dc5846bb0e75a.sendRoomMessage(Unknown Source)
	at $ChatManager_1dc5846bb0e6d1.sendRoomMessage(Unknown Source)
	at org.lazan.t5.atmosphere.demo.pages.ChatDemo.onSuccessFromChatForm(ChatDemo.java:74)
	at org.lazan.t5.atmosphere.demo.pages.ChatDemo.advised$dispatchComponentEvent_1dc5846bb0e6d3(ChatDemo.java)
	at org.lazan.t5.atmosphere.demo.pages.ChatDemo$Invocation_dispatchComponentEvent_1dc5846bb0e6d2.proceedToAdvisedMethod(Unknown Source)
	at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:90)
	at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$EventMethodAdvice.advise(ComponentInstantiatorSourceImpl.java:484)
	at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
	at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$EventMethodAdvice.advise(ComponentInstantiatorSourceImpl.java:484)
	at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)
	at org.lazan.t5.atmosphere.demo.pages.ChatDemo.dispatchComponentEvent(ChatDemo.java)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:917)
	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1102)
	... 105 more
[WARN] TapestryModule.ExceptionReporter Wrote exception report to file:/C:/Projects/tap-at/chat/build/exceptions/2019-11-11/15/18/exception-20191111-151856-875.5.txt
@nfranke
Copy link
Author

nfranke commented Nov 11, 2019

Making TopicMessage implement Serializable along with ChatMessage seems to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant