Open rouault opened 9 years ago
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?
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...
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.(MappedSchemaBuilderGML.java:174)
at org.deegree.feature.persistence.sql.config.AbstractMappedSchemaBuilder.build(AbstractMappedSchemaBuilder.java:123)
at org.deegree.feature.persistence.sql.SQLFeatureStore.init(SQLFeatureStore.java:261)
at org.deegree.commons.config.AbstractResourceManager.processResourceConfig(AbstractResourceManager.java:264)
at org.deegree.commons.config.AbstractResourceManager.activate(AbstractResourceManager.java:313)
at org.deegree.console.Config.save(Config.java:278)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.el.parser.AstValue.invoke(AstValue.java:191)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
at javax.faces.component.UICommand.broadcast(UICommand.java:315)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.deegree.client.core.filter.InputFileFilter.doFilter(InputFileFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:744)
[16:07:06] ERROR: [AbstractResourceManager] Could not create resource feature stores: 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.
[16:07:06] ERROR: [AbstractResourceManager] Cause was: 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.
(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.