[geotk] Issue with relative URL in GML schema parsing,

Stephane Fellah stephanef at imagemattersllc.com
Thu Oct 26 13:19:06 PDT 2017


I instantiated a new GeoServer instance with the default demo data. I am
using WFSFeatureStore (geotk  4.0.0) to parse the feature types. I got the
following error related to some XML schema include that are using relative
path:

Oct 26, 2017 4:11:15 PM org.geotoolkit.data.wfs.WFSFeatureStore requestType
*INFO: [WFS Client] request type :
http://localhost:8050/geoserver/ows?NAMESPACE=xmlns%28tiger%3Dhttp%3A%2F%2Fwww.census.gov%29&TYPENAME=tiger%3Apoly_landmarks&REQUEST=DescribeFeatureType&VERSION=1.1.0&SERVICE=WFS
<http://localhost:8050/geoserver/ows?NAMESPACE=xmlns%28tiger%3Dhttp%3A%2F%2Fwww.census.gov%29&TYPENAME=tiger%3Apoly_landmarks&REQUEST=DescribeFeatureType&VERSION=1.1.0&SERVICE=WFS>*
*Oct 26, 2017 4:11:16 PM org.geotoolkit.feature.xml.Utils getDistantSchema*
*WARNING: IO exception trying to retrieve imported
schema:http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd
<http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd>*
*java.io.FileNotFoundException:
http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd
<http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd>*
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.URL.openStream(URL.java:1045)
at org.geotoolkit.nio.IOUtilities.open(IOUtilities.java:626)
at org.geotoolkit.nio.IOUtilities.open(IOUtilities.java:574)
at org.geotoolkit.feature.xml.Utils.getDistantSchema(Utils.java:588)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader$1.call(JAXBFeatureTypeReader.java:432)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader$1.call(JAXBFeatureTypeReader.java:430)
at org.apache.sis.util.collection.Cache.getOrCreate(Cache.java:356)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:430)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.listAllSchemas(JAXBFeatureTypeReader.java:445)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.getAllFeatureTypeFromSchema(JAXBFeatureTypeReader.java:409)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.read(JAXBFeatureTypeReader.java:396)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader.read(JAXBFeatureTypeReader.java:283)
at
org.geotoolkit.data.wfs.WFSFeatureStore.requestType(WFSFeatureStore.java:485)
at
org.geotoolkit.data.wfs.WFSFeatureStore.checkTypeExist(WFSFeatureStore.java:144)
at org.geotoolkit.data.wfs.WFSFeatureStore.<init>(WFSFeatureStore.java:109)
at
org.geotoolkit.data.wfs.WebFeatureClient.getStore(WebFeatureClient.java:122)
at
org.geotoolkit.data.wfs.WebFeatureClient.getNames(WebFeatureClient.java:290)
at
com.factweave.portrayal.demo.WFSLayersPopulator.populate(WFSLayersPopulator.java:46)
at
com.factweave.portrayal.demo.WFSLayersPopulator.main(WFSLayersPopulator.java:167)


Another one

Oct 26, 2017 4:11:16 PM org.geotoolkit.feature.xml.Utils getDistantSchema
WARNING: Schema ressource not found:
http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd
Oct 26, 2017 4:11:16 PM
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader listAllSchemas
WARNING: Unable to retrieve imported schema:
http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../../../xlink/1.0.0/xlinks.xsd
Oct 26, 2017 4:11:16 PM org.geotoolkit.feature.xml.Utils getDistantSchema
WARNING: IO exception trying to retrieve imported schema:
http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../smil/smil20.xsd
java.io.FileNotFoundException:
http://localhost:8050/geoserver/schemas/gml/3.1.1/base/../smil/smil20.xsd
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1872)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at java.net.URL.openStream(URL.java:1045)
at org.geotoolkit.nio.IOUtilities.open(IOUtilities.java:626)
at org.geotoolkit.nio.IOUtilities.open(IOUtilities.java:574)
at org.geotoolkit.feature.xml.Utils.getDistantSchema(Utils.java:588)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader$1.call(JAXBFeatureTypeReader.java:432)
at
org.geotoolkit.feature.xml.jaxb.JAXBFeatureTypeReader$1.call(JAXBFeatureTypeReader.java:430)


Are there any settings that need to be set  to resolve these relative URLs.
Is JAXB not supposed to resolve these URLs automatically ? Seems to be a
bug to me.





Thanks in advance

Stephane Fellah



-- 
Stephane Fellah
Chief  Knowledge Scientist
Image Matters LLC
Office: +(703) 669 5510
Cell: 703 431 9420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20171026/c2f451cb/attachment-0001.html>


More information about the Geotoolkit mailing list