DSpace: No matches for the query (OAI-PMH)

After a recent upgrade to DSpace 3.1 (from 1.7 to 1.8 to 3.x) there was a problem getting the OAI-PMH working.

When visting the OAI harvester’s URL there was an error:

No matches for the query

DSpace: No matches for the query (OAI-PMH)

You can most likely use the default OAI configuration file:

[dspace]/config/modules/oai.cfg

You will need to run one of these commands to get your index:

[dspace]/bin/dspace oai import

Or if you want to clear your index out and rebuild it, i.e. erase existing records from the solr oai index (won’t delete your dspace records) then use:

[dspace]/bin/dspace oai import -c

I checked the /var/log/tomcat6/catalina.out when running this and saw a note that said that I had run out of disk space when doing this. That was one problem.

The other problem was that I actually needed to edit my [dspace]/config/modules/oai.cfg file and update my identifier prefix and url.

The value for identifier.prefix should probably yourdomain.edu without the http, and the bitstream.baseUrl should probably be http://yourdomain.edu with the http. Don’t put a trailing slash on either one.

Also, unless you have a specific reason to change the other settings, leave them the same. They are internal URLs:

# Storage: solr | database 
storage=solr

# Base solr index
solr.url=http://localhost:8080/solr/oai

After updating the settings I restarted tomcat, then re-ran the index with the -c option as mentioned previously, and then the OAI-PMH started working again.

DSpace: No matches for the query (OAI-PMH)

For good measure I also deleted the files out of the requests subdirectory of my cache.dir directory (see your oai.cfg file for that location.)

Related Posts:

  • No Related Posts
This entry was posted in Software, Tech Opinion and tagged , . Bookmark the permalink.

3 Responses to DSpace: No matches for the query (OAI-PMH)

  1. Benson says:

    Thank you very much for this. You saves me lots of hassle and headache. Asante

  2. Umbo says:

    como para agregar al problema no puedo pasar la validación de oai-pmh.

  3. Kreisler says:

    hola amigo gracias por compartir su conocimiento, yo tengo un problema; es que cuando voy a la direccion [dspace]/bin/dspace oai import, dice q no se encuentra el archivo y en realidad no existe. ¿cómo puedo crearlo?. Ademas tambien [dspace]/bin/dspace oai import -c tampoco pude importar por no hay ese archivo.

Leave a Reply

Your email address will not be published. Required fields are marked *