Hi Euler, This sounds like a bug in the OAI Harvester to me (likely accidentally caused by the Java API refactor in 6.x). The reason I think that is because of the error you are seeing from the Start Harvester:
failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.metadata, could not initialize proxy - no Session This error is one that we ran into a lot during the development of DSpace 6 (and in later bug fix releases). It's generally caused by Hibernate attempting to use an object that has been "decached" from memory. So, it sounds to me like the code here has a bug somewhere that is causing this. Here's other tickets that describe essentially this same behavior in other areas of DSpace: https://jira.duraspace.org/browse/DS-3660 https://jira.duraspace.org/browse/DS-3648 https://jira.duraspace.org/browse/DS-3775 https://jira.duraspace.org/browse/DS-3293 Could you create a new JIRA ticket to for this ticket (and essentially provide the same details you sent here via email)? I can then link it up to all these old tickets and see if we can find a volunteer to investigate & resolve it via a PR. Thanks Tim On Thu, Sep 27, 2018 at 1:48 AM euler <[email protected]> wrote: > Dear All, > > I am reposting this since I received no responses. It turned out that the > Automatic Harvesting (Scheduler) from the Control Panel Screen in the demo > server is also experiencing the same error that I stated below. Since I > don't have access to the log files of the demo server, I can only assume > that it is likely that what I am describing below is also happening in the > demo server. I tried this on a fresh install of DSpace version 6.3 and I > reproduced the errors mentioned. Right now, the only way I can successfully > harvest (not on schedule or automatic) is via the command line by issuing > dspace > harvest -r -e my@email -c collection_handle. > > Also, the error occuring in the demo server when enabling automatic > harvesting in the control panel screen was posted in this mailing-list but > unfortunately it has no responses: OAI Harvesting Error: failed to lazily > initialize a collection of role > <https://groups.google.com/d/msg/dspace-tech/SYQ7Qpzh7wI/Yn8NjnI3CwAJ> > > Hoping for your positive response since the repository that I'm working on > will have the majority of its contents from external dspace sources. > > Thanks in advance! > euler > > On Wednesday, September 12, 2018 at 2:42:34 PM UTC+8, euler wrote: >> >> Dear All, >> >> I'm having trouble using the automatic harvest scheduler both in the >> XMLUI and in the command line. The version of DSpace the server is running >> on is 6.3. When I use the command line (dspace harvest -S), the command >> line returned the following error: >> >> Starting harvest loop... running. >> org.dspace.core.exception.DatabaseSchemaValidationException: The schema >> validator returned: null >> at org.dspace.core.Context.init(Context.java:170) >> at org.dspace.core.Context.<init>(Context.java:126) >> at >> org.dspace.harvest.HarvestScheduler.scheduleLoop(HarvestScheduler.java:149) >> at >> org.dspace.harvest.HarvestScheduler.run(HarvestScheduler.java:140) >> at java.lang.Thread.run(Unknown Source) >> Exception in thread "Thread-4" >> org.dspace.core.exception.DatabaseSchemaValidationException: The schema >> validator returned: null >> at org.dspace.core.Context.init(Context.java:170) >> at org.dspace.core.Context.<init>(Context.java:126) >> at >> org.dspace.harvest.HarvestScheduler.scheduleLoop(HarvestScheduler.java:234) >> at >> org.dspace.harvest.HarvestScheduler.run(HarvestScheduler.java:140) >> at java.lang.Thread.run(Unknown Source) >> >> >> The log showed the message below after running the command dspace harvest >> -S: >> >> 2018-09-12 13:14:57,708 FATAL org.dspace.core.Context @ Cannot obtain the >> bean which provides a database connection. Check previous entries in the >> dspace.log to find why the db failed to initialize. The schema validator >> returned: null >> 2018-09-12 13:14:57,709 ERROR org.dspace.harvest.HarvestScheduler @ >> Exception on iteration: 0 >> 2018-09-12 13:14:57,713 FATAL org.dspace.core.Context @ Cannot obtain the >> bean which provides a database connection. Check previous entries in the >> dspace.log to find why the db failed to initialize. The schema validator >> returned: null >> >> When using the Harvesting tab in the XMLUI control panel, after clicking >> Start Harvester, the page returned this message: >> >> failed to lazily initialize a collection of role: >> org.dspace.content.DSpaceObject.metadata, could not initialize proxy - no >> Session >> >> Although when I press the back button of the browser, the status says >> that the scheduler is waiting for collections to harvest. It seems that the >> automatic scheduler from the UI is now running although it didn't harvest >> any new items from the collections that I've set up for harvesting because >> I have been receiving email messages from the server informing me of a >> Harvest error. Below is the content of the harvest error message: >> >> Collection 5bee1194-648c-4136-8671-ddc43fc3f85f failed on harvest: >> >> Date: 9/11/18 6:25 PM >> Status Flag: -1 >> >> We need at least an eperson or a group in order to create a resource >> policy. >> >> Exception: >> java.lang.IllegalArgumentException: We need at least an eperson or a >> group in order to create a resource policy. >> at org.dspace.authorize.AuthorizeServiceImpl. >> createResourcePolicy(AuthorizeServiceImpl.java:777) >> at org.dspace.authorize.AuthorizeServiceImpl.addPolicy( >> AuthorizeServiceImpl.java:533) >> at org.dspace.content.WorkspaceItemServiceImpl.create( >> WorkspaceItemServiceImpl.java:99) >> at org.dspace.harvest.OAIHarvester.processRecord( >> OAIHarvester.java:539) >> at org.dspace.harvest.OAIHarvester.runHarvest( >> OAIHarvester.java:367) >> at org.dspace.harvest.HarvestThread.runHarvest( >> HarvestThread.java:57) >> at org.dspace.harvest.HarvestThread.run(HarvestThread.java:41) >> at java.lang.Thread.run(Unknown Source) >> >> So I would like to ask for help if anyone have ever encountered the >> errors above and how did you resolve it? I tried to harvest the collection >> that is giving me these errors in the dspace demo site using the same >> harvest_type and metadata_format and the harvest is successful. I just want >> to harvest automatically so that I don't have to run the harvest manually. >> >> Thanks in advance, >> euler >> > -- > All messages to this mailing list should adhere to the DuraSpace Code of > Conduct: https://duraspace.org/about/policies/code-of-conduct/ > --- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/dspace-tech. > For more options, visit https://groups.google.com/d/optout. > -- Tim Donohue Technical Lead for DSpace & DSpaceDirect DuraSpace.org | DSpace.org | DSpaceDirect.org -- All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/ --- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/dspace-tech. For more options, visit https://groups.google.com/d/optout.
