Hello again, I'm still struggling with the combination of GeoFence and GeoWebCache. As described below, after upgrading to V2.21.2 or above the paths to access GeoWebCache changed. Now when I'm trying to seed the tiles for a layer I'm getting the error 'String index out of range: -1' (see also stack trace below). This can easily be reproduced by:
* Install GeoServer with the default data dir (I used the Windows installer for V2.22.0). * Log into the web interface and then open the URL http://localhost:8080/geoserver/gwc/rest/seed/topp:tasmania_cities. Notice that the page loads correctly, especially the GeoServer logo image (http://localhost:8080/geoserver/gwc/rest/web/geowebcache_logo.png) is displayed. * Add the GeoFence Server Plugin. * Add the text 'gwc.context.suffix=gwc' to the file '<data dir>/geofence/geofence-server.properties'. * Restart GeoServer and re-login into the Admin UI. * Access http://localhost:8080/geoserver/gwc/rest/seed/topp:tasmania_cities => Leads to 'HTTP ERROR 404 Not Found'. * Remmove 'gwc' from the URL path, i.e. http://localhost:8080/geoserver/rest/seed/topp:tasmania_cities => now the page loads but the logo image is missing. * When trying to open the logo image http://localhost:8080/geoserver/rest/web/geowebcache_logo.png directly, the error message 'String index out of range: -1' is displayed instead. The same error is written to the log file when submitting the seed form. Before filing a bug report I wanted to check if someone else can reproduce the problem. Is there anybody that can confirm this behaviour? Thank you and best regards Daniel STACK TRACE OF THE ERROR: ========================= 11:40:03 ERROR [geoserver.rest] - String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.base/java.lang.String.substring(Unknown Source) at org.geowebcache.rest.controller.ByteStreamController.getFileName(ByteStreamController.java:85) at org.geowebcache.rest.controller.ByteStreamController.doGet(ByteStreamController.java:94) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1043) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at javax.servlet.http.HttpServlet.service(HttpServlet.java:670) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:779) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:73) at org.geoserver.ows.HTTPHeadersCollector.doFilter(HTTPHeadersCollector.java:48) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:194) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:39) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71) 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:75) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:75) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:75) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92) at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerPreAuthenticationFilter.doFilter(GeoServerPreAuthenticationFilter.java:71) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:71) 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:75) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:142) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:48) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:891) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1784) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Unknown Source) From: Daniel Calliess <geoserver-us...@flansch.at> Sent: Dienstag, 7. Februar 2023 15:16 To: 'GeoServer Users' <geoserver-users@lists.sourceforge.net> Subject: [Geoserver-users] FW: GeoFence and GeoWebCache incompatibility Hi all! I did some more tests and found out, that GeoWebCache is also reachable on the wrong URL when I switch my Tomcat-based setup over to the default data dir delivered with the installer package. And I tried the current (2.22.1) Windows installer and can also reproduce the issue. Directly after installing with default settings, the URL /geoserver redirects to /geoserver/web (as it should). When I then add the GeoFence Server plugin and add the text gwc.context.suffix=gwc to the file geofence-server.properties, the URL /geoserver shows the Welcome to GeoWebCache version 1.21.3 page, which normally should be found at /geoserver/gwc. Can anyone else reproduce the issue or is there just something I am missing in my environment? Thank you and best regards Daniel From: Daniel Calliess <geoserver-us...@flansch.at<mailto:geoserver-us...@flansch.at>> Sent: Montag, 30. Jänner 2023 11:38 To: 'Andrea Aime' <andrea.a...@geosolutionsgroup.com<mailto:andrea.a...@geosolutionsgroup.com>> Cc: 'GeoServer Users' <geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>> Subject: Re: [Geoserver-users] GeoFence and GeoWebCache incompatibility Hi Andrea, unfortunately the problem came back after upgrading my Windows/Tomcat/War-file-based installation to 2.22.0. GeoWebCache again is reachable at /geoserver instead of /geoserver/gwc although I placed the text gwc.context.suffix=gwc into the file geofence-server.properties. The GeoServer log file doesn't show anything special. I did some tests that indicate that the problem was introduced after upgrading from 2.21.1 to 2.21.2. Could you please have a look what's going wrong here. Thank you and best regards Daniel From: Daniel Calliess <geoserver-us...@flansch.at<mailto:geoserver-us...@flansch.at>> Sent: Dienstag, 16. August 2022 10:27 To: 'Andrea Aime' <andrea.a...@geosolutionsgroup.com<mailto:andrea.a...@geosolutionsgroup.com>> Cc: 'GeoServer Users' <geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>> Subject: Re: [Geoserver-users] GeoFence and GeoWebCache incompatibility Hi Andrea, thank you for this hint that helped me solve my problem. Somehow Google hid this document from me ;-) Regards Daniel From: Andrea Aime <andrea.a...@geosolutionsgroup.com<mailto:andrea.a...@geosolutionsgroup.com>> Sent: Donnerstag, 14. Juli 2022 14:44 To: Calliess Daniel Ing. <daniel.calli...@stadt-salzburg.at<mailto:daniel.calli...@stadt-salzburg.at>> Cc: GeoServer Users <geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>> Subject: Re: [Geoserver-users] GeoFence and GeoWebCache incompatibility See https://github.com/geoserver/geofence/issues/102 Cheers Andrea On Mon, Jul 4, 2022 at 12:33 PM Calliess Daniel Ing. <daniel.calli...@stadt-salzburg.at<mailto:daniel.calli...@stadt-salzburg.at>> wrote: Hi, at the moment I'm struggling with the problem, that after installing GeoFence, the URLs of the interal GeoWebCache are mixed up. Before installing the plugin, GeoWebCache is available at http://localhost:8080/geoserver/gwc/ and after installing the plugin at http://localhost:8080/geoserver/ The logfile shows a single entry after accessing the original URL: 04 018 12:18:42 WARN [servlet.PageNotFound] - No mapping for GET /geoserver/gwc When I accecss a seeding URL and remove the trailing "gwc/", than seeding works as expected, so GeoWebCache seems to be healthy, just the URLs have been changed. I already did a test installation with a new data dir, but the error also happens there. Currently I'm running version GeoServer 2.21.0, but maybe the error already existed in a previous version. Does anyone have an idea what's going on here? Thank you and best regards Daniel _______________________________________________ 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<mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions Group phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 https://www.geosolutionsgroup.com/ 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