[geotk] Using metadata.sql

William Temperley willtemperley at gmail.com
Thu Apr 5 04:15:13 EDT 2012


Dear all,

I'm trying to load an ISO19139 XML file and persist it using
metadata.sql.MetadataWriter.

I'm loading a file (see http://pastebin.com/FvpDw3Kt) into a
DefaultMetadata object (which works great, thanks!) but when I attempt
to persist it using MetadataWriter.add(defaultMetaData), I get the
following error:

org.postgresql.util.PSQLException: ERROR: insert or update on table
"EX_Extent" violates foreign key constraint
"EX_Extent_geographicElement_fkey"
  Detail: Key (geographicElement)=(FD10C2) is not present in table
"EX_GeographicExtent".
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2077)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1810)
...............

I'm wondering if perhaps this is due to
EX_Extent_geographicElement_fkey not being initially deferred?  I
can't see the schema as the transaction aborts.

I'm on Postgres 8.4.

Thanks and regards,

Will Temperley


More information about the Geotoolkit mailing list