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
<http://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(GeoServerAnonymousAuthenticati
onFilter.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(GeoServerBasicAuthenticationFi
lter.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(DataAccessMappingFeatureIterat
or.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(DataAccessMappingFeatureIterat
or.java:675)
        at org.geotools.data.complex.DataAccessMappingFeatureIterator.computeNex
                                 t(DataAccessMappingFeatureIterat
or.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:beginLifeSpanVersion>2017-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:posList>3.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:localId>AU.ExclusiveEconomicZone.NL
<http://au.exclusiveeconomiczone.nl/></base:localId>
          <base:namespace>NL.RNLN.unclos-zones-noordzee</base:namespace>
        </base:Identifier>
      </mu:inspireId>
      <mu:name>
        <gn:GeographicalName>
          <gn:language>eng</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:text>Exclusive 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 <b...@transient.nz>:

> 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.getType
>> Of(FeatureTypeRegistry.java:409)
>>
>
> --
> Ben Caradoc-Davies <b...@transient.nz>
> Director
> Transient Software Limited <https://transient.nz/>
> New Zealand
>



-- 
With best regards

Michal Borkowski

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

Reply via email to