Opened 14 years ago

Closed 13 years ago

#472 closed defect (fixed)

"Error 500" whenever I try and delete "organisation name"

Reported by: osjonathan Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.6.4
Component: General Version: v2.6.3
Keywords: Cc:

Description

I'm trying to customise a metadata template by removing the "Individual name" from one of the two "contact" headings I have under the "metadata" branch. I press the little "x", then press "save" and it gives me a javascript error 100% of the time:

"Error: Could not save form/ status 500 text: Internal Server Error - Try again later"

The console / log error is:

2011-03-18 13:40:20,020 INFO  [jeeves.request] - ==========================================================
2011-03-18 13:40:20,020 INFO  [jeeves.request] - HTML Request (from 127.0.0.1) : /geonetwork/srv/en/metadata.update
2011-03-18 13:40:20,020 DEBUG [jeeves.request] - Method       : POST
2011-03-18 13:40:20,020 DEBUG [jeeves.request] - Content type : application/x-www-form-urlencoded; charset=UTF-8
2011-03-18 13:40:20,020 DEBUG [jeeves.request] - Accept       : text/javascript, text/html, application/xml, text/xml, */*
2011-03-18 13:40:20,020 DEBUG [jeeves.request] - Session id is uq2gxyt2x81h
2011-03-18 13:40:20,020 INFO  [jeeves.service] - Dispatching : metadata.update
2011-03-18 13:40:20,020 DEBUG [jeeves.service] -  -> parameters are : 
<request>
  <position>-1</position>
  <_73_codeListValue>publication</_73_codeListValue>
  <_119_codeListValue />
  <licenseurl />
  <_27 />
  <_51 />
  <_77 />
  <_59_codeListValue />
  <_23 />
  <type />
  <_55 />
  <_25 />
  <_53 />
  <version>13</version>
  <_71 />
  <child />
  <id>13</id>
  <_47 />
  <_11 />
  <_9 />
  <_49 />
  <name />
  <_67>Copy of Corp</_67>
  <fname />
  <template>y</template>
  <_107 />
  <editing>13</editing>
  <_29_codeListValue>pointOfContact</_29_codeListValue>
  <_101 />
  <_19 />
  <_17 />
  <_41 />
  <_123 />
  <access />
  <_75_codeListValue />
  <_81_codeListValue />
  <_85_codeListValue />
  <_103_codeListValue>theme</_103_codeListValue>
  <_43 />
  <_121 />
  <showvalidationerrors>false</showvalidationerrors>
  <_35 />
  <ref />
  <_57 />
  <_113_codeListValue />
  <_79 />
  <currTab>simple</currTab>
  <_109_codeListValue>place</_109_codeListValue>
</request>
2011-03-18 13:40:20,020 ERROR [geonetwork.datamanager] - Element not found at ref = 35
2011-03-18 13:40:20,020 ERROR [jeeves.service] - Exception when executing service
2011-03-18 13:40:20,020 ERROR [jeeves.service] -  (C) Exc : java.lang.NullPointerException
2011-03-18 13:40:20,020 DEBUG [jeeves.service] - Raised exception while executing service
<error id="error">
  <message />
  <class>NullPointerException</class>
  <stack>
    <at class="org.fao.geonet.kernel.DataManager" file="DataManager.java" line="1570" method="updateMetadataEmbedded" />
    <at class="org.fao.geonet.services.metadata.EditUtils" file="EditUtils.java" line="135" method="updateContent" />
    <at class="org.fao.geonet.services.metadata.Update" file="Update.java" line="94" method="exec" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="ServiceInfo.java" line="238" method="execService" />
    <at class="jeeves.server.dispatchers.ServiceInfo" file="ServiceInfo.java" line="141" method="execServices" />
    <at class="jeeves.server.dispatchers.ServiceManager" file="ServiceManager.java" line="399" method="dispatch" />
    <at class="jeeves.server.JeevesEngine" file="JeevesEngine.java" line="670" method="dispatch" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="JeevesServlet.java" line="185" method="execute" />
    <at class="jeeves.server.sources.http.JeevesServlet" file="JeevesServlet.java" line="108" method="doPost" />
    <at class="javax.servlet.http.HttpServlet" file="HttpServlet.java" line="727" method="service" />
  </stack>
  <request>
    <language>en</language>
    <service>metadata.update</service>
  </request>
</error>
2011-03-18 13:40:20,020 INFO  [jeeves.service] -    -> dispatching to error for : metadata.update
2011-03-18 13:40:20,036 DEBUG [jeeves.engine] - TransformerFactoryFactory: de.fzi.dbs.xml.transform.CachingTransformerFactory
2011-03-18 13:40:20,036 DEBUG [jeeves.engine] - TransformerFactoryFactory: produces transformer implementation net.sf.saxon.IdentityTransformer
2011-03-18 13:40:20,036 INFO  [jeeves.service] -      -> transforming with stylesheet : C:\Program Files\geonetwork\web\geonetwork/xsl/error.xsl
2011-03-18 13:40:20,036 DEBUG [jeeves.engine] - TransformerFactoryFactory: de.fzi.dbs.xml.transform.CachingTransformerFactory
2011-03-18 13:40:20,036 DEBUG [jeeves.engine] - TransformerFactoryFactory: produces transformer implementation net.sf.saxon.IdentityTransformer
2011-03-18 13:40:20,051 INFO  [jeeves.service] -      -> end error transformation for : metadata.update
2011-03-18 13:40:20,051 INFO  [jeeves.service] -    -> error ended for : metadata.update

Attached is a zip for the template to help replicate it.

Change History (3)

comment:1 by osjonathan, 14 years ago

Ok, I can't upload the file. Firefox and IE both give "Missing or invalid form token. Do you have cookies enabled?" (yes, I do have cookies enabled on both). Opera just keeps uploading. It got to 100MB (for a 200kb file!) before I noticed and stopped it.

Below is the XML from metadata.xml inside that zip. Hopefully it's enough until the file uploader starts working:

<?xml version="1.0" encoding="UTF-8"?>

<gmd:MD_Metadata xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gts="http://www.isotc211.org/2005/gts" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:geonet="http://www.fao.org/geonetwork">
  <gmd:fileIdentifier xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:srv="http://www.isotc211.org/2005/srv">
    <gco:CharacterString>bb71c2ac-5584-4272-8f97-e554706c0d04</gco:CharacterString>
  </gmd:fileIdentifier>
  <gmd:characterSet>
    <gmd:MD_CharacterSetCode codeListValue="utf8" codeList="./resources/codeList.xml#MD_CharacterSetCode" />
  </gmd:characterSet>
  <gmd:contact>
    <gmd:CI_ResponsibleParty>
      <gmd:organisationName gco:nilReason="missing">
        <gco:CharacterString />
      </gmd:organisationName>
      <gmd:positionName gco:nilReason="missing">
        <gco:CharacterString />
      </gmd:positionName>
      <gmd:contactInfo>
        <gmd:CI_Contact>
          <gmd:phone>
            <gmd:CI_Telephone>
              <gmd:voice gco:nilReason="missing">
                <gco:CharacterString />
              </gmd:voice>
              <gmd:facsimile gco:nilReason="missing">
                <gco:CharacterString />
              </gmd:facsimile>
            </gmd:CI_Telephone>
          </gmd:phone>
          <gmd:address>
            <gmd:CI_Address>
              <gmd:city gco:nilReason="missing">
                <gco:CharacterString />
              </gmd:city>
              <gmd:administrativeArea gco:nilReason="missing">
                <gco:CharacterString />
              </gmd:administrativeArea>
              <gmd:electronicMailAddress gco:nilReason="missing">
                <gco:CharacterString />
              </gmd:electronicMailAddress>
            </gmd:CI_Address>
          </gmd:address>
        </gmd:CI_Contact>
      </gmd:contactInfo>
      <gmd:role>
        <gmd:CI_RoleCode codeListValue="pointOfContact" codeList="http://www.isotc211.org/2005/resources/codeList.xml#CI_RoleCode" />
      </gmd:role>
    </gmd:CI_ResponsibleParty>
  </gmd:contact>
  <gmd:contact>
    <gmd:CI_ResponsibleParty>
      <gmd:individualName>
        <gco:CharacterString />
      </gmd:individualName>
      <gmd:organisationName>
        <gco:CharacterString />
      </gmd:organisationName>
      <gmd:contactInfo>
        <gmd:CI_Contact>
          <gmd:phone>
            <gmd:CI_Telephone>
              <gmd:voice>
                <gco:CharacterString />
              </gmd:voice>
              <gmd:facsimile>
                <gco:CharacterString />
              </gmd:facsimile>
            </gmd:CI_Telephone>
          </gmd:phone>
          <gmd:address>
            <gmd:CI_Address>
              <gmd:deliveryPoint>
                <gco:CharacterString />
              </gmd:deliveryPoint>
              <gmd:city>
                <gco:CharacterString />
              </gmd:city>
              <gmd:administrativeArea>
                <gco:CharacterString />
              </gmd:administrativeArea>
              <gmd:postalCode>
                <gco:CharacterString />
              </gmd:postalCode>
              <gmd:country>
                <gco:CharacterString />
              </gmd:country>
              <gmd:electronicMailAddress>
                <gco:CharacterString />
              </gmd:electronicMailAddress>
            </gmd:CI_Address>
          </gmd:address>
        </gmd:CI_Contact>
      </gmd:contactInfo>
      <gmd:role>
        <gmd:CI_RoleCode codeList="" codeListValue="" />
      </gmd:role>
    </gmd:CI_ResponsibleParty>
  </gmd:contact>
  <gmd:dateStamp>
    <gco:DateTime xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:srv="http://www.isotc211.org/2005/srv">2011-03-18T11:59:17</gco:DateTime>
  </gmd:dateStamp>
  <gmd:identificationInfo>
    <gmd:MD_DataIdentification>
      <gmd:citation>
        <gmd:CI_Citation>
          <gmd:title>
            <gco:CharacterString>Copy of Corp</gco:CharacterString>
          </gmd:title>
          <gmd:date>
            <gmd:CI_Date>
              <gmd:date>
                <gco:DateTime />
              </gmd:date>
              <gmd:dateType>
                <gmd:CI_DateTypeCode codeListValue="publication" codeList="http://www.isotc211.org/2005/resources/codeList.xml#CI_DateTypeCode" />
              </gmd:dateType>
            </gmd:CI_Date>
          </gmd:date>
          <gmd:presentationForm>
            <gmd:CI_PresentationFormCode codeListValue="" codeList="http://www.isotc211.org/2005/resources/codeList.xml#CI_PresentationFormCode" />
          </gmd:presentationForm>
        </gmd:CI_Citation>
      </gmd:citation>
      <gmd:abstract gco:nilReason="missing">
        <gco:CharacterString />
      </gmd:abstract>
      <gmd:purpose gco:nilReason="missing">
        <gco:CharacterString />
      </gmd:purpose>
      <gmd:status>
        <gmd:MD_ProgressCode codeListValue="" codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_ProgressCode" />
      </gmd:status>
      <gmd:resourceMaintenance>
        <gmd:MD_MaintenanceInformation>
          <gmd:maintenanceAndUpdateFrequency>
            <gmd:MD_MaintenanceFrequencyCode codeListValue="" codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_MaintenanceFrequencyCode" />
          </gmd:maintenanceAndUpdateFrequency>
        </gmd:MD_MaintenanceInformation>
      </gmd:resourceMaintenance>
      <gmd:graphicOverview>
        <gmd:MD_BrowseGraphic>
          <gmd:fileName gco:nilReason="missing">
            <gco:CharacterString />
          </gmd:fileName>
          <gmd:fileDescription>
            <gco:CharacterString>thumbnail</gco:CharacterString>
          </gmd:fileDescription>
        </gmd:MD_BrowseGraphic>
      </gmd:graphicOverview>
      <gmd:graphicOverview>
        <gmd:MD_BrowseGraphic>
          <gmd:fileName gco:nilReason="missing">
            <gco:CharacterString />
          </gmd:fileName>
          <gmd:fileDescription>
            <gco:CharacterString>large_thumbnail</gco:CharacterString>
          </gmd:fileDescription>
        </gmd:MD_BrowseGraphic>
      </gmd:graphicOverview>
      <gmd:descriptiveKeywords>
        <gmd:MD_Keywords>
          <gmd:keyword gco:nilReason="missing">
            <gco:CharacterString />
          </gmd:keyword>
          <gmd:type>
            <gmd:MD_KeywordTypeCode codeListValue="theme" codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_KeywordTypeCode" />
          </gmd:type>
        </gmd:MD_Keywords>
      </gmd:descriptiveKeywords>
      <gmd:descriptiveKeywords>
        <gmd:MD_Keywords>
          <gmd:keyword gco:nilReason="missing">
            <gco:CharacterString />
          </gmd:keyword>
          <gmd:type>
            <gmd:MD_KeywordTypeCode codeListValue="place" codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_KeywordTypeCode" />
          </gmd:type>
        </gmd:MD_Keywords>
      </gmd:descriptiveKeywords>
      <gmd:resourceConstraints>
        <gmd:MD_LegalConstraints>
          <gmd:accessConstraints>
            <gmd:MD_RestrictionCode codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_RestrictionCode" codeListValue="" />
          </gmd:accessConstraints>
        </gmd:MD_LegalConstraints>
      </gmd:resourceConstraints>
      <gmd:resourceConstraints>
        <gmd:MD_Constraints />
      </gmd:resourceConstraints>
      <gmd:resourceConstraints>
        <gmd:MD_SecurityConstraints>
          <gmd:classification>
            <gmd:MD_ClassificationCode codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_ClassificationCode" codeListValue="" />
          </gmd:classification>
        </gmd:MD_SecurityConstraints>
      </gmd:resourceConstraints>
      <gmd:spatialResolution>
        <gmd:MD_Resolution />
      </gmd:spatialResolution>
      <gmd:topicCategory>
        <gmd:MD_TopicCategoryCode />
      </gmd:topicCategory>
    </gmd:MD_DataIdentification>
  </gmd:identificationInfo>
</gmd:MD_Metadata>

comment:2 by osjonathan, 14 years ago

Trying to delete the "position name" on the other contact entry does the same thing. Going to "XML view" after doing this brings up a HTML page with the very descriptive error:

"The requested operation could not be performed.

NullPointerException :"

The only way to get it working again is with the "reset" button. I can delete it just fine in the raw XML and save that though.

comment:3 by josegar74, 13 years ago

Resolution: fixed
Status: newclosed

Tested after fix for #530 and seem ok now. Closing for now.

Note: See TracTickets for help on using tickets.