Dspace-CRIS OAI-pmh Error

434 views
Skip to first unread message

陳彥棠

unread,
Nov 21, 2016, 10:35:24 PM11/21/16
to DSpace Technical Support
Dear all

I run Dspace-CRIS 5.5.0  OAI-pmh error ....

I see Dspace-CRIS Edit Collection Last Harvest Result=> Error occurred while processing an OAI record
So I checking dspace.log  message

dspace.log   message


 INFO  org.dspace.content.Item @ anonymous::update_item:item_id=4179
 INFO  org.dspace.content.WorkspaceItem @ anonymous::create_workspace_item:workspace_item_id=-1item_id=4179collection_id=1
 ERROR org.dspace.harvest.OAIHarvester @ Harvesting error occurred while processing an OAI record: The 'item' schema has not been defined in this DSpace instance.
 INFO  org.dspace.content.Collection @ anonymous::update_collection:collection_id=1
 INFO  org.dspace.harvest.OAIHarvester @ Thread for collection 1 completes.
 INFO  org.dspace.harvest.OAIHarvester @ Done with iteration 5
 INFO  org.dspace.harvest.OAIHarvester @ Collections ready for immediate harvest: [1]
 INFO  org.dspace.harvest.OAIHarvester @ Thread queued up: Thread[Thread-228,5,main]
 INFO  org.dspace.harvest.OAIHarvester @ Thread started: Thread[Thread-229,5,main]
 INFO  org.dspace.harvest.OAIHarvester @ Thread for collection 1 starts.
 INFO  org.dspace.harvest.OAIHarvester @ HTTP Request: http://ntur.lib.ntu.edu.tw/ir-oai/request?verb=ListRecords&until=2016-11-22T02:45:42Z&set=hdl_246246_43199&metadataPrefix=oai_dc
 INFO  org.dspace.harvest.OAIHarvester @ Found 100 records to process
 INFO  org.dspace.content.Item @ anonymous::update_item:item_id=4180
 INFO  org.dspace.content.Item @ anonymous::create_item:item_id=4180
 INFO  org.dspace.content.Item @ anonymous::update_item:item_id=4180
 INFO  org.dspace.content.WorkspaceItem @ anonymous::create_workspace_item:workspace_item_id=-1item_id=4180collection_id=1
 ERROR org.dspace.harvest.OAIHarvester @ Harvesting error occurred while processing an OAI record: The 'item' schema has not been defined in this DSpace instance.
 INFO  org.dspace.content.Collection @ anonymous::update_collection:collection_id=1
 INFO  org.dspace.harvest.OAIHarvester @ Thread for collection 1 completes.
 WARN  org.dspace.storage.rdbms.DatabaseManager @ Already closed.
java.sql.SQLException: Already closed.
    at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
    at org.dspace.storage.rdbms.DatabaseManager.freeConnection(DatabaseManager.java:676)
    at org.dspace.core.Context.abort(Context.java:567)
    at org.dspace.core.Context.finalize(Context.java:733)
    at java.lang.System$2.invokeFinalize(Unknown Source)
    at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
    at java.lang.ref.Finalizer.access$100(Unknown Source)
    at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)





It is my database  schemas tables  item => item_id=4179 (ps:item_id=4179)
but
database have obviously data .....

I also tried using dspace 5.5 OAI-pmh on  same condition
It is a successful execution
(ps:dspace-5.5 jspui, dspace-5.5.log)

Why use dspace-cris oai in question?


I'm sorry that my English is not good ...
Description of the expression may not be clear.......


Regards


Sincerly yours, Yen-Tang Chen



item_id=4179.png
dspace-5.5 jspui.png
dspace-5.5.log

Bollini Andrea

unread,
Nov 22, 2016, 4:28:42 AM11/22/16
to 陳彥棠, DSpace Technical Support

Hi

it looks as a bug in DSpace-CRIS. It should be enough to add this line

c.turnOffItemWrapper();

here

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/java/org/dspace/harvest/OAIHarvester.java#L126

Unfortunately I have no time today to verify, can you run a fast test and report if it solves so to include the fix in the next release?

Thanks,
Andrea
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Andrea Bollini
Chief Technology and Innovation Officer

4Science,  www.4science.it
office: Via Edoardo D'Onofrio 304, 00155 Roma, Italy
mobile: +39 333 934 1808
skype: a.bollini
linkedin: andreabollini
orcid: 0000-0002-9029-1854

an Itway Group Company
Italy, France, Spain, Portugal, Greece, Turkey, Lebanon, Qatar, U.A.Emirates

陳彥棠

unread,
Nov 22, 2016, 9:14:30 PM11/22/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it

Dear Bollini Andrea

I try to add  this line 126  " c.turnOffItemWrapper(); " in the " C:\DSpace-dspace-cris-5.5.0\dspace-api\src\main\java\org\dspace\harvest\OAIHarvester.java "

but it is errors for the
mvn package  , I can not find the method " turnOffItemWrapper()"... 
Would i need to add those parameters?


Regards


Sincerly yours, Yen-Tang Chen



Bollini Andrea於 2016年11月22日星期二 UTC+8下午5時28分42秒寫道:

陳彥棠

unread,
Nov 24, 2016, 3:44:22 AM11/24/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea


I try to add  this line 126  " c.turnOffItemWrapper(); " in the " C:\DSpace-dspace-cris-5.5.0\dspace-api\src\main\java\org\dspace\harvest\OAIHarvester.java "
on the linux(cetos 7) is successful!!! (dspace-cris-oai_01.png)
mvn package  ..ok   

but it is failure on the windows 10..........
Error message => dspace-cris-oai_error.png

mvn package  ..error


cetos 7  and windows 10 are same settings

Dspace-cris-5.6.1  
tomcat 8.0.39
jdk 1.8.0
postgreSQL 9.5

I don't know error..... Fantastic results!!




Regards


Sincerly yours, Yen-Tang Chen



陳彥棠於 2016年11月23日星期三 UTC+8上午10時14分30秒寫道:
dspace-cris-oai_01.png
dspace-cris-oai_error.png

Bollini Andrea

unread,
Nov 24, 2016, 6:30:28 AM11/24/16
to 陳彥棠, DSpace Technical Support
Hi Yen-Tang Chen,
the method turnOffItemWrapper() was introduced in April after the tag of the 5.5.0 version so it is only available on the maintenance branch and in the new versions (5.6.1).
I think that on windows you are using old code, probably the one from the 5.5.0 tag as your path suggest.
It was unclear to me if with such change on centos you have run successful the OAIHarvest or if right now you are just verified that the proposed patch compile. Can you please confirm?
Thanks,
Andrea

陳彥棠

unread,
Nov 24, 2016, 8:57:50 PM11/24/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea

Thank you so much
Bollini Andrea :D
I try again to run
OAIHarvest  on windows 10 (dspace-cris-5.6.1).
I'll report to you later on .


Regards


Sincerly yours, Yen-Tang Chen


Bollini Andrea於 2016年11月24日星期四 UTC+8下午7時30分28秒寫道:

陳彥棠

unread,
Nov 28, 2016, 1:27:55 AM11/28/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea

1.
I run oai-pmh on the linux(centos7) (dspace-cris-oai_02.PNG)

My database format is like this (dspace-cris-oai_03.png)
ex: <dc:creator>吳密察</dc:creator>
    <dc:date>1997-07-31</dc:date>
dspace-cris database format
    <dc.contributor.author>
    <dc.date.issued>

    My oai-pmh don't obtain author and date, How to set the settings?(Do not change the data from the database)
    ex: dspace 5.5 jspui => dspace.cfg webui.itemlist.columns = thumbnail, dc.date(date), dc.title, dc.creator
    Which dspace.cfg parameter?

2.

I install dspace-cris-5.6.1 on the windows 10
add this line 126 " c.turnOffItemWrapper(); " in the " C:\DSpace-dspace-cris-5.6.1\dspace-api\src\main\java\org\dspace\harvest\OAIHarvester.java "
after mvn package is successful.


but step " Administrator Account: Create an initial administrator account"  has been wrong!

dspace create-administrator error message => dspace-cris-5.6.1-create-administrator.png

"Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded"


Although dspace-cris-5.6.1 has started successfully , Administrator account is alway failure

I found that the use of dspace-cris-5.6.1([dspace]/bin) "dspace function" will fail....

I try to use dspace-cris-5.5.0 in the same environment that ([dspace]/bin) "dspace function" is successful (dspace-cris-5.5.0-create-administrator.png)


I don't know why this happened......
magical!

Installation environment

      jdk1.8.0_101
      postgresSQL 9.5
      tomcat 8.0.37 
      dspace-cris-5.6.1


Regards


Sincerly yours, Yen-Tang Chen

陳彥棠於 2016年11月25日星期五 UTC+8上午9時57分50秒寫道:
dspace-cris-oai_02.png
dspace-cris-oai_03.png
dspace-cris-5.6.1-create-administrator.png
dspace-cris-5.5.0-create-administrator.png

Bollini Andrea

unread,
Nov 28, 2016, 5:37:45 PM11/28/16
to 陳彥棠, DSpace Technical Support

Hi Yen-Tang Chen,

1) this is the default behavior of DSpace, it is not a bug or something that you can configure nor in DSpace nor in DSpace-CRIS. It depends on the metadata format that you use: oai_dc in your case that in turn involve https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace-api/src/main/java/org/dspace/content/crosswalk/OAIDCIngestionCrosswalk.java.

If you can try to use the qdc (Qualified Dublin Core) or the DIM as you are harvesting another DSpace instance. Here you can find some documentation about the Harvesting client

https://wiki.duraspace.org/display/DSDOC5x/OAI#OAI-HarvestingfromanotherDSpace

You can also configure the webui.itemlist.columns propert

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace/config/dspace.cfg#L2234

as you did in DSpace JSPUI 5.5 but I don't recommend that as you will keep in your database records with very poor metadata and you will need to fix the configuration in a lot of other places, as for instance define an authority on dc.creator

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/dspace/config/dspace.cfg#L2321

change the browse, the cris-enhancers, the ORCID mapping and much more.


2) I guess that you have rebuild dspace-cris using an old build.properties that is missing of some key so in the generated configuration files you have something like

a-configuration-property = ${a-configuration-property}

that result in an infinite loop when the application (or a script) start so the out-of-memory

Try to take the current build.properties

https://github.com/4Science/DSpace/blob/dspace-5_x_x-cris/build.properties

and edit you configuration inside this file.

Hope this help,

Andrea

陳彥棠

unread,
Nov 28, 2016, 7:04:31 PM11/28/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it
Dear Bollini Andrea

1)   I'll wait to try.

2)   This is the build.properties that I use to mvn package and ant fresh_install
    What do I miss
of some key ?




Regards


Sincerly yours, Yen-Tang Chen


Bollini Andrea於 2016年11月29日星期二 UTC+8上午6時37分45秒寫道:
build.properties

陳彥棠

unread,
Nov 28, 2016, 9:09:25 PM11/28/16
to DSpace Technical Support, exia...@gmail.com, Andrea....@4science.it

Dear Bollini Andrea


2)

I use use the latest code dspace-cris_5_x_x on the windows 10
https://github.com/4Science/DSpace

But encountered the same problem....

mvn package and ant fresh_install are successful .


but step " Administrator Account: Create an initial administrator account"  has been wrong!

dspace create-administrator error message => dspace-cris-5_x_x-create-administrator_01.png
                                             dspace-cris-5_x_x-create-administrator_02.png


                                             


May be due to lack of java memory?                                             
They are my setting java memory (java.png) and dspace.log.                                         

                                        
                                             
                                             
Installation environment

      jdk1.8.0_101
      postgresSQL 9.5
      tomcat 8.0.37 
      dspace-cris-5_x_x
dspace-cris-5_x_x-create-administrator_01.png
dspace-cris-5_x_x-create-administrator_02.png
java.png
dspace.log.log

Bollini Andrea

unread,
Dec 26, 2016, 5:46:26 AM12/26/16
to 陳彥棠, DSpace Technical Support

I have found some time today to make a try.

A slightly modified fix has been committed to our maintenance repository

https://github.com/4Science/DSpace/commit/7d52138d90eb9d177ac09e45eba21e22c9a7a550

Harvesting via OAI-ORE from DSpace-CRIS of the Official Duraspace DSpace demo now succeed.

https://dspace-cris.4science.it/handle/123456789/59

Andrea

Reply all
Reply to author
Forward
0 new messages