2

I have installed GeoServer with Tomcat (both the most recent version). It worked fine for a couple of weeks, but now there seems to be something wrong with the styling of the layers.

In the layer preview menu most of my layers won't preview as OpenLayers anymore. They get downloaded immediately. The files contains the following text:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> 
<ServiceExceptionReport version="1.1.1" >   
    <ServiceException>
      java.lang.NullPointerException 
    </ServiceException>
</ServiceExceptionReport>

When I go to the styles menu everything works fine, except for the publishing tab. Then I get an error. (I pasted the code from this error below.) I get almost the same error when I go to Tile Layers. (Again a WicketRuntimeException and a NullPointerException.)

I just added a new layer and this one does preview with OpenLayers, but the publishing tab in the styles menu is still crashing. I would like to make everything work again. I read that I should go to server status and then reload. I did this and it did not work.

Anyone have an idea of how to solve this problem?

(Below the code that i mentioned above>)

An error occurred while loading the page
Oops, something went wrong...
Sorry, something unexpected happened on the server.
org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [OddEvenItem [Component id = 2]]
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1848)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:143)
    at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:115)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:274)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
    at org.apache.wicket.Component.prepareForRender(Component.java:2275)
    at org.apache.wicket.page.XmlPartialPageUpdate.writeComponent(XmlPartialPageUpdate.java:98)
    at org.apache.wicket.page.PartialPageUpdate.writeComponents(PartialPageUpdate.java:248)
    at org.apache.wicket.page.PartialPageUpdate.writeTo(PartialPageUpdate.java:161)
    at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:358)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
    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:660)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:157)
    at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174)
    at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:50)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:352)
    at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:171)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:26)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:69)
    at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:73)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:66)
    at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:41)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:37)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:51)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
    at org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:112)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:158)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:74)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:141)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:90)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:79)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.geoserver.wms.web.data.LayerAssociationPanel.usesEditedStyle(LayerAssociationPanel.java:84)
    at org.geoserver.wms.web.data.LayerAssociationPanel$LayerProvider$4.getPropertyValue(LayerAssociationPanel.java:72)
    at org.geoserver.wms.web.data.LayerAssociationPanel$LayerProvider$4.getPropertyValue(LayerAssociationPanel.java:67)
    at org.geoserver.wms.web.data.LayerAssociationPanel$1.getComponentForProperty(LayerAssociationPanel.java:110)
    at org.geoserver.web.wicket.GeoServerTablePanel$5.populateItem(GeoServerTablePanel.java:238)
    at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:523)
    at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:124)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1836)
    ... 148 more
8
  • is it working for any layer/style? (I am thinking at the default topp.states or similar)
    – JGH
    Commented Nov 21, 2018 at 13:41
  • When a tab is throwing an error like that try the "go back" button of your browser. There are sometimes 2 consecutive error pages...
    – JGH
    Commented Nov 21, 2018 at 13:42
  • I had a similar issue a while ago, and found out that for some reasons (couldn't reproduce, so I am not sure of what caused it, but it occurred twice already), ALL layer ID had been renamed and wrongfully re-assigned everywhere. I'm glad I had a recent backup (to find all the config differences... and to recover from this mess)
    – JGH
    Commented Nov 21, 2018 at 13:44
  • When I go to the styles menu > publishing tab and when I go to the tiles layer menu then the error (the error shown below in my question) is always shown
    – Trisha
    Commented Nov 21, 2018 at 14:36
  • I haven't got a good recent back-up, but as soon as this is fixed I will make one! I do hope GeoServer hasn't made to big of a mess of everything. (Or maybe I did..)
    – Trisha
    Commented Nov 21, 2018 at 14:39

2 Answers 2

1

One of the reason it could happen due to the tile layer cache(geowebcache) gets deleted/corrupted. To make it work, I moved the gwc-layers from data directory to some other place and restarted tomcat. Server was throwing exceptions, then I re-moved the gwc-layers directory into the data directory with proper permissions and restarted. Then error was gone and it was showing layers but we needed to seed it again manually.

0

I found the solution. Don't know why it worked, but I had to save all the corrupt layers again and now they work and the Tile Caching menu is also working again.

Not the answer you're looking for? Browse other questions tagged or ask your own question.