[ 
https://jira.duraspace.org/browse/DS-1077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Donohue resolved DS-1077.
-----------------------------

    Resolution: Fixed

The above patch has been applied to both Trunk and 1.8.x branch.  It will be 
released in 1.8.1.

I'm satisfied this solves the issues above -- I've tested this with various 
site-wide curation tasks (primarily from the Replication Task Suite add-on) and 
all seems to be working perfectly now.
                
> XMLUI & CLI always show a NullPointerException after running a Site-wide 
> Curation Task
> --------------------------------------------------------------------------------------
>
>                 Key: DS-1077
>                 URL: https://jira.duraspace.org/browse/DS-1077
>             Project: DSpace
>          Issue Type: Bug
>          Components: DSpace API, XMLUI
>    Affects Versions: 1.8.0
>         Environment: This bug affects any Curation Task that is run across 
> the entire site (all objects) from Commandline or XMLUI.
>            Reporter: Tim Donohue
>            Assignee: Tim Donohue
>            Priority: Major
>             Fix For: 1.8.1
>
>         Attachments: Curator.patch
>
>
> There is a bug in the 1.8.0 Curation System such that Site-Wide Curation 
> Tasks run from the XMLUI will always result in the following error:
> java.lang.NullPointerException
>     at 
> org.dspace.storage.rdbms.DatabaseManager.queryTable(DatabaseManager.java:220)
>     at org.dspace.eperson.Group.allMemberGroupIDs(Group.java:426)
>     at org.dspace.eperson.Group.allMemberGroups(Group.java:396)
>     at 
> org.dspace.app.xmlui.aspect.administrative.Navigation.getValidity(Navigation.java:149)
>  
> This error will be displayed whether the Curation Task succeeds or fails (you 
> can check your DSpace Log file to see whether the Curation Task actually 
> succeeded or failed).
> The error is caused by the Curator.doSite() method which always calls 
> "context.complete()".   When this is run via the XMLUI, that "complete()" 
> call will close the existing XMLUI Context -- meaning that any other code 
> that attempts to use that Context object will encounter a 
> NullPointerException as the Context object no longer has an open DB 
> connection.
> What is going on behind the scenes seems to be the following:
> 1. You kick off a Site-Wide curation task from XMLUI (it will use the current 
> XMLUI Context object)
> 2. Behind the scenes, the task may actually complete successfully (check the 
> logs). But after the task completes, Curator.doSite() will call 
> context.complete() on the current XMLUI context.
> 3. At that point, the XMLUI will attempt to refresh the current page (in 
> order to show the "Success" message). During this process, 
> 'Navigation.getValidity()' gets called.
> 4. The 'Navigation.getValidity()' method will attempt to use the XMLUI 
> Context object to load all member groups of the current user.
> 5. The result is a NullPointerException as the XMLUI Context object is no 
> longer valid & its database connection was closed (because of #2 above). 
> The above error is for Curation Tasks when they are run site-wide (across all 
> objects), and only when run via the XMLUI. 
> There is a similar NullPointerException for site-wide Curation Tasks when run 
> from the Command-Line:
> Exception: null
> java.lang.NullPointerException
>         at org.dspace.core.Context.commit(Context.java:340)
>         at org.dspace.core.Context.complete(Context.java:300)
>         at org.dspace.curate.CurationCli.main(CurationCli.java:287)
> Both errors have the same root cause.
> A patch is attached which resolves the issues of closing the Context, and 
> ensures that Curator.curationContext() caches any context it may create (so 
> that it can be closed/committed automatically by Curator once the task 
> completes).   This patch is still undergoing testing, but it seems to be 
> working well so far.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.duraspace.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to