Hi Carlo, Jody,
Isolated workspaces were introduced to allow multiple workspaces (end-
points) to be associated whit the same name-space, as Jody mentioned,
this is particular relevant and useful for WFS.
If an workspace its declared as isolated, then its content can only be
acceded in the context of that workspace.
GWC services, like WMTS and TMS, try to look up the cached layers by
their ID, but if the workspace they belong too its isolated, that
lookup will only succeed if done in the context of the isolated
workspace virtual end-point.
Example of global access and an workspace virtual en-point access (in
that order):
 * 
http://localhost:8080/geoserver/gwc/service/wmts?layer=topp:states&style=&tilematrixset=EPSG:4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:4326:5&TileCol=15&TileRow=8
 * 
http://localhost:8080/geoserver/topp/gwc/service/wmts?layer=states&style=&tilematrixset=EPSG:4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:4326:5&TileCol=15&TileRow=8
This where the access of the layer its checked [1] by the isolated
workspaces code. 
I identified the following issue; Looks like both WMTS and TDMS when
building their capabilities document get all the layers by their ID's
and assume that they should be available, if not then its because the
GWC configuration got out of sync.
Their code needs to be updated and recognize the situation where
certain layers are not available because they belong to an isolated
workspace and the GetCapabilities request being answer was issued
globally or in a different workspace end-point.
Hope this helps,
Nuno Oliveira
[1] https://github.com/geoserver/geoserver/blob/732e7b4bfacdf7fe7180c3d
7ba2868ea3650c24c/src/main/src/main/java/org/geoserver/catalog/impl/Iso
latedCatalogFacade.java#L188-L190
On Thu, 2020-04-30 at 16:34 -0700, Jody Garnett wrote:
> I am sharing some initial thoughts, just to share my understanding:
> 
> - GWC does not have a built-in concept of namespace, if you look you
> can see it generates something like prefix_layer_name which works
> well in many cases :)
> - XML namespaces (and prefix) is used to make sure we are specific
> when talking about what a data means, allowing us to locate the
> schema used for validation
> - isolated namespaces are intended to be used when the schema is
> defined externally, and when there is no "global service" so the
> content is only available via a workspace specific WFS endpoint
> 
> So I think this setup, has been focused on publishing XML content
> without conflict, and has not deeply considered WCS/WMS (which is
> possible) or WMTS (which may not even offer a virtual service for
> unambiguous access). Right now we "run" an emended GWC for publishing
> tileset, think to support your use case we would need to run one per
> virtual workspace. So possible but not included in the present
> design.
> 
> I did not work directly on this integration so I would need to dive
> into the code to confirm the above speculation.
> --
> Jody Garnett
> 
> 
> On Wed, 29 Apr 2020 at 23:31, carlo cancellieri 
> il.com> wrote:
> > Jody,
> > 
> > > Do you have a stack trace or anything else to go on Carlo? I have
> > > not used isolated workspaces yet
> > > 
> > Yep, fwding the message may have hidden the end of the mail, please
> > see below.
> > 
> > > myself, does it work if the workspace is not isolated?
> > > 
> > Yes, disabling isolation ‘solved’
> > 
> > Carlo
> > 
> > > --
> > > Jody Garnett
> > > 
> > > 
> > > On Wed, 29 Apr 2020 at 13:13, carlo cancellieri 
> > > @gmail.com> wrote:
> > > > 
> > > > Dear List,
> > > >  I'm trying to use extensively isolated workspace and I've
> > > > found a possible issue which I'm going to share with you before
> > > > we open a ticket:
> > > > Steps:
> > > > Use geoserver 2.17.0
> > > > create an isolated workspace
> > > > add a jndi store
> > > > load a layer (I'm using gadm level0)
> > > > install VectorTyle extension
> > > > enable the vector tyle 'format' over that layer
> > > > 
> > > > now I'm having problem to use embedded GWC, fe I'm not able to
> > > > see the:
> > > > https://xxxxxxxxxx/xxxxx/gwc/service/tms/1.0.0
> > > >   
> > > > trying to retrieve that or other requests I got errors like:
> > > > DEBUG [util.ResponseUtils] - Could not locate a layer or layer
> > > > group with id LayerInfoImpl-3bba14cf:1711882e14e:-11bb within
> > > > GeoServer configuration, the GWC configuration seems to be out
> > > > of synch
> > > > 2020-04-29 16:37:14,813 ERROR
> > > > [geowebcache.GeoWebCacheDispatcher] - Request failed
> > > > java.lang.IllegalStateException: Could not locate a layer or
> > > > layer group with id LayerInfoImpl-3bba14cf:1711882e14e:-11bb
> > > > within GeoServer configuration, the GWC configuration seems to
> > > > be out of synch
> > > >         at
> > > > org.geoserver.gwc.layer.GeoServerTileLayer.lambda$getPublishedI
> > > > nfo$0(GeoServerTileLayer.java:396)
> > > >         at
> > > > java.base/java.util.concurrent.atomic.AtomicReference.accumulat
> > > > eAndGet(AtomicReference.java:263)
> > > >         at
> > > > org.geoserver.gwc.layer.GeoServerTileLayer.getPublishedInfo(Geo
> > > > ServerTileLayer.java:386)
> > > >         at
> > > > org.geoserver.gwc.layer.GeoServerTileLayer.isEnabled(GeoServerT
> > > > ileLayer.java:307)
> > > >         at
> > > > org.geowebcache.service.tms.TMSDocumentFactory.getTileMapServic
> > > > eDoc(TMSDocumentFactory.java:138)
> > > >         at
> > > > org.geowebcache.service.tms.TMSService.handleRequest(TMSService
> > > > .java:251)
> > > >         at
> > > > org.geowebcache.service.tms.TMSService$$FastClassBySpringCGLIB$
> > > > $34b3521.invoke()
> > > >         at
> > > > org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.
> > > > java:218)
> > > >         at
> > > > org.springframework.aop.framework.CglibAopProxy$CglibMethodInvo
> > > > cation.invokeJoinpoint(CglibAopProxy.java:750)
> > > >         at
> > > > org.springframework.aop.framework.ReflectiveMethodInvocation.pr
> > > > oceed(ReflectiveMethodInvocation.java:163)
> > > >         at
> > > > org.geoserver.gwc.config.GWCServiceEnablementInterceptor.invoke
> > > > (GWCServiceEnablementInterceptor.java:58)
> > > >         at
> > > > org.springframework.aop.framework.ReflectiveMethodInvocation.pr
> > > > oceed(ReflectiveMethodInvocation.java:186)
> > > >         at
> > > > org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedI
> > > > nterceptor.intercept(CglibAopProxy.java:689)
> > > >         at
> > > > org.geowebcache.service.tms.TMSService$$EnhancerBySpringCGLIB$$
> > > > 136fc4fa.handleRequest()
> > > >         at
> > > > org.geowebcache.GeoWebCacheDispatcher.handleServiceRequest(GeoW
> > > > ebCacheDispatcher.java:406)
> > > >         at
> > > > org.geowebcache.GeoWebCacheDispatcher.handleRequestInternal(Geo
> > > > WebCacheDispatcher.java:268)
> > > >         at
> > > > org.springframework.web.servlet.mvc.AbstractController.handleRe
> > > > quest(AbstractController.java:177)
> > > >         at
> > > > org.geoserver.gwc.dispatch.GwcServiceProxy.dispatch(GwcServiceP
> > > > roxy.java:80)
> > > >         at
> > > > jdk.internal.reflect.GeneratedMethodAccessor853.invoke(Unknown
> > > > Source)
> > > >         at
> > > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.inv
> > > > oke(DelegatingMethodAccessorImpl.java:43)
> > > >         at
> > > > java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > ...
> > > > 
> > > > Note that I've also deleted that file multiple times recreating
> > > > it with the UI with no success.
> > > > 
> > > > It started working once workspace isolation has been disabled.
> > > > 
> > > > Could you confirm? May I need to open a ticket?
> > > > 
> > > > Thanks
> > > > C.
> > > > 
> > > > -- 
> > > > Mr. Carlo Cancellieri
> > > > skype: ccancellieri
> > > > Twitter: @cancellieric
> > > > LinkedIn: http://it.linkedin.com/in/ccancellieri/
> > > > 
> > > > _______________________________________________
> > > > 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: ht
> > > > tp://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
> > > > 
> > -- 
> > Mr. Carlo Cancellieri
> > skype: ccancellieri
> > Twitter: @cancellieric
> > LinkedIn: http://it.linkedin.com/in/ccancellieri/
> > 
> _______________________________________________
> 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://w
> ww.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines: http://geoserver.org/co
> mm/userlist-guidelines.html
> 
> If you want to request a feature or an improvement, also see this: ht
> tps://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,
Nuno Oliveira
==
GeoServer Professional Services from the
experts! 
Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

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

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

Con riferimento alla normativa sul trattamento dei dati 
personali (Reg. UE 2016/679 - Regolamento generale sulla 
protezione dei dati “GDPR”), si precisa che ogni 
circostanza inerente alla presente email (il suo contenuto, 
gli eventuali allegati, etc.) è un dato la cui conoscenza 
è riservata al/i solo/i destinatario/i indicati dallo 
scrivente. Se il messaggio Le è giunto per errore, è 
tenuta/o a cancellarlo, ogni altra operazione è illecita. 
Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to 
which it is addressed and may contain information that 
is privileged, confidential or otherwise protected from 
disclosure. We remind that - as provided by European 
Regulation 2016/679 “GDPR” - copying, dissemination or 
use of this e-mail or the information herein by anyone 
other than the intended recipient is prohibited. If you 
have received this email by mistake, please notify 
us immediately by telephone or e-mail.
_______________________________________________
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

Reply via email to