Hello,
I am trying to configure iso19139 fragment (also known as component) schema in geonetwork. Each component schema requires a new root element such as DS_Series, CI_Citation, CI_ResponsibleParty, CI_OnlineResource, etc. In each of these cases I am getting the following error when inserting metadata.
java.lang.IllegalStateException: Root element not set
I would like to know where the root element is defined in geonetwork? I believe it's defined in multiple locations, but do not know if it's one particular location that is causing this error or if I'm missing a root element reference somewhere. Below is the list of files I updated or created to configure the new component schema. Note that in GN 2.2 these modifications resulted in the successful configuring of the component schema. However the same modifications in 2.4.1 return the 'Root element not set' error. Any help is much appreciated.
Thank you,
John
Schema Modifications:
1) Create a new schema directory named after new root element for new schema [CI_Citation]
2) Copy the contents of the default iso19139 schema directory into new schema directory [CI_Citation]
3) Update the root element references for all xsl files in the CI_Citation directory.
* Note the schema.xsd file remains unmodified
4) web/geonetwork/WEB-INF
-config.xml > add schema reference to <gui>
-config-export.xml > added <service> content for new schema
-user-profiles.xml > added new schema reference under Metadata export services
5) web/geonetwork/xsl
-create new organization schema [metadata-CI_Citation.xsl] (I used metadata-iso19139.xsl as a template and modified where needed).
-metadata-utils.xsl > added new schema reference to <xsl:template mode="schema' match="*">
-metadata.xsl > added schema reference to <!--main schema switch-->
-metadata-show.xsl > added schema reference
-metadata-edit.xsl > added schema reference to <!--thumbnails-->
6) web/geonetwork/xsl/conversion/export
-add new schema xsl [xml_CI_Citation.xsl]
Error Stack
2009-10-07 11:26:10,366 ERROR [jeeves.service] - Exception when executing service
2009-10-07 11:26:10,366 ERROR [jeeves.service] - (C) Exc : java.lang.IllegalStateException: Root element not set
2009-10-07 11:26:10,366 DEBUG [jeeves.service] - Raised exception while executing service
<error id="error">
<message>Root element not set</message>
<class>IllegalStateException</class>
<stack>
<at class="org.jdom.Document" file="Document.java" line="218" method="getRootElement" />
<at class="jeeves.utils.Xml" file="Xml.java" line="185" method="transform" />
<at class="org.fao.geonet.kernel.DataManager" file="DataManager.java" line="504" method="extractUUID" />
<at class="org.fao.geonet.kernel.mef.Importer$1" file="Importer.java" line="142" method="handleInfo" />
<at class="org.fao.geonet.kernel.mef.XMLFileVisitor" file="XMLFileVisitor.java" line="59" method="handleXml" />
<at class="org.fao.geonet.kernel.mef.XMLFileVisitor" file="XMLFileVisitor.java" line="41" method="visit" />
<at class="org.fao.geonet.kernel.mef.MEFLib" file="MEFLib.java" line="62" method="visit" />
<at class="org.fao.geonet.kernel.mef.Importer" file="Importer.java" line="86" method="doImport" />
<at class="org.fao.geonet.kernel.mef.MEFLib" file="MEFLib.java" line="47" method="doImport" />
<at class="org.fao.geonet.services.mef.Import" file="Import.java" line="58" method="exec" />
</stack>
<request>
<language>en</language>
<service>mef.import</service>
</request>
</error>