Re: [Dspace-tech] Accessing Metadata via OAI
I think that for now you can ignore that the Solr search or OAI interface doesn't find the item with the handle you provided - if you can't run oai import, it simply isn't there in the Solr index. Did you change any code or schema.xml from the Solr oai core? What is the output of this command? diff -u [dspace-source]/dspace/solr/oai/conf/schema.xml [dspace]/solr/oai/conf/schema.xml The SolrException: Bad Request when doing a solr update (oai import) points to some inconsistency between the existing index (data) and its schema.xml. This is also suspicious (it shouldn't happen if you didn't do any modifications): SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle Try this: * shut down Tomcat * backup your [dspace]/solr/oai/ directory * delete /dspace/solr/oai/data/ * start Tomcat * run oai import Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
On 01/23/2013 09:55 AM, helix84 wrote: I think that for now you can ignore that the Solr search or OAI interface doesn't find the item with the handle you provided - if you can't run oai import, it simply isn't there in the Solr index. Did you change any code or schema.xml from the Solr oai core? What is the output of this command? diff -u [dspace-source]/dspace/solr/oai/conf/schema.xml [dspace]/solr/oai/conf/schema.xml Shows no differences... The SolrException: Bad Request when doing a solr update (oai import) points to some inconsistency between the existing index (data) and its schema.xml. This is also suspicious (it shouldn't happen if you didn't do any modifications): SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle Well, I assume it must be items without Handles, which are actually apparent in my database because of a bug in my modifications of the HandleIdentifierProvider. That bug I already fixed, but during testing some items had their handles deleted and it's probably those items that are causing the trouble now. Thanks also to João for pointing out this possibility, I'm going to delete those items now and see if anything changes. I'll hear back with the results of that. Best, Joachim Try this: * shut down Tomcat * backup your [dspace]/solr/oai/ directory * delete /dspace/solr/oai/data/ * start Tomcat * run oai import Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
Yes, that was it... Items without handles caused the problem, everything fine now. Thanks for your help! On 01/23/2013 10:20 AM, Joachim Bingel wrote: On 01/23/2013 09:55 AM, helix84 wrote: I think that for now you can ignore that the Solr search or OAI interface doesn't find the item with the handle you provided - if you can't run oai import, it simply isn't there in the Solr index. Did you change any code or schema.xml from the Solr oai core? What is the output of this command? diff -u [dspace-source]/dspace/solr/oai/conf/schema.xml [dspace]/solr/oai/conf/schema.xml Shows no differences... The SolrException: Bad Request when doing a solr update (oai import) points to some inconsistency between the existing index (data) and its schema.xml. This is also suspicious (it shouldn't happen if you didn't do any modifications): SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle Well, I assume it must be items without Handles, which are actually apparent in my database because of a bug in my modifications of the HandleIdentifierProvider. That bug I already fixed, but during testing some items had their handles deleted and it's probably those items that are causing the trouble now. Thanks also to João for pointing out this possibility, I'm going to delete those items now and see if anything changes. I'll hear back with the results of that. Best, Joachim Try this: * shut down Tomcat * backup your [dspace]/solr/oai/ directory * delete /dspace/solr/oai/data/ * start Tomcat * run oai import Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
One last question: what database table does Solr use to retrieve its list of items to be indexed? I deleted all broken entries in tables item, handle, metadatavalue, etc. but indexing still aborts with the Bad Request exception (missing required field: item.handle) after a couple of indexed items. Thanks, Joachim On 01/23/2013 11:20 AM, Joachim Bingel wrote: Yes, that was it... Items without handles caused the problem, everything fine now. Thanks for your help! On 01/23/2013 10:20 AM, Joachim Bingel wrote: On 01/23/2013 09:55 AM, helix84 wrote: I think that for now you can ignore that the Solr search or OAI interface doesn't find the item with the handle you provided - if you can't run oai import, it simply isn't there in the Solr index. Did you change any code or schema.xml from the Solr oai core? What is the output of this command? diff -u [dspace-source]/dspace/solr/oai/conf/schema.xml [dspace]/solr/oai/conf/schema.xml Shows no differences... The SolrException: Bad Request when doing a solr update (oai import) points to some inconsistency between the existing index (data) and its schema.xml. This is also suspicious (it shouldn't happen if you didn't do any modifications): SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle Well, I assume it must be items without Handles, which are actually apparent in my database because of a bug in my modifications of the HandleIdentifierProvider. That bug I already fixed, but during testing some items had their handles deleted and it's probably those items that are causing the trouble now. Thanks also to João for pointing out this possibility, I'm going to delete those items now and see if anything changes. I'll hear back with the results of that. Best, Joachim Try this: * shut down Tomcat * backup your [dspace]/solr/oai/ directory * delete /dspace/solr/oai/data/ * start Tomcat * run oai import Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
On Wed, Jan 23, 2013 at 1:48 PM, Joachim Bingel bin...@ids-mannheim.de wrote: One last question: what database table does Solr use to retrieve its list of items to be indexed? See these 2 methods: https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-oai/src/main/java/org/dspace/xoai/app/XOAI.java#L172 Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
[Dspace-tech] Accessing Metadata via OAI
Hi all, I need to access the metadata of my DSpace items from an external script and figured I would do so using the OAI webapp and the GetRecord verb (I run DSpace 3.0). For some reason, however, OAI only displays a very small subset of my items, all uploaded before a certain date. When running [dspace]/bin/dspace oai import OAI tells me it is searching for documents modified after that date (incremental import) but fails with a: org.apache.solr.common.SolrException: Bad Request Here's the stacktrace: request: http://localhost:8080/solr/oai/update?wt=javabinversion=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.add(SolrServer.java:64) at org.dspace.xoai.app.XOAI.index(XOAI.java:217) at org.dspace.xoai.app.XOAI.index(XOAI.java:183) at org.dspace.xoai.app.XOAI.index(XOAI.java:141) at org.dspace.xoai.app.XOAI.main(XOAI.java:427) 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) I also tried this on my dev instance of DSpace 3.0-rc3, with the same result except that the avaliable options for [dspace]/bin/dspace oai change to clean-cache, compile-items and erase-compiled-items. compile-items fails with a java.lang.NullPointerException at org.dspace.xoai.util.XOAICacheManager.getMetadataCache(XOAICacheManager.java:81) at org.dspace.xoai.util.XOAICacheManager.compileItem(XOAICacheManager.java:87) at org.dspace.xoai.app.XOAI.compile(XOAI.java:490) at org.dspace.xoai.app.XOAI.main(XOAI.java:438) 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:616) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183) Is the oai import the right command at all? Or do I need to adjust some other things for OAI to access all my items? Collections and communities are displayed fine, btw. Thanks for your help, Joachim -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
Hi Joachim, are you aware that there's a limit on the number results returned at once? [1] The next batch can be requested using the resumptionToken provided in the current batch. The batch size can be configured [2]. Try [dspace]/bin/dspace oai import -c to rebuild the index completely. oai import indexed only items changed since its last run (i.e. incremental import). [3] Does that clear it up / solve the problem? [1] http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl [2] https://wiki.duraspace.org/display/DSDOC3x/OAI+2.0+Server#OAI2.0Server-Generaloptions [3] https://wiki.duraspace.org/display/DSDOC3x/OAI+2.0+Server#OAI2.0Server-OAIManager(SolrDataSource) Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
On 22 January 2013 13:19, Joachim Bingel bin...@ids-mannheim.de wrote: org.apache.solr.common.SolrException: Bad Request Hi Joachim, your log information is too short. Please, look at the Solr log for the full stack trace. -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official websitehttp://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2Fsa=Dsntz=1usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ [image: Follow us on Facebook]http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncodesa=Dsntz=1usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncodesa=Dsntz=1usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
Hi helix, thanks for your answer! However the batch size does not seem to be the problem. Only certain records can be returned at all, for some (existing) items the request by their (existing) ID returns no matches for the query. This is what the Catalina log says: Jan 22, 2013 3:04:10 PM org.apache.solr.core.SolrCore execute INFO: [oai] webapp=/solr path=/select params={sort=item.id+ascq=item.handle:10932/00-0166-14DE-96C0-2701-9wt=javabinversion=2} hits=0 status=0 QTime=0 Rebuilding the index with import -c still does not work -- it gives me the same org.apache.solr.common.SolrException (Bad Request) as before. -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d ___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
Re: [Dspace-tech] Accessing Metadata via OAI
Thanks João, the Solr query returns: response lstname=responseHeader intname=status0/int intname=QTime1/int lstname=params strname=sortitem.id asc/str strname=qitem.handle:10932/00-0166-14DE-96C0-2701-9/str /lst /lst resultname=responsenumFound=0start=0/ /response which means Solr still has not found the item. I've set the logging level to FINEST and [dspace]/bin/dspace oai import gives me: Jan 22, 2013 5:16:42 PM org.apache.solr.core.SolrCore execute INFO: [oai] webapp=/solr path=/select params={fl=item.lastmodifiedsort=item.lastmodified+desc,item.id+ascq=*:*wt=javabinrows=1version=2} hits=1 status=0 QTime=0 Jan 22, 2013 5:16:43 PM org.apache.solr.update.processor.LogUpdateProcessor processAdd FINE: add (null) Jan 22, 2013 5:16:43 PM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {add=[(null)]} 0 14 Jan 22, 2013 5:16:43 PM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:346) at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:158) at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) ... Does this tell you anything? Note that there is exactly 1 retrieved hit which is in accordance with the OAI webapp display, yet there are 31 documents in the databse. On 01/22/2013 05:05 PM, João Melo wrote: Hi Joachim, you'll need to low your log level to see the full stack trace (you're correct the solr log is dumped to catalina.out). if you are using the solr server from dspace access to the admin log panel (http://localhost:8080/solr/admin/logging - only supports local access). But you could also try to query the solr server directly and see the output. In your case, try the following query: http://localhost:8080/solr/oai/select?sort=item.id+ascq=item.handle:10932/00-0166-14DE-96C0-2701-9 Any error? On 22 January 2013 14:18, Joachim Bingel bin...@ids-mannheim.de mailto:bin...@ids-mannheim.de wrote: Hi João, I feel stupid asking this, but where is the solr log? There's no log/ directory or .log files under [dspace]/solr nor under [dspace]/webapps/[oai|solr]. All I've got is what's in the Catalina log: Jan 22, 2013 3:04:10 PM org.apache.solr.core.SolrCore execute INFO: [oai] webapp=/solr path=/select params={sort=item.id http://item.id+ascq=item.handle:10932/00-0166-14DE-96C0-2701-9wt=javabin version=2} hits=0 status=0 QTime=0 This demonstrates how a request for an item with an existing identifier (can be reached in the XMLUI) fails (hits=0). Thanks for your help! Joachim On 01/22/2013 03:05 PM, João Melo wrote: On 22 January 2013 13:19, Joachim Bingel bin...@ids-mannheim.de mailto:bin...@ids-mannheim.de wrote: org.apache.solr.common.SolrException: Bad Request Hi Joachim, your log information is too short. Please, look at the Solr log for the full stack trace. -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official website http://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2Fsa=Dsntz=1usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ Follow us on Facebook http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncodesa=Dsntz=1usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncodesa=Dsntz=1usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 tel:%2B49%20-%20%280%29621-1581-456 |http://www.ids-mannheim.de -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official website http://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2Fsa=Dsntz=1usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ Follow us on Facebook http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncodesa=Dsntz=1usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncodesa=Dsntz=1usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim +49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with
Re: [Dspace-tech] Accessing Metadata via OAI
Hi Joachim, looks like there are items without handle, resulting in the above exception. Is that possible? On 22 January 2013 16:21, Joachim Bingel bin...@ids-mannheim.de wrote: Thanks João, the Solr query returns: response lst name=responseHeader int name=status0/int int name=QTime1/int lst name=params str name=sortitem.id asc/str str name=qitem.handle:10932/00-0166-14DE-96C0-2701-9/str /lst /lst result name=response numFound=0 start=0/ /response which means Solr still has not found the item. I've set the logging level to FINEST and [dspace]/bin/dspace oai import gives me: Jan 22, 2013 5:16:42 PM org.apache.solr.core.SolrCore execute INFO: [oai] webapp=/solr path=/select params={fl=item.lastmodifiedsort=item.lastmodified+desc,item.id+ascq=*:*wt=javabinrows=1version=2} hits=1 status=0 QTime=0 Jan 22, 2013 5:16:43 PM org.apache.solr.update.processor.LogUpdateProcessor processAdd FINE: add (null) Jan 22, 2013 5:16:43 PM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {add=[(null)]} 0 14 Jan 22, 2013 5:16:43 PM org.apache.solr.common.SolrException log SEVERE: org.apache.solr.common.SolrException: [doc=null] missing required field: item.handle at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:346) at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60) at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115) at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:158) at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58) ... Does this tell you anything? Note that there is exactly 1 retrieved hit which is in accordance with the OAI webapp display, yet there are 31 documents in the databse. On 01/22/2013 05:05 PM, João Melo wrote: Hi Joachim, you'll need to low your log level to see the full stack trace (you're correct the solr log is dumped to catalina.out). if you are using the solr server from dspace access to the admin log panel (http://localhost:8080/solr/admin/logging - only supports local access). But you could also try to query the solr server directly and see the output. In your case, try the following query: http://localhost:8080/solr/oai/select?sort=item.id+ascq=item.handle:10932/00-0166-14DE-96C0-2701-9 Any error? On 22 January 2013 14:18, Joachim Bingel bin...@ids-mannheim.de wrote: Hi João, I feel stupid asking this, but where is the solr log? There's no log/ directory or .log files under [dspace]/solr nor under [dspace]/webapps/[oai|solr]. All I've got is what's in the Catalina log: Jan 22, 2013 3:04:10 PM org.apache.solr.core.SolrCore execute INFO: [oai] webapp=/solr path=/select params={sort=item.id+ascq=item.handle:10932/00-0166-14DE-96C0-2701-9wt=javabin version=2} hits=0 status=0 QTime=0 This demonstrates how a request for an item with an existing identifier (can be reached in the XMLUI) fails (hits=0). Thanks for your help! Joachim On 01/22/2013 03:05 PM, João Melo wrote: On 22 January 2013 13:19, Joachim Bingel bin...@ids-mannheim.de wrote: org.apache.solr.common.SolrException: Bad Request Hi Joachim, your log information is too short. Please, look at the Solr log for the full stack trace. -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official websitehttp://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2Fsa=Dsntz=1usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ [image: Follow us on Facebook]http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncodesa=Dsntz=1usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncodesa=Dsntz=1usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim+49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official websitehttp://www.google.com/url?q=http%3A%2F%2Fwww.lyncode.com%2Fsa=Dsntz=1usg=AFrqEzdV8iS6rMxflxnn138XReuRfUG3OQ [image: Follow us on Facebook]http://www.google.com/url?q=http%3A%2F%2Ftwitter.com%2Flyncodesa=Dsntz=1usg=AFrqEzeDuT3ZqMW5uVIA8AoxtTtAeiCX3Q http://www.google.com/url?q=http%3A%2F%2Fwww.facebook.com%2Flyncodesa=Dsntz=1usg=AFrqEzcWXjHa3gKBGLsNVxktapxkiWDnww -- Joachim Bingel Institut für Deutsche Sprache, Zentrale Forschung R5, 6-13, 68161 Mannheim+49 - (0)621-1581-456 | http://www.ids-mannheim.de -- Thanks, João Melo (My Portfolio http://www.lyncode.com/m/jmelo/) DSpace Department *Lyncode*: Official
Re: [Dspace-tech] Accessing Metadata via OAI
On Tue, Jan 22, 2013 at 2:19 PM, Joachim Bingel bin...@ids-mannheim.dewrote: I also tried this on my dev instance of DSpace 3.0-rc3, with the same result except that the avaliable options for [dspace]/bin/dspace oai change to clean-cache, compile-items and erase-compiled-items. compile-items fails with a java.lang.NullPointerException These options indicate that you're using the database backend in OAI, not Solr. (storage=database in [dspace]/config/modules/oai.cfg). I'm not sure how you could get the same result (SolrException: Bad Request) when using the database backend - Solr shouldn't be used in that case at all! In any case, this also independently points to the fact that the handle of your item cannot be retrieved: https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace-oai/src/main/java/org/dspace/xoai/util/XOAICacheManager.java#L81 How did you store such handle (the handle postfix is non-standard for DSpace)? Did you do any customizations to store such handles? Regards, ~~helix84 Compulsory reading: DSpace Mailing List Etiquette https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d___ DSpace-tech mailing list DSpace-tech@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-tech List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette