ucsdlib / damsmanager

DAMS Manager
Other
3 stars 1 forks source link

Update DOI record fails #355

Closed abbypenn93 closed 5 years ago

abbypenn93 commented 5 years ago

Descriptive summary

Running Update DOI record fails and returns the following error message:

Error updating DOI: error: bad request - datacite: metadata validation error: Element '{http://datacite.org/schema/kernel-4}resource': Missing child element(s). Expected is one of ( {http://datacite.org/schema/kernel-4}resourceType, {http://datacite.org/schema/kernel-4}contributors, {http://datacite.org/schema/kernel-4}language, {http://datacite.org/schema/kernel-4}alternateIdentifiers, {http://datacite.org/schema/kernel-4}relatedIdentifiers, {http://datacite.org/schema/kernel-4}sizes, {http://datacite.org/schema/kernel-4}version, {http://datacite.org/schema/kernel-4}geoLocations, {http://datacite.org/schema/kernel-4}fundingReferences )., line 1 ×

The 4.0 schema targetNamespace (http://datacite.org/schema/kernel-4) that we are currently referencing no longer resolves.

DataCite's new location for the version 4.0 schema is: https://schema.datacite.org/meta/kernel-4.0/metadata.xsd

Rationale

Please replace xmlns="http://datacite.org/schema/kernel-4" with the version 4.0 schema targetNamespace, xmlns=https://schema.datacite.org/meta/kernel-4.0/metadata.xsd in datacite.xsl

Expected behavior

The function Update DOI record will mint a new DOI.

Actual behavior

This will depend on whether the scheme targetNamespace web location is the only problem. It may be the case that we now need to provide more information (more fields) to DataCite in order to mint a new DOI.

Steps to reproduce the behavior

  1. Navigate to object https://library.ucsd.edu/dc/object/bb2666864s
  2. Click Update DOI record
lsitu commented 5 years ago

@abbypenn93 Should we use xmlns="http://schema.datacite.org/meta/kernel-4.0/" and xsi:schemaLocation="http://schema.datacite.org/meta/kernel-4.0/ http://schema.datacite.org/meta/kernel-4.0/metadata.xsd" in datacite.xsl?

<resource xmlns="http://schema.datacite.org/meta/kernel-4.0/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://schema.datacite.org/meta/kernel-4.0/ http://schema.datacite.org/meta/kernel-4.0/metadata.xsd">
lsitu commented 5 years ago

@abbypenn93 Have you ever tried to use Update DOI record function to update other records in prod? I tried it with record https://librarytest.ucsd.edu/dc/collection/bb67275909 on QA and staging but I don't see the error.

arwenhutt commented 5 years ago

hmmmm, @lsitu & @abbypenn93 so it looks like the url that was returning a 404 yesterday is now resolving. Maybe the server was down?

@abbypenn93 can we retest the orginal bug?

lsitu commented 5 years ago

@arwenhutt But I just tried Update DOI record for object https://library.ucsd.edu/dc/object/bb2666864s on prod and I was still seeing the error. Maybe it's just a problem for prod but not staging?

arwenhutt commented 5 years ago

@lsitu oh darn. Not sure about the difference between staging and production - do you know if staging actually mints doi's? I don't think we'd want it to since it's just for testing.

lsitu commented 5 years ago

@arwenhutt I think it should mints doi's from the DOI staging environment and @hjsyoo may know more about it. I think we may need to replicate the problem on QA/staging and confirm the fix before moving it to prod. Thanks.

arwenhutt commented 5 years ago

@lsitu @abbypenn93 okay I think I figured it out. some of the fields datacite requires are at the component level instead of the object level. I added type of resource to the object level for https://library.ucsd.edu/dc/object/bb2666864s the item above, and the update doi function worked.

I'm going to close this issue, thanks for your time @lsitu!