redbox-mint / redbox

http://www.redboxresearchdata.com.au
GNU General Public License v2.0
5 stars 10 forks source link

Error using the Related Data fields in ReDBox #61

Open grantj-re3 opened 10 years ago

grantj-re3 commented 10 years ago

Background in QCIF zendesk ticket #131

At http://ands.org.au/guides/cpguide/cpgcoll-bestpractice.html ANDS recommend Hierarchical relations between collections. Hence we are using parent-child relationships between datasets.

There seem to be several problems with ReDBox 1.6.1 "Related Data" operation (even after applying the fix https://github.com/redbox-mint/redbox/blob/89c21f0afc6a2ab777bd701d88169fc16881fdd2/config/src/main/config/portal/default/redbox/scripts/actions/datasets.py). Here is a list of what I think works and what does not.

1. These features seem to work after applying the above fix - thanks!

1.1 If I publish 2 datasets, then link with "hasPart" the curation succeeds and there are no GUI errors. (There are main.log errors as given in 2.1.)

1.2 If I publish dataset A, then link to it with "hasPart" from unpublished dataset B, the curation of dataset B succeeds and there are no GUI errors. (There are main.log errors as given in 2.1.)

1.3 In the above scenario, if "Publish to RDA" is checked then the relatedObject is shown in the RIF-CS.

1.4 [New info] If I publish dataset A, then link to it with "hasPart" from published dataset B, the curation of dataset B succeeds as per 1.2 above.

2. The following seems to not work as I expected.

2.1 In successful scenarios 1.1 and 1.2 above and also unsuccessful scenarios, there seems to be a main.log error at the time that the selected dataset title (being linked) loses focus. The error is:

'File "default/redbox/scripts/actions/datasets.py", line 32, in __activate__ ... java.lang.NullPointerException'.

2.2 If the relation type (for example) is changed after publication, the new relation type is shown in the ReDBox details screen but the old relation type is shown in the RIF-CS. Similarly, if Publish to RDA is unchecked after publication, the details screen agrees with this new configuration but the relatedObject is still shown in the RIF-CS.

2.3 If I link to an unpublished dataset A from a published dataset B, I get the errors in main.log and transactionManager.log below and an email re dataset B which says "An error occurred curating this object, some manual intervention may be required; please see the system logs". The Curation section of the details screen for dataset B says:

I imagine the above is expected since dataset A is not yet published. However, after publishing dataset A neither datasets A nor B are linked via relatedObject RIF-CS elements. The curation section of the details screen for dataset B still says "None (waiting on curation) (OPTIONAL)". The Related Data fields of the description section of the details screen for dataset B says:

I suspect this together with the transactionManager.log message indicates that dataset B was unable to find the ID of linked dataset A. (Normally ID shows the published handle URL.)

main.log

2013-12-05 10:23:05,257 WARN namicPageServiceImpl Failed to run script!
=====
Traceback (most recent call last):
File "default/redbox/scripts/actions/workflow.py", line 42, in __activate__
File "default/redbox/scripts/actions/workflow.py", line 226, in _WorkflowData__updateWorkflow
File "/opt/ands/redbox-builds/1.6.1/portal/default/default/scripts/workflow.py", line 197, in prepareTemplate
jsonObject = self.vc("Services").storage.getObject(objMeta.get("jsonConfigOid"))
File "/opt/ands/redbox-builds/1.6.1/portal/default/default/scripts/workflow.py", line 197, in prepareTemplate
jsonObject = self.vc("Services").storage.getObject(objMeta.get("jsonConfigOid"))
at com.googlecode.fascinator.redbox.SecureStorage.getObject(SecureStorage.java:86)
at sun.reflect.GeneratedMethodAccessor441.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)

com.googlecode.fascinator.api.storage.StorageException: com.googlecode.fascinator.api.storage.StorageException: Access denied

transactionManager.log

2013-12-05 10:23:06,139 transactionManager ERROR CurationManager Cannot resolve ID 'None'
2013-12-05 10:23:06,140 transactionManager ERROR CurationManager Error processing related objects 'd6cc4a4cccfa5f8c35c0702929636f2e':
com.googlecode.fascinator.api.transaction.TransactionException: Cannot resolve identifer: None
at com.googlecode.fascinator.redbox.plugins.curation.redbox.CurationManager.checkChildren(CurationManager.java:979) [plugin-transaction-curation-redbox-1.6.1.jar:na]
at com.googlecode.fascinator.redbox.plugins.curation.redbox.CurationManager.checkChildren(CurationManager.java:932) [plugin-transaction-curation-redbox-1.6.1.jar:na]
at com.googlecode.fascinator.redbox.plugins.curation.redbox.CurationManager.curation(CurationManager.java:720) [plugin-transaction-curation-redbox-1.6.1.jar:na]
at com.googlecode.fascinator.redbox.plugins.curation.redbox.CurationManager.parseMessage(CurationManager.java:1437) [plugin-transaction-curation-redbox-1.6.1.jar:na]
at com.googlecode.fascinator.common.transaction.GenericTransactionManager.parseMessage(GenericTransactionManager.java:172) [fascinator-common-1.1.4.jar:na]
at com.googlecode.fascinator.messaging.TransactionManagerQueueConsumer.onMessage(TransactionManagerQueueConsumer.java:382) [fascinator-core-1.1.4.jar:na]
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1088) [activemq-web-5.3.0.jar:5.3.0]
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:127) [activemq-web-5.3.0.jar:5.3.0]
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:197) [activemq-web-5.3.0.jar:5.3.0]
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) [activemq-web-5.3.0.jar:5.3.0]
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) [activemq-web-5.3.0.jar:5.3.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_30]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_30]

2.4 If I link to an unpublished dataset A from an unpublished dataset B, I get the symptoms similar to those described in 2.3.