Exception with table generation from GML app schema GWML2
Using Deegree 3.3.12, I've tried creating a SQL feature store with the "Create tables from GML application schema" option, and Relational storage mode. The application schema used is http://ngwd-bdnes.cits.nrcan.gc.ca/service/gwml/schemas/gwml2-nucleus.xsd from GroundWaterML2 ( http://external.opengeospatial.org/twiki_public/HydrologyDWG/GWML2-XML-Schema )
Everthing goes fine until I validate the <SQLFeatureStore>...</SQLFeatureStore> generated from the schema and click on "Create DB tables". At that point, I get the below exception (1)
I've tried with just the GeoSciML v3.2 schema (http://schemas.geosciml.org/geologicunit/3.2/geologicUnit.xsd) that is imported by GWML2 and it works fine, so it seems that it is something specificaly in the gwml2-nucleus.xsd that causes the exception. Any idea of what might be wrong and how to go over that if it is possible ?
I've tried with the BLOB storage and it works fine.
Note: before the exception, I get also the warnings mentionned below (2). They must not be completely critical since when experimenting with just geologicUnit.xsd, I also get them and the process works well.
(1) Exception:
[16:07:06] ERROR: [SQLFeatureStore] Error in mapping of table 'gwml2c_gw_biologicconstituent_gwml2c_gwconstituent_gwml2c_1215': java.lang.IllegalArgumentException: XPath '-PropertyName
('text()')
' refers to a complex type with complex content.
java.lang.RuntimeException: Error in mapping of table 'gwml2c_gw_biologicconstituent_gwml2c_gwconstituent_gwml2c_1215': java.lang.IllegalArgumentException: XPath '-PropertyName ('text()')
' refers to a complex type with complex content.
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:390)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:367)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:459)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:376)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:459)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:376)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:459)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:376)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:459)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildMapping(MappedSchemaBuilderGML.java:376)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.buildFtMapping(MappedSchemaBuilderGML.java:327)
at org.deegree.feature.persistence.sql.config.MappedSchemaBuilderGML.
(2) Warnings:
[00:32:38] WARN: [GMLSchemaInfoSet] Unhandled particle: MODEL_GROUP [00:32:38] WARN: [GenericAppSchema] Specified value feature type "{http://xmlns.geosciml.org/GeologicAge/3.2}EventProcessTerm" in declaration of property '{http://xmlns.geosciml.org/GeologicAge/3.2}eventProcess' is not defined in the schema. [00:32:38] WARN: [FeaturePropertyType] Setting reference to feature type '{http://xmlns.geosciml.org/GeologicAge/3.2}EventProcessTerm' to null -- repairing definition by clearing value feature type name as well. [00:32:38] WARN: [GenericAppSchema] Specified value feature type "{http://xmlns.geosciml.org/GeologicTime/3.2}GeochronologicEra" in declaration of property '{http://xmlns.geosciml.org/GeologicAge/3.2}olderNamedAge' is not defined in the schema. [00:32:38] WARN: [FeaturePropertyType] Setting reference to feature type '{http://xmlns.geosciml.org/GeologicTime/3.2}GeochronologicEra' to null -- repairing definition by clearing value feature type name as well. [00:32:38] WARN: [GenericAppSchema] Specified value feature type "{http://xmlns.geosciml.org/GeologicTime/3.2}GeochronologicEra" in declaration of property '{http://xmlns.geosciml.org/GeologicAge/3.2}youngerNamedAge' is not defined in the schema. [00:32:38] WARN: [FeaturePropertyType] Setting reference to feature type '{http://xmlns.geosciml.org/GeologicTime/3.2}GeochronologicEra' to null -- repairing definition by clearing value feature type name as well.
That's just a specific problem with the chosen GML Schema and the generic wizard. Can be fixed by manipulating the feature store configuration.
Is it really a bug, if the wizard does not work properly for any GML Schema by default?