I am stumped by a "Root element not set" error when importing my MEF files through the metadata insert form, the batch metadata upload form, and when submitting the MEF file to /srv/en/xml.metadata.insert (GeoNetwork 2.4.1). The metadat.xml is ISO 19139 schema valid and I can't see anything wrong with my info.xml.
What am I missing?
Following is the error for my multipart/form-data POST to /srv/en/xml.metadata.insert. I ahve attached an example MEF
2009-11-04 14:46:09,648 INFO [jeeves.request] - ==========================================================
2009-11-04 14:46:09,648 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/xml.user.login
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Method : POST
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Content type : application/x-www-form-urlencoded
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Accept : text/plain
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Session id is F08E0763DA2E8A0391219CCB56642CA0
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Session created for client : 127.0.0.1
2009-11-04 14:46:09,648 INFO [jeeves.service] - Dispatching : xml.user.login
2009-11-04 14:46:09,648 DEBUG [jeeves.service] - -> parameters are :
<request>
<password>admin</password>
<username>admin</username>
</request>
2009-11-04 14:46:09,648 INFO [jeeves.webapp.xml.user.login] - User 'admin' logged in as 'Administrator'
2009-11-04 14:46:09,648 INFO [jeeves.service] - -> dispatching to output for : xml.user.login
2009-11-04 14:46:09,648 INFO [jeeves.service] - -> writing xml for : xml.user.login
2009-11-04 14:46:09,648 DEBUG [jeeves.service] - Service xml is :
<ok />
2009-11-04 14:46:09,648 INFO [jeeves.service] - -> output ended for : xml.user.login
2009-11-04 14:46:09,648 INFO [jeeves.service] - -> dispatch ended for : xml.user.login
2009-11-04 14:46:09,648 INFO [jeeves.request] - ==========================================================
2009-11-04 14:46:09,648 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/mef.import
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Method : POST
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Content type : multipart/form-data; boundary=192.168.56.1.1.412.1257371169.648.1
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Accept : null
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Session id is F08E0763DA2E8A0391219CCB56642CA0
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - Uploading file C:\azgs_borehole_mef\082FFAC8-AFA7-44A5-8870-86AEA5C12DC1.mef type: application/octet-stream size: 13877
2009-11-04 14:46:09,648 DEBUG [jeeves.request] - File is called 082FFAC8-AFA7-44A5-8870-86AEA5C12DC1.mef after simplification
2009-11-04 14:46:09,664 DEBUG [jeeves.request] - Adding to parameters: <mefFile type="file" size="13877" content-type="application/octet-stream">082FFAC8-AFA7-44A5-8870-86AEA5C12DC1.mef</mefFile>
2009-11-04 14:46:09,664 INFO [jeeves.service] - Dispatching : mef.import
2009-11-04 14:46:09,664 DEBUG [jeeves.service] - -> parameters are :
<params>
<mefFile type="file" size="13877" content-type="application/octet-stream">082FFAC8-AFA7-44A5-8870-86AEA5C12DC1.mef</mefFile>
</params>
2009-11-04 14:46:09,710 DEBUG [jeeves.webapp.mef.import] - Adding metadata with uuid=082FFAC8-AFA7-44A5-8870-86AEA5C12DC1
2009-11-04 14:46:09,710 ERROR [jeeves.service] - Exception when executing service
2009-11-04 14:46:09,710 ERROR [jeeves.service] - (C) Exc : java.lang.IllegalStateException: Root element not set
2009-11-04 14:46:09,710 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="2036" method="updateFixedInfo" />
<at class="org.fao.geonet.kernel.DataManager" file="DataManager.java" line="1998" method="updateFixedInfoExisting" />
<at class="org.fao.geonet.kernel.DataManager" file="DataManager.java" line="920" method="insertMetadataExt" />
<at class="org.fao.geonet.kernel.mef.Importer$1" file="Importer.java" line="200" method="handleInfo" />
<at class="org.fao.geonet.kernel.mef.MEFFileVisitor" file="MEFFileVisitor.java" line="93" method="handleXml" />
<at class="org.fao.geonet.kernel.mef.MEFFileVisitor" file="MEFFileVisitor.java" line="50" 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" />
</stack>
<request>
<language>en</language>
<service>mef.import</service>
</request>
</error>
2009-11-04 14:46:09,710 INFO [jeeves.service] - -> dispatching to error for : mef.import
2009-11-04 14:46:09,726 INFO [jeeves.service] - -> transforming with stylesheet : C:\Tomcat5527\webapps\geonetwork\/xsl/error.xsl
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> end error transformation for : mef.import
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> error ended for : mef.import
2009-11-04 14:46:09,742 INFO [jeeves.request] - ==========================================================
2009-11-04 14:46:09,742 INFO [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/xml.user.logout
2009-11-04 14:46:09,742 DEBUG [jeeves.request] - Method : GET
2009-11-04 14:46:09,742 DEBUG [jeeves.request] - Content type : null
2009-11-04 14:46:09,742 DEBUG [jeeves.request] - Accept : null
2009-11-04 14:46:09,742 DEBUG [jeeves.request] - Session id is F08E0763DA2E8A0391219CCB56642CA0
2009-11-04 14:46:09,742 INFO [jeeves.service] - Dispatching : xml.user.logout
2009-11-04 14:46:09,742 DEBUG [jeeves.service] - -> no input parameters
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> dispatching to output for : xml.user.logout
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> writing xml for : xml.user.logout
2009-11-04 14:46:09,742 DEBUG [jeeves.service] - Service xml is :
<ok />
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> output ended for : xml.user.logout
2009-11-04 14:46:09,742 INFO [jeeves.service] - -> dispatch ended for : xml.user.logout
--
_______________________________
Wolfgang Grunberg
Arizona Geological Survey
wgrunberg@anonymised.com
520-770-3500
(attachments)
1AD897A5-369E-4EFF-9328-9FAAD11C992D.mef (13.2 KB)