[EP-tech] EPrints CRUD module returning a 500 error

Liam Green-Hughes L.E.Green-Hughes at kent.ac.uk
Fri Oct 28 16:45:07 BST 2016


Not directly related to this, but instead to SWORD. If you want to use the interface to update items (with different documents etc) and are using EPrints 3.3 if might be worth getting in touch with EPrints services as we (Kent) had some work done on the module. I think they have merged this into EPrints 3.4 but it was going to be released also on files.eprints.org at some point.



From: eprints-tech-bounces at ecs.soton.ac.uk <eprints-tech-bounces at ecs.soton.ac.uk> on behalf of Christer Enkvist <christer.enkvist at slu.se>
Sent: 28 October 2016 14:07
To: eprints-tech at ecs.soton.ac.uk
Subject: Re: [EP-tech] EPrints CRUD module returning a 500 error


I encountered the same problem when trying to add posts using SWORD.  If comment out the failing code in CRUD.pm to

                #return $self->send_response(
                        #$atom->param( "mimetype" ),
                        #$atom->output_dataobj( $items[0] ),
                #       'HTTP_CREATED',
                #        'application/atom+xml',
                #        'text',
I can both extract and add posts.  From what I understand this is some a debug code which seems to have been left by mistake (?).  Those better reading code are most welcome to comment on this - I may be VERY wrong!

However, removing/commenting out the rows above, adding an Eprints XML file (NewPosts.xml) to the archive is without problem:

christer at honeybee:~/test$ curl -X POST -i -u my_username:my_password --data-binary "@NewPosts.xml" -H 'Content-Type: application/vnd.eprints.data+xml' http://pub-dev21.slub.se/id/contents
HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Fri, 28 Oct 2016 13:00:12 GMT
Server: Apache/2.4.18 (Ubuntu)
Location: http://pub-dev21.slub.se/id/eprint/13823
Content-Length: 0

And yes, the post appears in the archive :)


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Andrew Hercules
Sent: den 23 juni 2016 13:29
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] EPrints CRUD module returning a 500 error

Hi all,

I'm attempting to create a new EPrints record using the CRUD module. To test that I can access the repository, I'm using the example provided in the documentation<https://wiki.eprints.org/w/API:EPrints/Apache/CRUD>. When I run the command from my terminal, I get the following response:

HTTP/1.1 500 Internal Server Error

Date: Thu, 23 Jun 2016 11:17:13 GMT

Server: Apache

Location: http://w01.eprintstest.da.ulcc.ac.uk/id/eprint/5252

Content-Length: 616

Connection: close

Content-Type: text/html; charset=iso-8859-1



<title>500 Internal Server Error</title>


<h1>Internal Server Error</h1>

<p>The server encountered an internal error or

misconfiguration and was unable to complete

your request.</p>

Weirdly, it returns a 500 Internal Server Error, yet it creates the EPrint record and puts it into the buffer. When I check the Apache logs, I see the following error message:

"Can't call method "param" on an undefined value at /perl_lib/EPrints/Apache/CRUD.pm line 1423"

When I review /perl_lib/EPrints/Apache/CRUD.pm line 1423, I see the following:

return $self->send_response( HTTP_CREATED, $atom->param( "mimetype" ), $atom->output_dataobj( $items[0] ), );

Has anybody seen this error before? If so, could you point me in the direction of a possible solution?

Thanks! :)



Andrew Hercules
Developer & UX Researcher
University of London Computer Centre
Senate House, Malet Street, London WC1E 7HU
T: +44 (0)20 7863 1342
E: andrew.hercules at ulcc.ac.uk<mailto:andrew.hercules at ulcc.ac.uk>
W: http://www.ulcc.ac.uk/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20161028/359cc985/attachment-0001.html 

More information about the Eprints-tech mailing list