Hi Olivier,
the error is quite strange:
you're entering the else block at
https://github.com/geoserver/geoserver/blob/2.12.2/src/community/geofence/src/main/java/org/geoserver/geofence/GeofenceAccessManager.java#L501
while your SecuredFeatureTypeInfo should be handled at
https://github.com/geoserver/geoserver/blob/2.12.2/src/community/geofence/src/main/java/org/geoserver/geofence/GeofenceAccessManager.java#L482
Such a class mismatch can happen when different versions are mixed.
Please make sure the plugin version matches your geoserver version.
Cheers,
Emanuele
2018-02-27 23:43 GMT+01:00 Olivier Dalang <olivier.dal...@gmail.com>:
> Dear all,
>
> Layer groups created using the REST API cause a "Don't know how to handle
> resource" exception (full stack below [1]) when I try to show them using
> WMS or when accessing the layergroup admin page. Everything works well when
> created manually through the admin.
>
> I need to restart Geoserver so that it works again. I'm using Geoserver
> 2.12.2 with Geofence (which I believe is involved), authkey and printing
> extensions.
>
> And idea what could be happening there ? To me it looks like some Geofence
> cache isn't (re)generated properly after the API call.
>
> Should I open a ticket somewhere, or is there a way to invalidate/refresh
> the Geofence cache?
>
> Thanks !!
>
> Olivier
>
>
> [1]
> java.lang.IllegalArgumentException: Don't know how to handle resource
> SecuredFeatureTypeInfo[FeatureTypeInfoImpl[offline_osm_multipolygons]]
> at org.geoserver.geofence.GeofenceAccessManager.buildAccessLimi
> ts(GeofenceAccessManager.java:501)
> at org.geoserver.geofence.GeofenceAccessManager.getAccessLimits
> (GeofenceAccessManager.java:306)
> at org.geoserver.geofence.GeofenceAccessManager.getAccessLimits
> (GeofenceAccessManager.java:291)
> at org.geoserver.security.ResourceAccessManager.getAccessLimits
> (ResourceAccessManager.java:50)
> at org.geoserver.security.ResourceAccessManagerWrapper.getAcces
> sLimits(ResourceAccessManagerWrapper.java:219)
> at org.geoserver.security.CatalogFilterAccessManager.getAccessL
> imits(CatalogFilterAccessManager.java:64)
> at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(
> SecureCatalogImpl.java:861)
> at org.geoserver.security.SecureCatalogImpl.buildWrapperPolicy(
> SecureCatalogImpl.java:820)
> at org.geoserver.security.SecureCatalogImpl.checkAccess(SecureC
> atalogImpl.java:614)
> at org.geoserver.security.SecureCatalogImpl.checkAccess(SecureC
> atalogImpl.java:503)
> at org.geoserver.security.SecureCatalogImpl.checkAccess(SecureC
> atalogImpl.java:662)
> at org.geoserver.security.SecureCatalogImpl.checkAccess(SecureC
> atalogImpl.java:494)
> at org.geoserver.security.SecureCatalogImpl.getLayerGroupByName
> (SecureCatalogImpl.java:310)
> at org.geoserver.catalog.impl.AbstractFilteredCatalog.getLayerG
> roupByName(AbstractFilteredCatalog.java:237)
> at org.geoserver.catalog.impl.AbstractCatalogDecorator.getLayer
> GroupByName(AbstractCatalogDecorator.java:474)
> at org.geoserver.catalog.impl.LocalWorkspaceCatalog.getLayerGro
> upByName(LocalWorkspaceCatalog.java:186)
> at org.geoserver.wms.WMS.getLayerGroupByName(WMS.java:276)
> at org.geoserver.wms.map.GetMapKvpRequestReader.parseLayers(Get
> MapKvpRequestReader.java:1148)
> at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpR
> equestReader.java:237)
> at org.geoserver.wms.map.GetMapKvpRequestReader.read(GetMapKvpR
> equestReader.java:87)
> at org.geoserver.ows.Dispatcher.parseRequestKVP(Dispatcher.java
> :1521)
> at org.geoserver.ows.Dispatcher.dispatch(Dispatcher.java:680)
> at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatche
> r.java:258)
> at org.springframework.web.servlet.mvc.AbstractController.handl
> eRequest(AbstractController.java:174)
> at org.springframework.web.servlet.mvc.SimpleControllerHandlerA
> dapter.handle(SimpleControllerHandlerAdapter.java:50)
> at org.springframework.web.servlet.DispatcherServlet.doDispatch
> (DispatcherServlet.java:963)
> at org.springframework.web.servlet.DispatcherServlet.doService(
> DispatcherServlet.java:897)
> at org.springframework.web.servlet.FrameworkServlet.processRequ
> est(FrameworkServlet.java:970)
> at org.springframework.web.servlet.FrameworkServlet.doGet(
> FrameworkServlet.java:861)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> at org.springframework.web.servlet.FrameworkServlet.service(
> FrameworkServlet.java:846)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder
> .java:808)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1669)
> at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(Thr
> eadLocalsCleanupFilter.java:28)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(
> SpringDelegatingFilter.java:75)
> at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFi
> lter.java:71)
> at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(
> SpringDelegatingFilter.java:71)
> at org.geoserver.filters.SpringDelegatingFilter.doFilter(Spring
> DelegatingFilter.java:46)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.platform.AdvancedDispatchFilter.doFilter(Advan
> cedDispatchFilter.java:50)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:316)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:69)
> at org.springframework.security.web.access.intercept.FilterSecu
> rityInterceptor.invoke(FilterSecurityInterceptor.java:126)
> at org.springframework.security.web.access.intercept.FilterSecu
> rityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:73)
> at org.geoserver.security.filter.GeoServerCompositeFilter.doFil
> ter(GeoServerCompositeFilter.java:92)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:69)
> at org.springframework.security.web.access.ExceptionTranslation
> Filter.doFilter(ExceptionTranslationFilter.java:114)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:73)
> at org.geoserver.security.filter.GeoServerCompositeFilter.doFil
> ter(GeoServerCompositeFilter.java:92)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.geoserver.security.filter.GeoServerAnonymousAuthenticati
> onFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:69)
> at org.springframework.security.web.authentication.www.BasicAut
> henticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter
> (OncePerRequestFilter.java:107)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:73)
> at org.geoserver.security.filter.GeoServerCompositeFilter.doFil
> ter(GeoServerCompositeFilter.java:92)
> at org.geoserver.security.filter.GeoServerBasicAuthenticationFi
> lter.doFilter(GeoServerBasicAuthenticationFilter.java:84)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.geoserver.security.GeoServerAuthenticationKeyFilter.
> doFilter(GeoServerAuthenticationKeyFilter.java:104)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:69)
> at org.springframework.security.web.context.SecurityContextPers
> istenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
> at org.geoserver.security.filter.GeoServerSecurityContextPersis
> tenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
> at org.geoserver.security.filter.GeoServerCompositeFilter$Neste
> dFilterChain.doFilter(GeoServerCompositeFilter.java:73)
> at org.geoserver.security.filter.GeoServerCompositeFilter.doFil
> ter(GeoServerCompositeFilter.java:92)
> at org.springframework.security.web.FilterChainProxy$VirtualFil
> terChain.doFilter(FilterChainProxy.java:330)
> at org.springframework.security.web.FilterChainProxy.doFilterIn
> ternal(FilterChainProxy.java:213)
> at org.springframework.security.web.FilterChainProxy.doFilter(F
> ilterChainProxy.java:176)
> at org.geoserver.security.GeoServerSecurityFilterChainProxy.
> doFilter(GeoServerSecurityFilterChainProxy.java:152)
> at org.springframework.web.filter.DelegatingFilterProxy.invokeD
> elegate(DelegatingFilterProxy.java:346)
> at org.springframework.web.filter.DelegatingFilterProxy.doFilte
> r(DelegatingFilterProxy.java:262)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.
> java:88)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOpt
> ionsFilter.java:89)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDeb
> ugFilter.java:48)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilt
> er.java:44)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.springframework.web.filter.CharacterEncodingFilter.doFil
> terInternal(CharacterEncodingFilter.java:197)
> at org.springframework.web.filter.OncePerRequestFilter.doFilter
> (OncePerRequestFilter.java:107)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilte
> r(ServletHandler.java:1652)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHan
> dler.java:585)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(Scoped
> Handler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHa
> ndler.java:577)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(
> SessionHandler.java:223)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
> ContextHandler.java:1127)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHand
> ler.java:515)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(
> SessionHandler.java:185)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(
> ContextHandler.java:1061)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(Scoped
> Handler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.ha
> ndle(ContextHandlerCollection.java:215)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(
> HandlerCollection.java:110)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(Handl
> erWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.
> java:310)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConne
> ction.java:257)
> at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnec
> tion.java:540)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Queued
> ThreadPool.java:635)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedT
> hreadPool.java:555)
> at java.lang.Thread.run(Thread.java:748)
>
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/comm/
> userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-
> requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
--
Regards,
Emanuele Tajariol
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Ing. Emanuele Tajariol
Technical Lead
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users