[Geoserver-users] Issue with App-Schemas on 2.13-RC1

Hi,

I’m not sure if this is only me - but I’m having issues with App-Schemas created in HALE Studion on this version of GeoServer.
The same schemas work fine on version 2.11 right now.

For geographic names from INSPIRE when trying to view the service I’m getting

<ows:ExceptionReport version=“1.0.0” xsi:schemaLocation=“http://www.opengis.net/ows http://192.168.1.102:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd”><ows:Exception exceptionCode=“NoApplicableCode”>ows:ExceptionTextError occurred getting features java.lang.NullPointerException</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

This is expected - as when I’m setting up or editing data storage I’m getting a NullPoint exception.

I did a test with MU theme and got the same issues - so not able to set this up.

Direct connection to PostgreSQL database (9.6 with PostGIS 2.3) works fine and I can see and query data.

Looks like the issue is related to AppSchema.

Maybe somebody saw the same?

···

With best regards

Michal Borkowski


Please email the logged request information and full exception stack traces from your GeoServer logs to the list. What is the request URL? Do you see any other errors or warning in the logs?

Kind regards,
Ben.

On 14/03/18 10:58, M.A. Borkowski wrote:

Hi,

I'm not sure if this is only me - but I'm having issues with App-Schemas
created in HALE Studion on this version of GeoServer.
The same schemas work fine on version 2.11 right now.

For geographic names from INSPIRE when trying to view the service I'm
getting

<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="
http://www.opengis.net/ows
http://192.168.1.102:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;&lt;ows:Exception
exceptionCode="NoApplicableCode"><ows:ExceptionText>Error occurred getting
features
java.lang.NullPointerException</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

This is expected - as when I'm setting up or editing data storage I'm
getting a NullPoint exception.

I did a test with MU theme and got the same issues - so not able to set
this up.

Direct connection to PostgreSQL database (9.6 with PostGIS 2.3) works fine
and I can see and query data.

Looks like the issue is related to AppSchema.

Maybe somebody saw the same?

------------------------------------------------------------------------------
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

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/&gt;
New Zealand

Hello Ben,

Sorry - sure - I should copy and paste some logs. There is more detailed log file with error:

2018-03-13 22:54:24,606 WARN [complex.config] - Error creating app-schema data store for ‘gn:NamedPlace’, caused by: null
2018-03-13 22:54:24,606 WARN [data.store] - Error obtaining datastore with the modified values
java.io.IOException: java.lang.NullPointerException
at org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.createFeatureTypeMappings(AppSchemaDataAccessConfigurator.java:319)
at org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappings(AppSchemaDataAccessConfigurator.java:232)
at org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.buildMappings(AppSchemaDataAccessConfigurator.java:204)
at org.geotools.data.complex.AppSchemaDataAccessFactory.createDataStore(AppSchemaDataAccessFactory.java:103)
at org.geotools.data.complex.AppSchemaDataAccessFactory.createDataStore(AppSchemaDataAccessFactory.java:67)
at org.vfny.geoserver.util.DataStoreUtils.getDataAccess(DataStoreUtils.java:90)
at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:650)
at org.geoserver.web.data.store.DataAccessEditPage.onSaveDataStore(DataAccessEditPage.java:131)
at org.geoserver.web.data.store.AbstractDataAccessPage$1.onSubmit(AbstractDataAccessPage.java:165)
at org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:111)
at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior$AjaxFormSubmitter.onSubmit(AjaxFormSubmitBehavior.java:215)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1309)
at org.apache.wicket.markup.html.form.Form.process(Form.java:976)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:797)
at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:171)
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:155)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:601)
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:498)
at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:157)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:174)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.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.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
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.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
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: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.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:50)
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:316)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
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:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
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:330)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205)
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:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:157)
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:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
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:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:152)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
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:88)
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:89)
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:42)
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:48)
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:44)
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:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
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:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
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: java.lang.NullPointerException
at org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRegistry.java:409)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:352)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:318)
at org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeRegistry.java:517)
at org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRegistry.java:429)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:352)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:318)
at org.geotools.data.complex.config.FeatureTypeRegistry.createType(FeatureTypeRegistry.java:517)
at org.geotools.data.complex.config.FeatureTypeRegistry.getAttributeType(FeatureTypeRegistry.java:188)
at org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRegistry.java:421)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:352)
at org.geotools.data.complex.config.FeatureTypeRegistry.createAttributeDescriptor(FeatureTypeRegistry.java:318)
at org.geotools.data.complex.config.FeatureTypeRegistry.getDescriptor(FeatureTypeRegistry.java:148)
at org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.getTargetDescriptor(AppSchemaDataAccessConfigurator.java:330)
at org.geotools.data.complex.config.AppSchemaDataAccessConfigurator.createFeatureTypeMappings(AppSchemaDataAccessConfigurator.java:294)
… 135 more

Generally, it is happening when you edit store or try to feature data or view.
This is all placed on an internal server for now with access to the internet t grab schemas, but frontend is not on the network.

I can as well attach my schemas from HALE Studio. It is basic translation for NamedPlaces.

Best regards

Michal

···

2018-03-13 23:14 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

Please email the logged request information and full exception stack traces from your GeoServer logs to the list. What is the request URL? Do you see any other errors or warning in the logs?

Kind regards,
Ben.

On 14/03/18 10:58, M.A. Borkowski wrote:

Hi,

I’m not sure if this is only me - but I’m having issues with App-Schemas
created in HALE Studion on this version of GeoServer.
The same schemas work fine on version 2.11 right now.

For geographic names from INSPIRE when trying to view the service I’m
getting

<ows:ExceptionReport version=“1.0.0” xsi:schemaLocation="
http://www.opengis.net/ows
http://192.168.1.102:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"><ows:Exception
exceptionCode=“NoApplicableCode”>ows:ExceptionTextError occurred getting
features
java.lang.NullPointerException</ows:ExceptionText></ows:Exception></ows:ExceptionReport>

This is expected - as when I’m setting up or editing data storage I’m
getting a NullPoint exception.

I did a test with MU theme and got the same issues - so not able to set
this up.

Direct connection to PostgreSQL database (9.6 with PostGIS 2.3) works fine
and I can see and query data.

Looks like the issue is related to AppSchema.

Maybe somebody saw the same?


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:

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@anonymised.comrge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

With best regards

Michal Borkowski


The root exception occurs while trying to construct an error message about a missing type definition for an element declaration. Perhaps you have a missing namespace declaration in a mapping file or schema, causing it to be null?

Kind regards,
Ben.

On 14/03/18 12:02, M.A. Borkowski wrote:

Caused by: java.lang.NullPointerException
at
org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRegistry.java:409)

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/&gt;
New Zealand

Ben,

I think with most schemas I have an issue… Maybe I’m doing something wrong…

With MaritimeZone schema:

14 Mar 16:43:39 INFO [geoserver.wfs] -
Request: getFeature
service = WFS
version = 1.1.0
baseUrl = http://192.168.1.102:8080/geoserver/
query[0]:
typeName[0] = {http://inspire.ec.europa.eu/schemas/mu/3.0}MaritimeZone
maxFeatures = 50
outputFormat = gml32
resultType = results
14 Mar 16:43:40 INFO [geoserver.servlets] - OutputStream was successfully aborte d.
14 Mar 16:43:40 ERROR [geoserver.ows] -

java.lang.RuntimeException: java.lang.RuntimeException: Error applying mapping w ith targetAttribute mu:country/gmd:Country

at org.geotools.data.complex.AbstractMappingFeatureIterator.next(Abstrac tMappingFeatureIterator.java:384)
at org.geotools.feature.collection.BridgeIterator.next(BridgeIterator.ja va:31)
at org.geotools.feature.collection.BridgeIterator.next(BridgeIterator.ja va:18)
at org.geotools.xml.Encoder.encode(Encoder.java:772)
at org.geotools.xml.Encoder.encode(Encoder.java:614)
at org.geoserver.wfs.xml.GML32OutputFormat.encode(GML32OutputFormat.java :124)
at org.geoserver.wfs.xml.GML3OutputFormat.complexFeatureStreamIntercept( GML3OutputFormat.java:352)
at org.geoserver.wfs.xml.GML3OutputFormat.write(GML3OutputFormat.java:28 3)
at org.geoserver.wfs.WFSGetFeatureOutputFormat.write(WFSGetFeatureOutput Format.java:196)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1019)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:27 4)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest( AbstractController.java:174)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.ha ndle(SimpleControllerHandlerAdapter.java:50)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch erServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche rServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame workServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServl et.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkSer vlet.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.doFilter(Servlet Handler.java:1669)
at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocals CleanupFilter.java:28)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDel egatingFilter.java:75)

at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java :71)
at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDel egatingFilter.java:71)
at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatin gFilter.java:46)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispat chFilter.java:50)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:316)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.intercept.FilterSecurityInter ceptor.invoke(FilterSecurityInterceptor.java:126)
at org.springframework.security.web.access.intercept.FilterSecurityInter ceptor.doFilter(FilterSecurityInterceptor.java:90)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoSe rverCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.access.ExceptionTranslationFilter.do Filter(ExceptionTranslationFilter.java:114)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoSe rverCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:330)
at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter. doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.authentication.www.BasicAuthenticati onFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoSe rverCompositeFilter.java:92)
at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFi lter(GeoServerBasicAuthenticationFilter.java:84)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:330)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:69)
at org.springframework.security.web.context.SecurityContextPersistenceFi lter.doFilter(SecurityContextPersistenceFilter.java:91)
at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilt er$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterCh ain.doFilter(GeoServerCompositeFilter.java:73)
at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoSe rverCompositeFilter.java:92)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain. doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(Fi lterChainProxy.java:213)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChai nProxy.java:176)
at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(Geo ServerSecurityFilterChainProxy.java:152)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(D elegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(Delegat ingFilterProxy.java:262)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.XFrameOptionsFilter.doFilter(XFrameOptionsFilte r.java:89)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter. java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:4 4)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern al(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR equestFilter.java:107)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet Handler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java :585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j ava:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.jav a:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandl er.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandl er.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java: 515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandle r.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandle r.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.j ava:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(Cont extHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerColl ection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper .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(HttpConnection.jav a:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java :540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPoo l.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool .java:555)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Error applying mapping with targetAttribu te mu:country/gmd:Country
at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNex t(DataAccessMappingFeatureIterator.java:1074)
at org.geotools.data.complex.AbstractMappingFeatureIterator.next(Abstrac tMappingFeatureIterator.java:381)
… 95 more
Caused by: java.lang.ClassCastException: org.geotools.feature.type.AttributeType Impl cannot be cast to org.opengis.feature.type.ComplexType
at org.geotools.data.complex.filter.XPath.set(XPath.java:224)
at org.geotools.data.complex.filter.XPath.set(XPath.java:155)
at org.geotools.data.complex.AbstractMappingFeatureIterator.setAttribute Content(AbstractMappingFeatureIterator.java:524)
at org.geotools.data.complex.DataAccessMappingFeatureIterator.setAttribu teValue(DataAccessMappingFeatureIterator.java:675)
at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNex t(DataAccessMappingFeatureIterator.java:1060)
… 96 more

This zone is only one polygon. The country is in schema assigned. It is just one entry.
Did I miss something?

Transformed data in HALE looks like this:

<?xml version="1.0" ?>

<wfs:FeatureCollection xmlns:sc=“http://www.interactive-instruments.de/ShapeChange/AppInfo” xmlns:gco=“http://www.isotc211.org/2005/gco” xmlns:hfp=“http://www.w3.org/2001/XMLSchema-hasFacetAndProperty” xmlns:au=“http://inspire.ec.europa.eu/schemas/au/4.0” xmlns:gml=“http://www.opengis.net/gml/3.2” xmlns:ns1=“http://www.w3.org/1999/xhtml” xmlns:base=“http://inspire.ec.europa.eu/schemas/base/3.3” xmlns:gn=“http://inspire.ec.europa.eu/schemas/gn/4.0” xmlns:mu=“http://inspire.ec.europa.eu/schemas/mu/3.0” xmlns:gmd=“http://www.isotc211.org/2005/gmd” xmlns:gsr=“http://www.isotc211.org/2005/gsr” xmlns:gts=“http://www.isotc211.org/2005/gts” xmlns:xlink=“http://www.w3.org/1999/xlink” xmlns:gss=“http://www.isotc211.org/2005/gss” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:wfs=“http://www.opengis.net/wfs/2.0” xsi:schemaLocation=“http://inspire.ec.europa.eu/schemas/mu/3.0 http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd” numberMatched=“1” numberReturned=“1” timeStamp=“2018-03-14T16:48:56.690+01:00”>
wfs:member
<mu:MaritimeZone gml:id=“AU.ExclusiveEconomicZone.1”>
<gml:name codeSpace=“http://inspire.ec.europa.eu/codelist/MaritimeZoneTypeValue/exclusiveEconomicZone”>Exclusive Economic Zone</gml:name>
mu:beginLifeSpanVersion2017-07-03T22:00:00Z</mu:beginLifeSpanVersion>
mu:country
<gmd:Country codeList=“https://www.iso.org/obp/ui/#search/code/” codeListValue=“https://www.iso.org/obp/ui/#iso:code:3166:NL”>NL</gmd:Country>
</mu:country>
mu:geometry
<gml:MultiSurface gml:id=“_d025ba5a-54ec-4c04-82fc-aea7a107ce24” srsName=“EPSG:4258” srsDimension=“2”>
gml:surfaceMember
<gml:Polygon gml:id=“_54a3639d-702a-4a33-95e6-bd8dbf4c0161” srsName=“EPSG:4258” srsDimension=“2”>
gml:exterior
gml:LinearRing
gml:posList3.076378 51.553058 3.076417 51.553214 3.076472 51.553436 3.076531 51.553658 </gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:surfaceMember>
</gml:MultiSurface>
</mu:geometry>
mu:inspireId
base:Identifier
base:localIdAU.ExclusiveEconomicZone.NL</base:localId>
base:namespaceNL.RNLN.unclos-zones-noordzee</base:namespace>
</base:Identifier>
</mu:inspireId>
mu:name
gn:GeographicalName
gn:languageeng</gn:language>
<gn:nativeness xsi:nil=“true”/>
<gn:nameStatus xsi:nil=“true”/>
<gn:sourceOfName xsi:nil=“true”/>
<gn:pronunciation xsi:nil=“true”/>
gn:spelling
gn:SpellingOfName
gn:textExclusive Economic Zone - The Netherlands</gn:text>
<gn:script xsi:nil=“true”/>
</gn:SpellingOfName>
</gn:spelling>
</gn:GeographicalName>
</mu:name>
<mu:zoneType xlink:type=“simple” xlink:href=“http://inspire.ec.europa.eu/codelist/MaritimeZoneTypeValue/exclusiveEconomicZone” xlink:title=“exclusive economic zone”></mu:zoneType>
<mu:baseline xsi:nil=“true”/>
<mu:boundary xsi:nil=“true”/>
</mu:MaritimeZone>
</wfs:member>
</wfs:FeatureCollection>

Just cut positions.

So I’m not sure where is a mistake. Is it me or something more.

Best regards

Michal

···

2018-03-14 0:18 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

The root exception occurs while trying to construct an error message about a missing type definition for an element declaration. Perhaps you have a missing namespace declaration in a mapping file or schema, causing it to be null?

Kind regards,
Ben.

On 14/03/18 12:02, M.A. Borkowski wrote:

Caused by: java.lang.NullPointerException
at
org.geotools.data.complex.config.FeatureTypeRegistry.getTypeOf(FeatureTypeRegistry.java:409)


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

With best regards

Michal Borkowski


On 15/03/18 04:57, M.A. Borkowski wrote:

java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country

[...]

Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
                                  Impl cannot be cast to
org.opengis.feature.type.ComplexType

[...]> Transformed data in HALE looks like this:
[...]

       <mu:country>
         <gmd:Country codeList="https://www.iso.org/obp/ui/#search/code/&quot;
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
       </mu:country>

gmd:Country is a gco:CodeListValue_Type, which is a complex type with simple content (like gml:CodeType, of which gml:name is an instance). Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to violate the GML object/property encoding rule (section 7.1 of OGC 07-036, the GML 3.2.1 standard). I do not think you can have a property type enclosing a type with a simple content model. If gmd:Country had a complex information model, it would not be permitted to have bare simple content like "NL" above. If mu:country was defined by ref gmd:Country (not gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type like this with a targetAttribute of mu:country and two ClientProperty elements:

<mu:country
codeList="https://www.iso.org/obp/ui/#search/code/&quot;
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL&gt;NL&lt;/mu:country&gt;

But it is not.

I think gmd:CountryPropertyType is broken because it violates the GML 3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the MU schema.

Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/&gt;
New Zealand

Thanks, Ben,

I have to digest this. And review the schema.

I think the codeListValue should include just NL and nothing more. If I understand correctly…

Thanks again - have to dig deeper and review those transformations. It could be I have some mistakes which block some operations.

Michal

···

2018-03-14 22:00 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

On 15/03/18 04:57, M.A. Borkowski wrote:

java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country

[…]

Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
Impl cannot be cast to
org.opengis.feature.type.ComplexType

[…]> Transformed data in HALE looks like this:
[…]

mu:country
<gmd:Country codeList=“https://www.iso.org/obp/ui/#search/code/
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
</mu:country>

gmd:Country is a gco:CodeListValue_Type, which is a complex type with simple content (like gml:CodeType, of which gml:name is an instance). Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to violate the GML object/property encoding rule (section 7.1 of OGC 07-036, the GML 3.2.1 standard). I do not think you can have a property type enclosing a type with a simple content model. If gmd:Country had a complex information model, it would not be permitted to have bare simple content like “NL” above. If mu:country was defined by ref gmd:Country (not gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type like this with a targetAttribute of mu:country and two ClientProperty elements:

<mu:country
codeList=“https://www.iso.org/obp/ui/#search/code/
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL>NL</mu:country>

But it is not.

I think gmd:CountryPropertyType is broken because it violates the GML 3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the MU schema.

Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd

Kind regards,


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

With best regards

Michal Borkowski


Hi Ben,

I think I’m missing something or just a lack of knowledge…

I went through great INSPIRE specs and examples and generally, this is how the country code is coded.
So we have a link to list and eventually URI to codename in the list.
I want to know where is the mistake - is this something wrong with GeoServer or maybe latest HALE Studio which was creating this app schema.

The “funny” thing is that the same ap schemas work fine in GeoServer 2.12.0 - I think those should not as well. But I can download GML3 files with all details.
And the same error is not presented. So I totally do not know what is going on there and why this country code is an issue or I’m getting Null pointer error.

Could you please let me know what I should check and what maybe should be modified?

I’m really stuck…

Looking forward to any direction to go… I think it could be my lack of knowledge… I’m still learning…

Thanks in advance…

Michal

···

2018-03-14 23:03 GMT+01:00 M.A. Borkowski <ma@…8612…>:

Thanks, Ben,

I have to digest this. And review the schema.

I think the codeListValue should include just NL and nothing more. If I understand correctly…

Thanks again - have to dig deeper and review those transformations. It could be I have some mistakes which block some operations.

Michal

2018-03-14 22:00 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com.>:

On 15/03/18 04:57, M.A. Borkowski wrote:

java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country

[…]

Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
Impl cannot be cast to
org.opengis.feature.type.ComplexType

[…]> Transformed data in HALE looks like this:
[…]

mu:country
<gmd:Country codeList=“https://www.iso.org/obp/ui/#search/code/
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
</mu:country>

gmd:Country is a gco:CodeListValue_Type, which is a complex type with simple content (like gml:CodeType, of which gml:name is an instance). Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to violate the GML object/property encoding rule (section 7.1 of OGC 07-036, the GML 3.2.1 standard). I do not think you can have a property type enclosing a type with a simple content model. If gmd:Country had a complex information model, it would not be permitted to have bare simple content like “NL” above. If mu:country was defined by ref gmd:Country (not gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type like this with a targetAttribute of mu:country and two ClientProperty elements:

<mu:country
codeList=“https://www.iso.org/obp/ui/#search/code/
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL>NL</mu:country>

But it is not.

I think gmd:CountryPropertyType is broken because it violates the GML 3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the MU schema.

Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd

Kind regards,


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

With best regards

Michal Borkowski


With best regards

Michal Borkowski


Michal,

I think that gmd:CountryPropertyType is unusable because it violates the GML encoding rules. I do not think that a property type for a complex type with simple content is permitted by the GML encoding rules. If MaritimeUnits violates this condition, then it is not a GML application schema.

- Please show us your attributeMapping for this element.

- Do you need the bare "NL" element text? GeoServer app-schema is quite permissive and might let you encode the two attributes with ClientProperty without this. I do not know if this will work because a complex type is expected at this point, not a complex type with simple content.

Kind regards,
Ben.

On 19/03/18 11:42, M.A. Borkowski wrote:

Hi Ben,

I think I'm missing something or just a lack of knowledge...

I went through great INSPIRE specs and examples and generally, this is how
the country code is coded.
So we have a link to list and eventually URI to codename in the list.
I want to know where is the mistake - is this something wrong with
GeoServer or maybe latest HALE Studio which was creating this app schema.

The "funny" thing is that the same ap schemas work fine in GeoServer 2.12.0
- I think those should not as well. But I can download GML3 files with all
details.
And the same error is not presented. So I totally do not know what is going
on there and why this country code is an issue or I'm getting Null pointer
error.

Could you please let me know what I should check and what maybe should be
modified?

I'm really stuck...

Looking forward to any direction to go... I think it could be my lack of
knowledge... I'm still learning...

Thanks in advance...

Michal

2018-03-14 23:03 GMT+01:00 M.A. Borkowski <ma@anonymised.com>:

Thanks, Ben,

I have to digest this. And review the schema.

I think the codeListValue should include just NL and nothing more. If I
understand correctly...

Thanks again - have to dig deeper and review those transformations. It
could be I have some mistakes which block some operations.

Michal

2018-03-14 22:00 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

On 15/03/18 04:57, M.A. Borkowski wrote:

java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country

[...]

Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
                                   Impl cannot be cast to
org.opengis.feature.type.ComplexType

[...]> Transformed data in HALE looks like this:
[...]

        <mu:country>
          <gmd:Country codeList="https://www.iso.org/obp/ui/#search/code/
"
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
        </mu:country>

gmd:Country is a gco:CodeListValue_Type, which is a complex type with
simple content (like gml:CodeType, of which gml:name is an instance).
Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to
violate the GML object/property encoding rule (section 7.1 of OGC 07-036,
the GML 3.2.1 standard). I do not think you can have a property type
enclosing a type with a simple content model. If gmd:Country had a complex
information model, it would not be permitted to have bare simple content
like "NL" above. If mu:country was defined by ref gmd:Country (not
gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type
like this with a targetAttribute of mu:country and two ClientProperty
elements:

<mu:country
codeList="https://www.iso.org/obp/ui/#search/code/&quot;
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL&gt;
NL</mu:country>

But it is not.

I think gmd:CountryPropertyType is broken because it violates the GML
3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the
MU schema.

Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/&gt;
New Zealand

--
With best regards

Michal Borkowski

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

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/&gt;
New Zealand

Hi Ben,

I see that attachments are not going to the server - so there is a link https://lith.borkowski.nl/f/eb9f3b9d439b40c38a1d/?dl=1

This is a shape with a full schema which could be directly applied to the GS…With best regards

Maybe somebody from the group had the similar issue?
This is open data source so could be used and distributed…

Thanks in advance

Michal

···

2018-03-26 11:47 GMT+02:00 M.A. Borkowski <ma@anonymised.com>:

Hello Ben,

Hope the attachment would go through. This is full app schema using shapefile - getting the same issue. Additionally - I have no geometry. This is not so important as transformed data result in GML format.
I have - as mentioned - verified both country entries - and both should be URI - and I think those are.

I have no clue where is the mistake. It is not clear for me… I think all is correctly set in schema…

Thanks in advance for assistance. Trying to solve this… but as mentioned I’m running out of ideas. Most of the MU services are like this.

Best regards

Michal

2018-03-19 1:37 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

Michal,

I think that gmd:CountryPropertyType is unusable because it violates the GML encoding rules. I do not think that a property type for a complex type with simple content is permitted by the GML encoding rules. If MaritimeUnits violates this condition, then it is not a GML application schema.

  • Please show us your attributeMapping for this element.

  • Do you need the bare “NL” element text? GeoServer app-schema is quite permissive and might let you encode the two attributes with ClientProperty without this. I do not know if this will work because a complex type is expected at this point, not a complex type with simple content.

Kind regards,
Ben.

On 19/03/18 11:42, M.A. Borkowski wrote:

Hi Ben,

I think I’m missing something or just a lack of knowledge…

I went through great INSPIRE specs and examples and generally, this is how
the country code is coded.
So we have a link to list and eventually URI to codename in the list.
I want to know where is the mistake - is this something wrong with
GeoServer or maybe latest HALE Studio which was creating this app schema.

The “funny” thing is that the same ap schemas work fine in GeoServer 2.12.0

  • I think those should not as well. But I can download GML3 files with all
    details.
    And the same error is not presented. So I totally do not know what is going
    on there and why this country code is an issue or I’m getting Null pointer
    error.

Could you please let me know what I should check and what maybe should be
modified?

I’m really stuck…

Looking forward to any direction to go… I think it could be my lack of
knowledge… I’m still learning…

Thanks in advance…

Michal

2018-03-14 23:03 GMT+01:00 M.A. Borkowski <ma@anonymised.com>:

Thanks, Ben,

I have to digest this. And review the schema.

I think the codeListValue should include just NL and nothing more. If I
understand correctly…

Thanks again - have to dig deeper and review those transformations. It
could be I have some mistakes which block some operations.

Michal

2018-03-14 22:00 GMT+01:00 Ben Caradoc-Davies <ben@anonymised.com>:

On 15/03/18 04:57, M.A. Borkowski wrote:

java.lang.RuntimeException: java.lang.RuntimeException: Error applying
mapping w ith targetAttribute
mu:country/gmd:Country

[…]

Caused by: java.lang.ClassCastException:
org.geotools.feature.type.AttributeType
Impl cannot be cast to
org.opengis.feature.type.ComplexType

[…]> Transformed data in HALE looks like this:
[…]

mu:country
<gmd:Country codeList="https://www.iso.org/obp/ui/#search/code/
"
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL
">NL</gmd:Country>
</mu:country>

gmd:Country is a gco:CodeListValue_Type, which is a complex type with
simple content (like gml:CodeType, of which gml:name is an instance).
Unfortunately, mu:country is a gmd:CountryPropertyType, which appears to
violate the GML object/property encoding rule (section 7.1 of OGC 07-036,
the GML 3.2.1 standard). I do not think you can have a property type
enclosing a type with a simple content model. If gmd:Country had a complex
information model, it would not be permitted to have bare simple content
like “NL” above. If mu:country was defined by ref gmd:Country (not
gmd:CountryPropertyType), you could encode it as a gco:CodeListValue_Type
like this with a targetAttribute of mu:country and two ClientProperty
elements:

<mu:country
codeList=“https://www.iso.org/obp/ui/#search/code/
codeListValue="https://www.iso.org/obp/ui/#iso:code:3166:NL>
NL</mu:country>

But it is not.

I think gmd:CountryPropertyType is broken because it violates the GML
3.2.1 encoding standard. This is a bug in the GMD schema, uncovered by the
MU schema.

Here are the schemas involved:
http://inspire.ec.europa.eu/schemas/mu/3.0/MaritimeUnits.xsd
http://schemas.opengis.net/iso/19139/20070417/gmd/freeText.xsd
http://schemas.opengis.net/iso/19139/20070417/gco/gcoBase.xsd

Kind regards,


Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand


With best regards

Michal Borkowski



Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

With best regards

Michal Borkowski


With best regards

Michal Borkowski