Problem adding ESDIN ExM schemas to deegree3 webapp

6 views
Skip to first unread message

Just van den Broecke

unread,
Dec 14, 2010, 11:14:15 AM12/14/10
to inspire-f...@googlegroups.com
Hi,

I am trying to add support for the ESDIN European Large Scale Topography
(ExM) to the deegree3 webapp at
http://code.google.com/p/inspire-foss/source/browse/#svn/trunk/webapps/deegree3

ExM mainly extends from Annex I INSPIRE schemas.

I think two steps are required:
1) add the schema XSDs to the workspace
2) update the DB feature_types table

I am stuck at step 1) and need to figure out how to automate step 2)
(think with the INSPIRE node?). Anyway for step 1):

- ExM schemas are at http://tinyurl.com/37wc83q
- ExM schemas are extensions of Annex 1 schemas so refer to them
- I have extended the BlobMapping:
<BLOBMapping>
<StorageCRS>EPSG:4258</StorageCRS>
<GMLSchema version="GML_32">../../schemas/inspire/annex1</GMLSchema>
<GMLSchema version="GML_32">../../schemas/esdin/exm</GMLSchema>
</BLOBMapping>

- when starting the WFS I get this error:
[16:49:27] INFO: [FeatureStoreManager]
--------------------------------------------------------------------------------
[16:49:27] INFO: [FeatureStoreManager] Setting up feature stores.
[16:49:27] INFO: [FeatureStoreManager]
--------------------------------------------------------------------------------
[16:49:27] INFO: [FeatureStoreManager] Setting up feature store
'inspire-postgis' from file 'inspire-postgis.xml'...
[16:49:27] ERROR: [PostGISFeatureStoreProvider] Error setting up feature
store from configuration: 'Severe error in schema document (systemId:
file:/Users/just/project/customers/kadaster/svn/project/inspire-foss/trunk/webapps/deegree3/src/main/webapp/WEB-INF/workspace/schemas/inspire/annex1,
line: 1, column: 1) Content is not allowed in prolog.'.
class org.deegree.commons.xml.XMLProcessingException: Severe error in
schema document (systemId:
file:/Users/just/project/customers/kadaster/svn/project/inspire-foss/trunk/webapps/deegree3/src/main/webapp/WEB-INF/workspace/schemas/inspire/annex1,
line: 1, column: 1) Content is not allowed in prolog.
<< is empty >>
at
org.deegree.commons.xml.schema.XMLSchemaInfoSet.loadModel(XMLSchemaInfoSet.java:418)
at
org.deegree.commons.xml.schema.XMLSchemaInfoSet.<init>(XMLSchemaInfoSet.java:129)
at
org.deegree.gml.schema.GMLSchemaInfoSet.<init>(GMLSchemaInfoSet.java:172)
at
org.deegree.gml.feature.schema.ApplicationSchemaXSDDecoder.<init>(ApplicationSchemaXSDDecoder.java:161)
at
org.deegree.feature.persistence.postgis.SchemaBuilderBLOB.<init>(SchemaBuilderBLOB.java:188)
at
org.deegree.feature.persistence.postgis.PostGISFeatureStoreProvider.getSchema(PostGISFeatureStoreProvider.java:131)
at
org.deegree.feature.persistence.postgis.PostGISFeatureStoreProvider.getFeatureStore(PostGISFeatureStoreProvider.java:94)
at
org.deegree.feature.persistence.FeatureStoreManager.create(FeatureStoreManager.java:190)
at
org.deegree.feature.persistence.FeatureStoreManager.init(FeatureStoreManager.java:130)

I have tried several variations like:
- swapping the <GMLSchema> elements: I get the same error but on
"../../schemas/esdin/exm"
- configure just one Annex1 schema (the original)
<GMLSchema version="GML_32">../../schemas/inspire/annex1</GMLSchema>
startup OK
- configure just one ExM (<GMLSchema
version="GML_32">../../schemas/esdin/exm</GMLSchema>)
or all schemas in a single dir under "schemas/inspire/annex1", then I
get in both cases:

[17:05:11] INFO: [FeatureStoreManager]
--------------------------------------------------------------------------------
[17:05:11] INFO: [FeatureStoreManager] Setting up feature stores.
[17:05:11] INFO: [FeatureStoreManager]
--------------------------------------------------------------------------------
[17:05:11] INFO: [FeatureStoreManager] Setting up feature store
'inspire-postgis' from file 'inspire-postgis.xml'...
[17:05:22] ERROR: [PostGISFeatureStoreProvider] Error setting up feature
store from configuration: 'null'.
java.lang.NullPointerException
at
org.deegree.gml.schema.GMLSchemaInfoSet.getFeatureElementDeclarations(GMLSchemaInfoSet.java:397)
at
org.deegree.gml.schema.GMLSchemaInfoSet.<init>(GMLSchemaInfoSet.java:238)
at
org.deegree.gml.feature.schema.ApplicationSchemaXSDDecoder.<init>(ApplicationSchemaXSDDecoder.java:161)
at
org.deegree.gml.feature.schema.ApplicationSchemaXSDDecoder.<init>(ApplicationSchemaXSDDecoder.java:214)
at
org.deegree.feature.persistence.postgis.SchemaBuilderBLOB.<init>(SchemaBuilderBLOB.java:185)
at
org.deegree.feature.persistence.postgis.PostGISFeatureStoreProvider.getSchema(PostGISFeatureStoreProvider.java:131)
at
org.deegree.feature.persistence.postgis.PostGISFeatureStoreProvider.getFeatureStore(PostGISFeatureStoreProvider.java:94)
at
org.deegree.feature.persistence.FeatureStoreManager.create(FeatureStoreManager.java:190)
at
org.deegree.feature.persistence.FeatureStoreManager.init(FeatureStoreManager.java:130)

This could be due to the DB feature_types table not containing ExM defs.
Maybe the two steps should be reversed ? (First update DB).
According to the BLOBMapping XSD def, multiple GMLSchema elements are
allowed but it looks as if that goes wrong. The is really content before
the prolog, and it looks like the parser is opening a directory, not a
file in the first error above.

All is checked in SVN. One can run the webapp using Maven.

best,

Just

Just van den Broecke

unread,
Dec 14, 2010, 12:28:07 PM12/14/10
to inspire-f...@googlegroups.com
Ok, I dived into this somewhat further and nailed down 2 issues:

1) there is some problem in the ESDIN XSDs for TransportNetworks (ExM
TN): if I leave them out and put all schema's (remaining ExM+Annex I) in
a single dir schemas/inspire/annex1 then I see no errors.

2) still when I divide the ExM and Annex I schemas over two dirs and use


<GMLSchema version="GML_32">../../schemas/inspire/annex1</GMLSchema>
<GMLSchema version="GML_32">../../schemas/esdin/exm</GMLSchema>

I get the "Content is not allowed in prolog.", so even with all valid
ExM schemas

I am using the deegree-inspire-node 1.0.1 now for quick testing.

best,

Just


--
kind regards / met vriendelijke groet,

--Just

Just van den Broecke ju...@justobjects.nl
Just Objects B.V. tel +31 65 4268627 Skype: justb4
The Netherlands http://www.justobjects.nl

Markus Schneider

unread,
Dec 14, 2010, 1:12:14 PM12/14/10
to inspire-f...@googlegroups.com
Hi Just,

I looked up the problem -- currently, it's only possible to have a single
GMLSchema element that points to a directory. The code is not prepared to
handle two directories.

There are two possible workarounds:

1. Put all schema files in a single directory (as you did).
2. Use GMLSchema elements that target single XSD files (instead of
directories)

We will provide a proper fix for deegree 3.1 [1].

Best regards,
Markus

[1] http://tracker.deegree.org/deegree-services/ticket/227

Markus Schneider

unread,
Dec 14, 2010, 1:13:55 PM12/14/10
to inspire-f...@googlegroups.com
Hi Just,

for step 2) you can simply use the "Setup tables" link in the services
console. However, you will have to recreate your database from scratch.

Best regards,
Markus

Just van den Broecke

unread,
Dec 15, 2010, 8:23:41 AM12/15/10
to inspire-f...@googlegroups.com
Hi,

All issues are now resolved:

- all ESDIN ExM XSD schemas for TransportNetworks contained several
errors related to NameSpace conflicts, fixed them in SVN and will notify
ESDIN WP for ExM Large Scale
- put all schemas (INSPIRE+ESDIN ExM) in one dir until fixed in deegree
3.1 (see http://tracker.deegree.org/deegree-services/ticket/227)
- yes, found that DB schema can always be recreated by dropping the
tables feature_types and gml_objects, then go to deegree console and
then to menu "feature stores and do "Setup Tables", great !

Thanks Markus. best,

Just

Reply all
Reply to author
Forward
0 new messages