UKGovLD / ukl-registry-poc

Workspace for design of UKGovLD registry proof-of-concept
Apache License 2.0
17 stars 2 forks source link

Attempt to tag a register results in HTTP 500; Java null-pointer exception. #62

Closed 6a6d74 closed 11 years ago

6a6d74 commented 11 years ago

[pre-condition: authenticated Session established]

Attempt to tag register /codes/bufr4 with tag "v17"

curl -i -b cookie-jar -c cookie-jar -X POST -H "Accept:text/plain" http://ukgovld-registry.dnsalias.net/codes/bufr4?tag=v17

The result is an internal server error:

HTTP/1.1 500 Internal Server Error
Server: nginx/1.2.7
Date: Thu, 18 Apr 2013 08:11:46 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 5545
Connection: keep-alive

<html><head><title>Apache Tomcat/7.0.37 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - java.lang.NullPointerException</h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>java.lang.NullPointerException</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>javax.servlet.ServletException: java.lang.NullPointerException
der commented 11 years ago

Tag is not part of the PoC but clearly shouldn't give a 500.

[Given that the API for listing register state a point in time works then tag wouldn't be hard to add.]

6a6d74 commented 11 years ago

Noted. I had forgotten that we had not added tagging yet. This would be useful to include in the version deployed next Thursday (if this fits with workload?). Thanks.

der commented 11 years ago

Done. Fixed 500 so similar omissions should give less unfriendly response.

Implemented tagging (as in the draft spec), reading tags and a minimal html UI for viewing them.

Next time I say something stupid like "wouldn't be too hard" just shoot me!

6a6d74 commented 11 years ago

Have now been able to test this functionality - having built & deployed independent version of the Registry from source.

The release tagging works - albeit not quite as anticipated.

I have raised a new issue outlining the requirement for enhanced behaviour, and close this issue as the tagging no longer results in a 500 http response / null pointer exception.