[Geoserver-users] error on csw request

hi list, i tried to map geoserver metadata to the inspire model, and while doing so got this exception:

javax.xml.transform.TransformerException: java.lang.ClassCastException: org.geoserver.csw.records.GenericRecordBuilder$TreeBranch cannot be cast to org.geoserver.csw.records.GenericRecordBuilder$ComplexTreeLeaf

Someone has an idea what's going on and how to debug this?

I'm using geoserver 2.7-snapshot

My MD_Metadata file looks like this:

@fileIdentifier.CharacterString=id
language.LanguageCode.@anonymised.com='http://www.loc.gov/standards/iso639-2/
language.LanguageCode.@anonymised.com='dut'
language.LanguageCode='Nederlands'
hierarchyLevel.MD_ScopeCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode
hierarchyLevel.MD_ScopeCode.@anonymised.com='dataset'
contact.CI_ResponsibleParty.individualName.CharacterString='Paul van Genuchten'
contact.CI_ResponsibleParty.organisationName.CharacterString='GeoCat'
contact.CI_ResponsibleParty.contactInfo.CI_Contact.address.CI_Address.electronicMailAddress.CharacterString='info@anonymised.com'
contact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='pointOfContact'
contact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode
dateStamp.Date= if_then_else ( isNull("metadata.date") , '2015-07-22', "metadata.date")
metadataStandardName.CharacterString='ISO19139'
referenceSystemInfo.MD_ReferenceSystem.referenceSystemIdentifier.RS_Identifier.code.CharacterString='28992'
referenceSystemInfo.MD_ReferenceSystem.referenceSystemIdentifier.RS_Identifier.codeSpace.CharacterString='EPSG'
identificationInfo.MD_DataIdentification.citation.CI_Citation.title.CharacterString=if_then_else(isNull(title), name, name)
identificationInfo.MD_DataIdentification.citation.CI_Citation.identifier.MD_Identifier.code.CharacterString=id
identificationInfo.MD_DataIdentification.abstract.CharacterString=abstract
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.organisationName.CharacterString='Geocat'
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.contactInfo.CI_Contact.address.CI_Address.electronicMailAddress.CharacterString='info@anonymised.com'
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='pointOfContact'
identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=keywords
identificationInfo.MD_DataIdentification.resourceConstraints.MD_Constraints.useLimitation.CharacterString='Geen beperkingen'
identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.accessConstraints.MD_RestrictionCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode

identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.accessConstraints.MD_RestrictionCode.@anonymised.com='otherRestrictions'
identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.otherConstraints.CharacterString='http://creativecommons.org/publicdomain/mark/1.0/deed.nl
identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode.@anonymised.com='vector'
identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_SpatialRepresentationTypeCode
identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator.Integer='10000'
identificationInfo.MD_DataIdentification.topicCategory.MD_TopicCategoryCode='location'
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.linkage.URL=list('${url.wms}')
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.protocol.CharacterString=list('OGC:WMS')
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.name.CharacterString=name
dataQualityInfo.DQ_DataQuality.scope.DQ_Scope.level.MD_ScopeCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode
dataQualityInfo.DQ_DataQuality.scope.DQ_Scope.level.MD_ScopeCode.@anonymised.com='dataset'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.title.CharacterString='VERORDENING (EU) Nr. 1089/2010 VAN DE COMMISSIE van 23 november 2010 ter uitvoering van Richtlijn 2007/2/EG van het Europees Parlement en de Raad betreffende de interoperabiliteit van verzamelingen ruimtelijke gegevens en van diensten met betrekking tot ruimtelijke gegevens'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.date.Date='2010-12-08'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.dateType.CI_DateTypeCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.dateType.CI_DateTypeCode.@anonymised.com='publication'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.pass.Boolean='true'
dataQualityInfo.DQ_DataQuality.lineage.LI_Lineage.statement.CharacterString='op basis van fotogrammetrie'

Another issue with the MD_Metadata file is that the order of the protocol, name and linkage in the onlineresource are ordered alphabetically, in stead of what is defined in configuration, however alphabetical ordering breaks the schema

Thanks for your help, Paul

Hello Paul,

I think there is an error in your mapping file, you are trying to map a value to an incomplete path, i.e. a path that refers to a tag that still has children rather than a value. Is this possible? Nonetheless, I'd say this is still a kind of bug since it should properly report such an mapping error.

Could log this and the other issue on our JIRA? For the other issue, demonstrate with an example of output and desired output. Thanks!

Regards
Niels

On 22-07-15 18:33, Paul van Genuchten wrote:

hi list, i tried to map geoserver metadata to the inspire model, and
while doing so got this exception:

javax.xml.transform.TransformerException: java.lang.ClassCastException:
org.geoserver.csw.records.GenericRecordBuilder$TreeBranch cannot be cast
to org.geoserver.csw.records.GenericRecordBuilder$ComplexTreeLeaf

Someone has an idea what's going on and how to debug this?

I'm using geoserver 2.7-snapshot

My MD_Metadata file looks like this:

@fileIdentifier.CharacterString=id
language.LanguageCode.@anonymised.com='http://www.loc.gov/standards/iso639-2/
language.LanguageCode.@anonymised.com='dut'
language.LanguageCode='Nederlands'
hierarchyLevel.MD_ScopeCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode
hierarchyLevel.MD_ScopeCode.@anonymised.com='dataset'
contact.CI_ResponsibleParty.individualName.CharacterString='Paul van
Genuchten'
contact.CI_ResponsibleParty.organisationName.CharacterString='GeoCat'
contact.CI_ResponsibleParty.contactInfo.CI_Contact.address.CI_Address.electronicMailAddress.CharacterString='info@anonymised.com'
contact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='pointOfContact'
contact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode
dateStamp.Date= if_then_else ( isNull("metadata.date") , '2015-07-22',
"metadata.date")
metadataStandardName.CharacterString='ISO19139'
referenceSystemInfo.MD_ReferenceSystem.referenceSystemIdentifier.RS_Identifier.code.CharacterString='28992'
referenceSystemInfo.MD_ReferenceSystem.referenceSystemIdentifier.RS_Identifier.codeSpace.CharacterString='EPSG'
identificationInfo.MD_DataIdentification.citation.CI_Citation.title.CharacterString=if_then_else(isNull(title),
name, name)
identificationInfo.MD_DataIdentification.citation.CI_Citation.identifier.MD_Identifier.code.CharacterString=id
identificationInfo.MD_DataIdentification.abstract.CharacterString=abstract
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.organisationName.CharacterString='Geocat'
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.contactInfo.CI_Contact.address.CI_Address.electronicMailAddress.CharacterString='info@anonymised.com'
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode
identificationInfo.MD_DataIdentification.pointOfContact.CI_ResponsibleParty.role.CI_RoleCode.@anonymised.com='pointOfContact'
identificationInfo.MD_DataIdentification.descriptiveKeywords.MD_Keywords.keyword.CharacterString=keywords
identificationInfo.MD_DataIdentification.resourceConstraints.MD_Constraints.useLimitation.CharacterString='Geen
beperkingen'
identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.accessConstraints.MD_RestrictionCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode

identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.accessConstraints.MD_RestrictionCode.@anonymised.com='otherRestrictions'
identificationInfo.MD_DataIdentification.resourceConstraints.MD_LegalConstraints.otherConstraints.CharacterString='http://creativecommons.org/publicdomain/mark/1.0/deed.nl
identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode.@anonymised.com='vector'
identificationInfo.MD_DataIdentification.spatialRepresentationType.MD_SpatialRepresentationTypeCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_SpatialRepresentationTypeCode
identificationInfo.MD_DataIdentification.spatialResolution.MD_Resolution.equivalentScale.MD_RepresentativeFraction.denominator.Integer='10000'
identificationInfo.MD_DataIdentification.topicCategory.MD_TopicCategoryCode='location'
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.linkage.URL=list('${url.wms}')
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.protocol.CharacterString=list('OGC:WMS')
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource.name.CharacterString=name
dataQualityInfo.DQ_DataQuality.scope.DQ_Scope.level.MD_ScopeCode.@anonymised.com='http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#MD_ScopeCode
dataQualityInfo.DQ_DataQuality.scope.DQ_Scope.level.MD_ScopeCode.@anonymised.com='dataset'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.title.CharacterString='VERORDENING
(EU) Nr. 1089/2010 VAN DE COMMISSIE van 23 november 2010 ter uitvoering
van Richtlijn 2007/2/EG van het Europees Parlement en de Raad
betreffende de interoperabiliteit van verzamelingen ruimtelijke gegevens
en van diensten met betrekking tot ruimtelijke gegevens'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.date.Date='2010-12-08'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.dateType.CI_DateTypeCode.@anonymised.com='http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.specification.CI_Citation.date.CI_Date.dateType.CI_DateTypeCode.@anonymised.com='publication'
dataQualityInfo.DQ_DataQuality.report.DQ_DomainConsistency.result.DQ_ConformanceResult.pass.Boolean='true'
dataQualityInfo.DQ_DataQuality.lineage.LI_Lineage.statement.CharacterString='op
basis van fotogrammetrie'

Another issue with the MD_Metadata file is that the order of the
protocol, name and linkage in the onlineresource are ordered
alphabetically, in stead of what is defined in configuration, however
alphabetical ordering breaks the schema

Thanks for your help, Paul

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Paul,

Could it be you forgot 'CharacterString' in this one:

On 23-07-15 10:56, Niels Charlier wrote:

language.LanguageCode='Nederlands'

Cheers
Niels