Uploaded image for project: 'GeoServer'
  1. GEOS-7740

JDBCStore incompatible with Hazelcast Clustering extension

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.9.1
    • Fix Version/s: 2.9.2, 2.10-beta
    • Component/s: JDBCStore
    • Labels:
      None

      Description

      With both jdbcstore and hz-cluster installed, I am getting some critical failures revolving around com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable serializer for class org.geoserver.platform.resource.ResourceNotification

      If I try to update a Resource in JDBCStore using a PUT, I get a HTTP 500 response, but the resource gets updated successfully. Looking in the logs, I see the following error:

      com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable serializer for class org.geoserver.platform.resource.ResourceNotification
              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.geoserver.cluster.hazelcast.HzResourceNotificationDispatcher.changed(HzResourceNotificationDispatcher.java:51)
              at org.geoserver.jdbcstore.JDBCResourceStore$JDBCResource$CachingOutputStreamWrapper.close(JDBCResourceStore.java:364)
              at org.geoserver.rest.util.IOUtils.copyStream(IOUtils.java:688)
              at org.geoserver.rest.util.IOUtils.copyStream(IOUtils.java:654)
              at org.geoserver.rest.resources.ResourceResource.handlePut(ResourceResource.java:395)
              at org.restlet.Finder.handle(Finder.java:298)
              at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet.java:38)
              at org.restlet.Filter.doHandle(Filter.java:105)
              at org.restlet.Filter.handle(Filter.java:134)
              at org.restlet.Router.handle(Router.java:444)
              at org.geoserver.rest.RESTDispatcher$1.handle(RESTDispatcher.java:205)
              at com.noelios.restlet.ext.servlet.ServletConverter.service(ServletConverter.java:129)
              at org.geoserver.rest.RESTDispatcher.handleRequestInternal(RESTDispatcher.java:87)
              at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
              at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
              at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:881)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:651)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
              at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at org.geoserver.flow.controller.IpBlacklistFilter.doFilter(IpBlacklistFilter.java:94)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at org.geoserver.flow.ControlFlowCallback.doFilter(ControlFlowCallback.java:203)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              ...
      

      If I try to edit a layer and enable the UTFGrid format on the Tile Caching tab, when I try and save the layer the save fails and I get the following error:

      org.geoserver.catalog.CatalogException: Error persisting FeatureTypeInfoImpl[states] to workspaces/usa/states_shp/states/featuretype.xml
              at org.geoserver.config.GeoServerPersister.persist(GeoServerPersister.java:733)
              at org.geoserver.config.GeoServerPersister.modifyFeatureType(GeoServerPersister.java:463)
              at org.geoserver.config.GeoServerPersister.handlePostModifyEvent(GeoServerPersister.java:237)
              at org.geoserver.catalog.impl.CatalogImpl.event(CatalogImpl.java:1504)
              at org.geoserver.catalog.impl.CatalogImpl.firePostModified(CatalogImpl.java:1481)
              at org.geoserver.catalog.impl.AbstractCatalogFacade.afterSaved(AbstractCatalogFacade.java:104)
              at org.geoserver.catalog.impl.AbstractCatalogFacade.saved(AbstractCatalogFacade.java:68)
              at org.geoserver.catalog.impl.DefaultCatalogFacade.save(DefaultCatalogFacade.java:260)
              at org.geoserver.catalog.impl.CatalogImpl.save(CatalogImpl.java:430)
              at org.geoserver.security.SecureCatalogImpl.save(SecureCatalogImpl.java:1332)
              at org.geoserver.catalog.impl.AbstractFilteredCatalog.save(AbstractFilteredCatalog.java:756)
              at org.geoserver.catalog.impl.AbstractCatalogDecorator.save(AbstractCatalogDecorator.java:212)
              at org.geoserver.web.data.resource.ResourceConfigurationPage.doSaveInternal(ResourceConfigurationPage.java:237)
              at org.geoserver.web.publish.PublishedConfigurationPage.doSave(PublishedConfigurationPage.java:255)
              at org.geoserver.web.publish.PublishedConfigurationPage$6.onSubmit(PublishedConfigurationPage.java:241)
              at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1307)
              at org.apache.wicket.markup.html.form.Form.process(Form.java:974)
              at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:795)
              at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:708)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
              at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:216)
              at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:241)
              at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
              at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:865)
              at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
              at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
              at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
              at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
              at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
              at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
              at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:159)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)
              at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)
              at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
              at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
              at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
              at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
              at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
              at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
              at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at org.geoserver.flow.controller.IpBlacklistFilter.doFilter(IpBlacklistFilter.java:94)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at org.geoserver.flow.ControlFlowCallback.doFilter(ControlFlowCallback.java:203)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at com.boundlessgeo.geoserver.AppAuthFilter.doFilter(AppAuthFilter.java:111)
              at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
              at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
              at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
              at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
              at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
              at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
              at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
              at org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
              at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
              at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
              at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
              at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
              at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
              at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
              at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
              at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:152)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:436)
              at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:177)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable serializer for class org.geoserver.platform.resource.ResourceNotification
              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.geoserver.cluster.hazelcast.HzResourceNotificationDispatcher.changed(HzResourceNotificationDispatcher.java:51)
              at org.geoserver.jdbcstore.JDBCResourceStore$JDBCResource.out(JDBCResourceStore.java:181)
              at org.geoserver.data.util.IOUtils.xStreamPersist(IOUtils.java:450)
              at org.geoserver.config.GeoServerPersister.persist(GeoServerPersister.java:726)
              ... 143 more
      

      In both these cases, it looks like Hazelcast is trying (and failing) to serialize org.geoserver.platform.resource.ResourceNotification (which is presumably being produced by jdbcstore), causing an exception. Given the mixed behavior I am seeing (sometimes the action works despite the exception), it seems like GeoServer is not expecting a exception to be thrown from the places this exception is being thrown.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tbarsballe Torben Barsballe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: