[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Error whilst depositing via SWORD



Hi Fran,
Taking a quick look at the code, I think the issue is that in the CRUD module, there are a couple of instances where the 'sword_error' is called as a raw function , rather than an object method e.g.:
Normal working:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FApache%2FCRUD.pm%23L432-L436&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=ZIxyUo8RxHBwwd2CR44aCtakHCPqHEfwu7%2BpetWEftI%3D&reserved=0

Function call in servicedocument function:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FApache%2FCRUD.pm%23L1742-L1745&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=QY9EAVsUn0Qr%2FHkj5nOx5kzAx8iZvTDgNwFbkJcGJsE%3D&reserved=0
and 'on_behalf_of' function:
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FApache%2FCRUD.pm%23L1838-L1862&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&sdata=xZ9ff3eSPhFwHFHWzax5OawV4i1yVoeIYrs2800Bqng%3D&reserved=0

This issue will only become apparent when you're doing a SWORD deposit using the 'on-behalf-of' header.
I think it may have been present for ~7 years, when the first line of the sword_error function was changed from
my( $repo, $r, %opts ) = @_;
to
my( $self, %opts ) = @_;

I think it's more than a 5-minute job to fix properly - I need to get into the code a bit more to understand what was changed - and how to resolve it.

I'll log it in GitHub and let you know try and come up with a solution - unless anyone else fancies having a  go..?

Cheers,
John


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Fran Callaghan via Eprints-tech
Sent: 07 January 2019 14:50
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Error whilst depositing via SWORD

Hi All,

We have a third party depositing via SWORD. They're getting a generic 500 message back but when I lookup the error_log corresponding to the time of the test I can see this message...

[Mon Jan 07 13:46:18.179171 2019] [perl:error] [pid 10713] [client X.X.X.X] Can't locate object method "repository" via package "EPrints::Repository" at /opt/eprints3/perl_lib/EPrints/Apache/CRUD.pm line 1977.\n

Any ideas what's wrong with CRUD.pm? Or is it a problem with the syntax of the deposit? I had expected SWORD to be pretty much plug and play (actually not even 'plug' since the documentation says it is configured by default).

**NOTE: I have X'd out the client IP address, it's a genuine IP in the original message

Thanks all,
Fran Callaghan



S?anadh R?omhphoist/Email Disclaimer

T? an r?omhphost seo agus aon chomhad a sheoltar leis faoi r?n agus is lena ?s?id ag an seola? agus sin amh?in ?. Is f?idir tuilleadh a l?amh anseo. <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww4.dcu.ie%2Fiss%2Fseanadh-riomhphoist.shtml&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=KUVHgyM5pc0Hg7jkV2Lhvp9iaEQsXgk3XWNF4kbTy18%3D&amp;reserved=0>

This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Read more here.<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww4.dcu.ie%2Fiss%2Femail-disclaimer.shtml&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=nKmmbgnHjVM3fqejN%2FRdH0j7aR5HfcA8nWDCHtzPqVY%3D&amp;reserved=0>





[Image removed by sender.]
[Image removed by sender.]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FDCU%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=YJ4%2BmrPKhB3%2BHp4esDaR%2B8dx0W72Hl9U%2Bm2hGTejnrY%3D&amp;reserved=0>[Image removed by sender.]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FDublinCityUni&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=vgkMdGaUuRRpm6dEb4lReLD40K0bQ6h%2FvTWnoE8Ja4o%3D&amp;reserved=0>[Image removed by sender.]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fdublin-city-university&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HIV75K7upYhz4gD5Wv23B6GV4ZrYmEwX%2B05bM%2Bd243c%3D&amp;reserved=0>[Image removed by sender.]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.instagram.com%2Fdublincityuniversity%2F%3Fhl%3Den&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=HRcuI42k1yPQSeXD6FYkCCaMqCPGKbj0%2BnNRhhwX1i4%3D&amp;reserved=0>[Image removed by sender.]<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fuser%2FDublinCityUniversity&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C36d547bcf4b147ffebe108d674b636bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C1&amp;sdata=aNeTnxUOlhk1tYPE2ZplDeWpevzXtL%2BNEoBIIk58kKA%3D&amp;reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190107/f20e7b24/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD239.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD239.jpg
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190107/f20e7b24/attachment-0001.jpg