Project

General

Profile

Bug #2766

mn.describe() not found not thrown

Added by Rob Nahf almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Ben Leinfelder
Category:
Metacat
Start date:
Due date:
% Done:

0%

Milestone:
CCI-1.0.0
Product Version:
*
Story Points:
Sprint:

Related issues

Related to Infrastructure - Bug #2781: ExceptionHandler needs to handle package-qualified exception names Closed 2012-05-18

History

#1 Updated by Rob Nahf almost 12 years ago

  • Category set to Metacat
  • Assignee set to Ben Leinfelder

a new Tier1 test called testDescribe_NotFound() tries to elicit a NotFound exception from demo2.test.dataone.org but gets a ServiceFailure instead with the following message:

java.lang.AssertionError: ServiceFailure: 1800:: status 404: No system metadata could be found for given PID: TestingNotFound:201213615921423 [for host HEAD https://demo2.test.dataone.org/knb/d1/mn/v1/object/TestingNotFound:201213615921423]
at org.junit.Assert.fail(Assert.java:91)
at org.dataone.integration.it.ContextAwareTestCaseDataone$4.call(ContextAwareTestCaseDataone.java:1065)
at org.junit.rules.ErrorCollector.checkSucceeds(ErrorCollector.java:70)
at org.dataone.integration.it.ContextAwareTestCaseDataone.handleFail(ContextAwareTestCaseDataone.java:1060)
at org.dataone.integration.it.MNodeTier1IT.testDescribe_NotFound(MNodeTier1IT.java:1095)

#2 Updated by Ben Leinfelder almost 12 years ago

  • Status changed from New to Rejected

Using curl, this seems to work as expected. Unless I'm not using curl correctly.

curl --insecure -i -X HEAD https://demo2.test.dataone.org/knb/d1/mn/v1/object/TestingNotFound:201213615921423

HTTP/1.1 404 Not Found
Date: Wed, 16 May 2012 22:38:15 GMT
Server: Apache/2.2.14 (Ubuntu)
DataONE-Exception-Name: org.dataone.service.exceptions.NotFound
DataONE-Exception-DetailCode: 1800
DataONE-Exception-Description: No system metadata could be found for given PID: TestingNotFound:201213615921423
DataONE-Exception-PID: TestingNotFound:201213615921423
Content-Length: 952
Vary: Accept-Encoding
Content-Type: text/html;charset=utf-8

#3 Updated by Rob Nahf almost 12 years ago

problem is that the exception handler was only expecting the exception's simple name ("NotFound" instead of package qualified one. ("org.dataone.service.exceptions.NotFound")

Creating a bug in d1_common_java to fix this.

#4 Updated by Ben Leinfelder almost 12 years ago

Ya, I think FQ class name will be best - then you can always use reflection to get an object out of it if ever you need to.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)