Thanks for your input Roar. It turns out that it seems to be a problem with using a view that has a timestamp field that is created from a date. If I just use the date field it works fine.
From: Roar Brænden <roar.brenden...@gmail.com> Sent: Tuesday, 12 October 2021 7:25 PM To: Humphries, Graham <graham.humphr...@stategrowth.tas.gov.au> Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] GetCapabilities throws error when Time Dimension is enabled Hi, The problem might be that you have a Null value within that time field. To avoid the exception, you could try to use a different Presentation mode. To change it you must go into Geoserver for the given layer, and choose the tab Dimensions. For Presentation you could choose List to see if that helps. If the problem is that you have a Null value, I think you could open a ticket in the Issue tracker. Best regards, Roar Brænden 11. okt. 2021 kl. 07:00 skrev Humphries, Graham <graham.humphr...@stategrowth.tas.gov.au<mailto:graham.humphr...@stategrowth.tas.gov.au>>: Geoserver config: Tomcat 8.5.60 AdoptOpenJDK 1.8.0_275-b01 Geoserver 2.19.2 I have set up a layer in Geoserver to use the Time Dimension. This layer works well when using in an OpenLayers map project. However when I run the getCapabilities command Geoserver throws an error: <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEMhttps://data.stategrowth.tas.gov.au/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdata.stategrowth.tas.gov.au%2Fgeoserver%2Fschemas%2Fwms%2F1.1.1%2FWMS_exception_1_1_1.dtd&data=04%7C01%7CGraham.Humphries%40stategrowth.tas.gov.au%7Ca7b64374555345c8b4b508d98d59cde8%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637696239126336477%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=LcojHF69GKd7B3gmBuOO8i3HSKcvxaaSH0h7XLdwyQQ%3D&reserved=0>> <ServiceExceptionReport version="1.1.1" > <ServiceException> javax.xml.transform.TransformerException: Translator error Translator error Error occurred trying to write out metadata for layer: CDM_CRASH_MV Failed to handle time attribute for layer Problem visiting CDM_CRASH_MV visiting CDM_CRASH_MV.fid--5032e677_17c6d72938d_-30d:java.lang.NullPointerException Details: org.geoserver.platform.ServiceException: javax.xml.transform.TransformerException: Translator error at org.geoserver.wms.capabilities.GetCapabilitiesResponse.write(GetCapabilitiesResponse.java:106) at org.geoserver.config.CapabilitiesCacheHeadersCallback$RevalidateTagResponse.write(CapabilitiesCacheHeadersCallback.java:134) at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1029) at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:269) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:177) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:52) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040) 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:626) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at javax.servlet.http.HttpServlet.service(HttpServlet.java:733) 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:52) 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:364) at org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:170) 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:70) 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:320) 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:334) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) 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:334) at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:51) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:70) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:215) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) 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.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:81) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) 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: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:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:101) 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:77) 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:47) 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:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) 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:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:616) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1634) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) Caused by: javax.xml.transform.TransformerException: Translator error at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:122) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:100) at org.geoserver.wms.capabilities.GetCapabilitiesResponse.write(GetCapabilitiesResponse.java:104) ... 103 more Caused by: org.geoserver.platform.ServiceException: Error occurred trying to write out metadata for layer: CDM_CRASH_MV at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayerTree(GetCapabilitiesTransformer.java:959) at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayers(GetCapabilitiesTransformer.java:721) at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleCapability(GetCapabilitiesTransformer.java:480) at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.encode(GetCapabilitiesTransformer.java:334) at org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:990) at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:283) at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:118) ... 105 more Caused by: java.lang.RuntimeException: Failed to handle time attribute for layer at org.geoserver.wms.capabilities.DimensionHelper.handleVectorLayerDimensions(DimensionHelper.java:119) at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayer(GetCapabilitiesTransformer.java:1040) at org.geoserver.wms.capabilities.GetCapabilitiesTransformer$CapabilitiesTranslator.handleLayerTree(GetCapabilitiesTransformer.java:946) ... 112 more Caused by: java.io.IOException: Problem visiting CDM_CRASH_MV visiting CDM_CRASH_MV.fid--5032e677_17c6d72938d_-30d:java.lang.NullPointerException at org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:800) at org.geotools.data.store.ContentFeatureCollection.accepts(ContentFeatureCollection.java:124) at org.geoserver.wms.WMS.getFeatureTypeTimes(WMS.java:1331) at org.geoserver.wms.capabilities.DimensionHelper.handleTimeDimensionVector(DimensionHelper.java:712) at org.geoserver.wms.capabilities.DimensionHelper.handleVectorLayerDimensions(DimensionHelper.java:117) ... 114 more Caused by: java.lang.NullPointerException at java.sql.Timestamp.compareTo(Timestamp.java:515) at java.sql.Timestamp.compareTo(Timestamp.java:72) at org.geotools.feature.visitor.MinVisitor.visit(MinVisitor.java:94) at org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:791) ... 118 more This is causing a problem when trying to add these layers, as WMS, into ArcGIS. Any ideas on what to do to fix this? Graham Humphries | System Analyst ICT & SSG Branch | Department of State Growth 4 Salamanca Place | GPO Box 536, Hobart TAS 7001 P (03) 6166 3155 <image001.png> <image004.jpg> ________________________________ CONFIDENTIALITY NOTICE AND DISCLAIMER The information in this transmission may be confidential and/or protected by legal professional privilege, and is intended only for the person or persons to whom it is addressed. If you are not such a person, you are warned that any disclosure, copying or dissemination of the information is unauthorised. If you have received the transmission in error, please immediately contact this office by telephone, fax or email, to inform us of the error and to enable arrangements to be made for the destruction of the transmission, or its return at our cost. No liability is accepted for any unauthorised use of the information contained in this transmission. _______________________________________________ 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#/<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.ianturton.com%2Ftalks%2Ffoss4g.html%23%2F&data=04%7C01%7CGraham.Humphries%40stategrowth.tas.gov.au%7Ca7b64374555345c8b4b508d98d59cde8%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637696239126346478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=43luPZUVopUuRTY3hIOjGyCWll3Dn9U5g%2BgKw6rcfto%3D&reserved=0> - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html<https://aus01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgeoserver.org%2Fcomm%2Fuserlist-guidelines.html&data=04%7C01%7CGraham.Humphries%40stategrowth.tas.gov.au%7Ca7b64374555345c8b4b508d98d59cde8%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637696239126356467%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hFsCESgWfPyQ5x%2FfcGHwxN%2FaBIY6jv1%2F6PU5ysbSVjU%3D&reserved=0> 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<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeoserver%2Fgeoserver%2Fwiki%2FSuccessfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer&data=04%7C01%7CGraham.Humphries%40stategrowth.tas.gov.au%7Ca7b64374555345c8b4b508d98d59cde8%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637696239126356467%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MBGhFPWBbgWgpWI6qZEHh%2F%2BPkHIWtrMkIpxBYwf8vcw%3D&reserved=0> Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fgeoserver-users&data=04%7C01%7CGraham.Humphries%40stategrowth.tas.gov.au%7Ca7b64374555345c8b4b508d98d59cde8%7C64ebab8accf44b5ca2d32b4e972d96b2%7C0%7C0%7C637696239126366460%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RFzGW21nZyUrv4x6ADS4YF4pxWyse0Iq12PnYKf5PMw%3D&reserved=0> ________________________________ CONFIDENTIALITY NOTICE AND DISCLAIMER The information in this transmission may be confidential and/or protected by legal professional privilege, and is intended only for the person or persons to whom it is addressed. If you are not such a person, you are warned that any disclosure, copying or dissemination of the information is unauthorised. If you have received the transmission in error, please immediately contact this office by telephone, fax or email, to inform us of the error and to enable arrangements to be made for the destruction of the transmission, or its return at our cost. No liability is accepted for any unauthorised use of the information contained in this transmission.
_______________________________________________ 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