[Geoserver-users] Error calling getLayerStyles()

Geoserver 2.8.1

Hi all,

I am migrating data from Geoserver 2.2.5 to Geoserver 2.8.1. There is some modification done to the layergroups, datastore, and featuretype xml files to make the compliant with 2.8.1. After the data is migrated into 2.8.1, I can boot up geoserver and login to the web gui. I have one layer group, and when I click on it, the page fails to load and I am presented with the stack trace below. All the necessary styles are present in the styles directory, however. Can anyone help me figure out why the current styles of layer are not available?

org.apache.wicket.WicketRuntimeException: Error calling method: public java.util.Set org.geoserver.gwc.layer.StyleParameterFilter.getLayerStyles() on object: StyleParameterFilter[allowedStyles=,availableStyles=,defaultStyle=,key=STYLES,defaultValue=] at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1075) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.getValue(PropertyResolver.java:596) at org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:95) at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:117) at org.geoserver.gwc.web.layer.StyleParameterFilterSubform$SetAsListModel.(StyleParameterFilterSubform.java:47) at org.geoserver.gwc.web.layer.StyleParameterFilterSubform.(StyleParameterFilterSubform.java:203) at org.geoserver.gwc.web.layer.ParameterFilterEditor.getSubform(ParameterFilterEditor.java:343) at org.geoserver.gwc.web.layer.ParameterFilterEditor.access$000(ParameterFilterEditor.java:59) at org.geoserver.gwc.web.layer.ParameterFilterEditor$1.populateItem(ParameterFilterEditor.java:187) at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562) at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131) at org.geoserver.gwc.web.layer.ParameterFilterEditor$1.onBeforeRender(ParameterFilterEditor.java:173) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:2056) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.geoserver.gwc.web.layer.ParameterFilterEditor.onBeforeRender(ParameterFilterEditor.java:393) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.geoserver.gwc.web.layer.GeoServerTileLayerEditor.onBeforeRender(GeoServerTileLayerEditor.java:561) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:151) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:2056) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753) at org.apache.wicket.Component.onBeforeRender(Component.java:3946) at org.apache.wicket.Page.onBeforeRender(Page.java:1531) at org.apache.wicket.Component.internalBeforeRender(Component.java:1071) at org.apache.wicket.Component.beforeRender(Component.java:1105) at org.apache.wicket.Component.prepareForRender(Component.java:2292) at org.apache.wicket.Page.prepareForRender(Page.java:1521) at org.apache.wicket.Component.prepareForRender(Component.java:2329) at org.apache.wicket.Page.renderPage(Page.java:892) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) 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.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) 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:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 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:323) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182) 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:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69) at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146) 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:323) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 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:323) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173) at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:87) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209) at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) Caused by: java.lang.IllegalStateException: Current styles of layer not available. at com.google.common.base.Preconditions.checkState(Preconditions.java:176) at org.geoserver.gwc.layer.StyleParameterFilter.checkInitialized(StyleParameterFilter.java:59) at org.geoserver.gwc.layer.StyleParameterFilter.getLayerStyles(StyleParameterFilter.java:152) 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:497) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1071) … 167 more

Thanks,

Michael Neynens

On Fri, Mar 18, 2016 at 11:23 PM, Michael Neynens <
mneynens@anonymised.com> wrote:

Geoserver 2.8.1

Hi all,

I am migrating data from Geoserver 2.2.5 to Geoserver 2.8.1. There is some
modification done to the layergroups, datastore, and featuretype xml files
to make the compliant with 2.8.1.

Trying to make sure I understand this sentence... are you saying you
performed some manual/scripted modification to the xml files to make them
compliant with 2.8.x?
That should not be necessary, at least in theory, GeoServer should be able
to pick up an old configuration, and upgrade it to the new version when you
save that
particular layer or group.

The error you're seeing seems to be related to GWC trying to extract the
styles from a layer in which none are found... maybe the layer in question
has dangling references to non existing styles?
Unfortunately the logs do not seem to provide a clue as to which layer that
is...

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------