clarinsi / clarin-dspace

LINDAT/CLARIN digital repository based on DSpace
http://lindat.cz
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Missing distributionAccessMedium metadata values #19

Open cyplas opened 7 years ago

cyplas commented 7 years ago

From our healthchecks:

ERROR Missed @ Item with handle 11356/1025 is ERROR Missed @ Item with handle 11356/1025 is missing value for distributionAccessMedium. Using 'downloadable' instead.. Using 'downloadable' instead.
cyplas commented 7 years ago

Maybe useful: https://github.com/ufal/clarin-dspace/wiki/Metadata-info#meta-share-crosswalk

cyplas commented 6 years ago

This seems to be fixed, it no longer shows up on healthchecks.

cyplas commented 6 years ago

This seems to be fixed, it no longer shows up on healthchecks.

Hmm, spoke to soon, it's back. Odd.

cyplas commented 6 years ago

Looking in the logs, it's clear that "every now and then" this error is logged in dspace.ufal.metashare-missing.log.* for almost all items (the recent cases list 98). And this is the only thing that is ever logged in these files, so these log files are typically size 0, but sometimes size 14112 (the recent ones). I'm not sure what triggers these errors, but it's not a regular cron job.

cyplas commented 6 years ago

After looking into the java code, I was able to reproduce this (though only once), via the oai application, by changing the URL metadataPrefix URL parameter value to oai_metasharev2.

cyplas commented 6 years ago

Should look here: https://github.com/clarinsi/clarin-dspace/blob/d475cc1921a78d515ef863b5a593b352e778d2e3/dspace/config/crosswalks/oai/metadataFormats/metasharev2.xsl#L129

cyplas commented 5 years ago

After looking into the java code, I was able to reproduce this (though only once), via the oai application, by changing the URL metadataPrefix URL parameter value to oai_metasharev2.

More precisely, these errors are triggered (and logged) when visiting http://beta.clarin.si/repository/oai/request?verb=ListRecords&metadataPrefix=oai_metasharev2 for the first time after make restart.

kosarko commented 5 years ago

One more trigger could actually be https://github.com/clarinsi/clarin-dspace/blob/d475cc1921a78d515ef863b5a593b352e778d2e3/dspace/config/crosswalks/oai/metadataFormats/lindat_cmdi.xsl#L135, I guess it also depends on how the caching for oai is configured. But you have the gist of it - when it generates the metashare metadata it logs this error. It's there for the sake of compatibility with some old implementation of the oai-metashare crosswalk. In this particular case it always uses the default (and logs the error - somewhere aroud https://github.com/clarinsi/clarin-dspace/blob/d475cc1921a78d515ef863b5a593b352e778d2e3/dspace-oai/src/main/java/cz/cuni/mff/ufal/utils/XslLogUtil.java#L22). Maybe a different log level would be appropriate here, to remind us that a default was used but not to clutter the health checks. In the other cases, where it at least tries to access a metadata value before logging, I'd still consider it an error.