Giter VIP home page Giter VIP logo

Comments (5)

tfr42 avatar tfr42 commented on August 14, 2024

Running the workspace with latest deegree-ogcapi and executing the request:

curl -i -X GET \
   -H "Accept:application/json" \
 'http://localhost:8080/deegree-ogcapi/datasets/geojson_wfs/api'

results in

<!doctype html><html lang="de"><head><title>HTTP Status 500 – Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 – Internal Server Error</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> org.glassfish.jersey.server.ContainerException: java.lang.StackOverflowError</p><p><b>Beschreibung</b> The server encountered an unexpected condition that prevented it from fulfilling the request.</p><p><b>Exception</b></p><pre>javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.StackOverflowError
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
</pre><p><b>Root Cause</b></p><pre>org.glassfish.jersey.server.ContainerException: java.lang.StackOverflowError
	org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:255)
	org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:237)
	org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:438)
	org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
	org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
	org.glassfish.jersey.internal.Errors.process(Errors.java:292)
	org.glassfish.jersey.internal.Errors.process(Errors.java:274)
	org.glassfish.jersey.internal.Errors.process(Errors.java:244)
	org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
	org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234)
	org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:684)
	org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
	org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311)
	org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
</pre><p><b>Root Cause</b></p><pre>java.lang.StackOverflowError
	java.base&#47;java.util.LinkedHashMap.afterNodeInsertion(LinkedHashMap.java:299)
	java.base&#47;java.util.HashMap.putVal(HashMap.java:660)
	java.base&#47;java.util.HashMap.put(HashMap.java:608)
	io.swagger.v3.oas.models.media.Schema.addProperties(Schema.java:537)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:404)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:376)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:388)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:371)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:420)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:376)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:388)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:371)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:420)
...
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:420)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:376)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:388)
	org.deegree.services.oaf.openapi.OafOpenApiFilter.addParticle(OafOpenApiFilter.java:371)
</pre><p><b>Hinweis</b> Der komplette Stacktrace der Ursache ist in den Server logs zu finden</p><hr class="line" /><h3>Apache Tomcat/9.0.69</h3></body></html>

Root cause is most likely the underlying feature store which has an INSPIRE schema as reference datasources/feature/geojson_wfs.xml.
See https://github.com/deegree/deegree-ogcapi/blob/main/deegree-ogcapi-documentation/src/main/asciidoc/configuration.adoc#using-schema--or-table-driven-featurestore-configurations for more information which feature stores are supported.
You may verify the configuration by adding:

<GMLFormat gmlVersion="GML_32">
    <MimeType>application/gml+xml; version=3.2</MimeType>
    <MimeType>text/xml; subtype=gml/3.2.1</MimeType>
  </GMLFormat>

  <GeoJSONFormat>
    <MimeType>application/geo+json</MimeType>
  </GeoJSONFormat>

to the deegreeWFS service configuration services/geojson_wfs_service.xml and test the deegree WFS 2.0 with GeoJson output (requires deegree 3.5-SNAPSHOT).

from deegree-ogcapi.

tfr42 avatar tfr42 commented on August 14, 2024

@Kate-Lyndegaard Did you check the workspace with the deegree WFS and GeoJson encoding? Otherwise I do propose that you open a new issue with a feature request asking for support of data structures derived from GML application schemas such as INSPIRE PLU. But for the time being I am not aware of an technical specification for Json/GeoJson how to deal with complex data structures. If you have a reference for an implementation in mind you are welcome to post it.

from deegree-ogcapi.

Kate-Lyndegaard avatar Kate-Lyndegaard commented on August 14, 2024

@tfr42 Yes, I have tested deegree 3.5 WFS with GeoJson encoding and it appears to be added as a WFS outputFormat by default. I can download GeoJson without adding anything to the service configuration. I also tested adding the code you provided to the configuration, and that works as well.

URL: http://localhost:8080/deegree35/services/geojson_wfs_service?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&NAMESPACES=xmlns(plu,http://inspire.ec.europa.eu/schemas/plu/4.0)&TYPENAMES=plu:SpatialPlan&outputFormat=application/geo+json

OUTPUT FILE:
geojson_wfs.zip

Does this mean that the documentation can also be generated?

from deegree-ogcapi.

Kate-Lyndegaard avatar Kate-Lyndegaard commented on August 14, 2024

But for the time being I am not aware of an technical specification for Json/GeoJson how to deal with complex data structures. If you have a reference for an implementation in mind you are welcome to post it.

@tfr42 I created a deegree configuration to test INSPIRE-compliant alternative encoded geojson in deegree ogcapi and that works. I created a simplified INSPIRE Addresses .xml schema based on the GeoJson encoding rules described here. I mapped compliant INSPIRE Addresses (complex .gml) to the simplified schema.

Deegree configuration:

simplifiedAddressesDeegreeConfiguration.zip

Alternative encoding INSPIRE Addresses GeoJson returned by deegree:

AlternativeEncodingINSPIREAddresses.zip

👍

from deegree-ogcapi.

Kate-Lyndegaard avatar Kate-Lyndegaard commented on August 14, 2024

@tfr42 I guess that this problem exists since it is bound to the schema, so I will create a new issue to support complex schemas if the need arises.

from deegree-ogcapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.