[Dspace-tech] Error with Dspace OAI-PHM listing records and Identifiers

1,434 views
Skip to first unread message

Francisco Pais

unread,
Aug 26, 2015, 10:39:02 AM8/26/15
to dspac...@lists.sourceforge.net
Hi

I'm trying to make an update from my dspace server to dspace 3.1. I followed all the step, and before the migration, i've copied all data to a new and cleaned dspace 3.1 server. The full application seems to be running right but when I go to oai-phm interface to list Records and Identifiers, the server asks "
No matches for the query"

http://my-server-ip:8080/oai/request?verb=ListSets --> Lists Sets perfectly
http://
my-server-ip:8080/oai/request?verb=ListMetadataFormats --> List Metadata perfectly

http://
my-server-ip:8080/oai/request?verb=ListRecords&metadataPrefix=oai_dc --> Return "No matches for the query"
http://
my-server-ip:8080/oai/request?verb=ListIdentifiers&metadataPrefix=oai_dc--> Return "No matches for the query"

The logs file show no errors and i am sure that there are data inside.

Can you help me? Thank a lot

Francisco Pais

Francisco Pais

unread,
Aug 26, 2015, 10:39:03 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Hi

I have just tried it and there's a type forbidden error when i use that command (as user dspace).

The /var/lib/tomcat6/webapps/solr is now property of dspace (user which execute tomcat) and with permission 777

I can't see why is it forbidden



Fran Pais



[dspace@centos63]$ ./dspace oai import -c
 INFO [main] (DSpaceKernelInit.java:52) - Created new kernel: DSpaceKernel:org
space:name=1b67527e-e51a-4a71-8bf9-0ea69edbdf9d,type=DSpaceKernel:lastLoad=null:
loadTime=0:running=false:kernel=null
 INFO [main] (ConfigurationManager.java:1224) - Loading from classloader: file:/dspace/config/dspace.cfg
 INFO [main] (ConfigurationManager.java:1224) - Using dspace provided log configuration (log.init.config)
 INFO [main] (ConfigurationManager.java:1224) - Loading: /dspace/config/log4j.properties
OAI 2.0 manager action started
Clearing index
org.apache.solr.common.SolrException: Prohibido

Prohibido

request: http://10.8.40.56:8080/solr/oai/update?wt=javabin&version=2
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
        at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
        at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
        at org.apache.solr.client.solrj.SolrServer.deleteByQuery(SolrServer.java:110)
        at org.dspace.xoai.app.XOAI.clearIndex(XOAI.java:366)
        at org.dspace.xoai.app.XOAI.index(XOAI.java:126)
        at org.dspace.xoai.app.XOAI.main(XOAI.java:439)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)



De: "helix84" <hel...@centrum.sk>
Para: "Francisco Pais Suarez" <francis...@udc.es>
CC: dspac...@lists.sourceforge.net
Enviados: Martes, 26 de Marzo 2013 10:41:13
Asunto: Re: [Dspace-tech] Error with Dspace OAI-PHM listing records and Identifiers

Hi Francisco,

try running
[dspace]/bin/dspace oai import -c

Does that fix the problem?

If not, try accessing ListRecords or ListIdentifiers again and look at
what was added at that time to the Solr log (presumably catalina.out).


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette



helix84

unread,
Aug 26, 2015, 10:39:03 AM8/26/15
to Francisco Pais Suarez, dspac...@lists.sourceforge.net

helix84

unread,
Aug 26, 2015, 10:39:04 AM8/26/15
to Francisco Pais Suarez, dspac...@lists.sourceforge.net
Is your Solr (10.8.40.56) on the same machine as DSpace? By default,
the Solr HTTP interface is restricted only to access from localhost.
See details here:

https://wiki.duraspace.org/display/DSPACE/Solr

helix84

unread,
Aug 26, 2015, 10:39:06 AM8/26/15
to Francisco Pais Suarez, dspac...@lists.sourceforge.net
BTW you can change the Solr URL (solr.url) in
[dspace]/config/modules/oai.cfg. Try using "localhost" as the hostname
if you can. Modifications to configuration require Tomcat restart.

Francisco Pais

unread,
Aug 26, 2015, 10:39:12 AM8/26/15
to hel...@centrum.sk, dspac...@lists.sourceforge.net
Hi

I've modified that parameter, now i am using localhost as you said. After that, I ran again "dspace oai import -c" and after a first problem with permissions, it works..
....
6300 items imported so far...
6400 items imported so far...
6500 items imported so far...
Total: 6579 items
OAI 2.0 manager action ended. It took 314 seconds.

After this, I started again Tomcat but the problem with oai-phm is still there! Any idea?

There's nothing at catalina.out or dspace.log.2013.3.26







De: "helix84" <hel...@centrum.sk>
Para: "Francisco Pais Suarez" <francis...@udc.es>
CC: dspac...@lists.sourceforge.net
Enviados: Martes, 26 de Marzo 2013 10:59:01

Asunto: Re: [Dspace-tech] Error with Dspace OAI-PHM listing records and Identifiers

helix84

unread,
Aug 26, 2015, 10:39:14 AM8/26/15
to Francisco Pais Suarez, João Melo, dspac...@lists.sourceforge.net
Sorry Francisco, no more ideas.

João, could you please take a look? Here's the whole thread:

http://dspace.2283337.n4.nabble.com/Error-with-Dspace-OAI-PHM-listing-records-and-Identifiers-td4662827.html

esa

unread,
Aug 26, 2015, 10:52:12 AM8/26/15
to dspac...@lists.sourceforge.net
hi, i have same problem with you, and i manage to finish it.

try deleting files in [dspace folder]/var/oai/requests

I managed to bring up the record after deleting all the files in the folder,
but I have another problem when trying to use the OAI-ORE

see my post if you can help me ..
my post:
http://dspace.2283337.n4.nabble.com/Cannot-harvesting-with-bitstream-use-OAI-ORE-OAI-ORE-Bitstream-is-null-td4663798.html

thanks,

Esa



--
View this message in context: http://dspace.2283337.n4.nabble.com/Error-with-Dspace-OAI-PHM-listing-records-and-Identifiers-tp4662827p4663826.html
Sent from the DSpace - Tech mailing list archive at Nabble.com.

helix84

unread,
Aug 26, 2015, 10:52:34 AM8/26/15
to esa, dspace-tech
On Wed, May 15, 2013 at 6:23 PM, esa <esa....@gmail.com> wrote:
> see my post if you can help me ..
> my post:
> http://dspace.2283337.n4.nabble.com/Cannot-harvesting-with-bitstream-use-OAI-ORE-OAI-ORE-Bitstream-is-null-td4663798.html

Hi Esa,

for some reason I didn't get the email you linked to.

In [dspace]/dspace/config/modules/oai.cfg uncomment the following line:
ore.authoritative.source = oai

and add
dspace.oai.url = http://example.com
where the value would point to your XMLUI (same value as dspace.baseUrl).

esa

unread,
Aug 26, 2015, 10:52:55 AM8/26/15
to dspac...@lists.sourceforge.net
hi helix, thanks for your reply

its work! now i can get the ore.xml

but i'm still get error. this is the error (in dspace log) :

2013-05-16 00:42:00,953 ERROR org.dspace.harvest.OAIHarvester @ Error
occured while generating an OAI response: Server returned HTTP response
code: 400 for URL:
http://demodspace.widyatama.ac.id:8080/xmlui/bitstream/123456789%2F34/1/bitstream
null

I have traced the source and get the error in the method runHarvest at
OAIHarvester class (), but I am still confused why this error occurred.

and what do you mean you didn't get the email that i linked to?




--
View this message in context: http://dspace.2283337.n4.nabble.com/Error-with-Dspace-OAI-PHM-listing-records-and-Identifiers-tp4662827p4663921.html

helix84

unread,
Aug 26, 2015, 10:52:56 AM8/26/15
to esa, dspace-tech
The 123456789%2F34 part is almost certainly wrong. %2F is an
url-encoded slash, so you probably copied 123456789/34 as the handle
prefix somewhere and now you're asking for handle 123456789%2F34/1,
which is obviously wrong.

Also, in the future it helps to send the full stacktrace. In this
case, there are several instances of that message in that class, so I
can't easily pinpoint what caused it.

esa

unread,
Aug 26, 2015, 10:59:05 AM8/26/15
to dspac...@lists.sourceforge.net
hi helix,
you're right. the problem is the HTML URL encoding, but i still cannot find
where is the problem.
i read this :
https://jira.duraspace.org/browse/DS-1014?page=com.xiplink.jira.git.jira-git-plugin:git-commits-tabpanel

but in my OREDisseminationCrosswalk.java the code is fixed.

i try to same thing too at OREIngestionCrosswalk.java because the both
OREDisseminationCrosswalk.java and OREIngestionCrosswalk.java have same
method (encodeForURL(String sourceString)). but its still not working. the
method only change the url into hexa.

until now i cannot find where is the problem. so to finish it, i using
URLDecoder in java to change %2f to ascii and its worked, %2f is change to
'/'.

thanks helix, for your help. sorry for my bad english.



--
View this message in context: http://dspace.2283337.n4.nabble.com/Error-with-Dspace-OAI-PHM-listing-records-and-Identifiers-tp4662827p4664511.html

hblancoca

unread,
Aug 26, 2015, 11:47:46 AM8/26/15
to dspac...@lists.sourceforge.net
I have the same problem but when i try to connec to to listsets. http://repository.eia.edu.co/oai/request?verb=ListSets --> Return "No matches for the query" http://repository.eia.edu.co/oai/request?verb=ListMetadataFormats --> List Metadata perfectly http://repository.eia.edu.co/oai/request?verb=ListRecords&metadataPrefix=oai_dc --> List Metadata perfectly http://repository.eia.edu.co/oai/request?verb=ListIdentifiers&metadataPrefix=oai_dc --> List Metadata perfectly If I find an validator like openarchives and obtain this error (http://www.openarchives.org/Register/ValidateSite?log=28354) [FAIL] Failed to extract any setSpec elements from ListSets but did not find a noSetHierarchy exception. Found instead a 'numErrors, noRecordsMatch' exception(s). Any Idea??

View this message in context: Re: Error with Dspace OAI-PHM listing Sets

helix84

unread,
Aug 26, 2015, 11:47:48 AM8/26/15
to hblancoca, dspace-tech
Hi Humberto,

I don't think I've seen this particular error before (with ListSets).
Please, try recreating the oai index by running "[dspace]/bin/dspace
oai import -c".

Which version of DSpace are you using?
Reply all
Reply to author
Forward
0 new messages