Project

General

Profile

Story #8863

/cn/v2/synchorize not working

Added by Jing Tao over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-05-01
Due date:
% Done:

100%

Story Points:

Description

PISCO people try to call the rest command /cn/v2/synchronize to synchronize some pids to cn. However, they got the error message:

curl -E urn_node_PISCO-2.pem -F "pid=doi:10.6085/AA/CBLX00_XXXITV2XLSR03_20190321.50.1" -X POST https://cn.dataone.org/cn/v2/synchronize <?xml version="1.0" encoding="UTF-8"?>
<error detailCode="4961" errorCode="500" name="ServiceFailure">
<description>Unexpected Exception in CN.synchronize: progress: null:: java.lang.NullPointerException</description>
</error>

I looked the log file and found the error message is:

[ERROR] 2020-05-01 22:40:16,775 (CoreController:synchronize:426) Unexpected Exception in CN.synchronize: progress: null:: java.lang.NullPointerException
java.lang.NullPointerException
at org.dataone.cn.rest.v2.CoreController.synchronize(CoreController.java:365)
at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMeth

the line 364 and 365 are:

Session session = PortalCertificateManager.getInstance().getSession(request);
final Subject clientSubject = session.getSubject();

It seems that the session is null somehow.

History

#1 Updated by Jing Tao over 4 years ago

However, I tested on the cn-sandbox and it worked well.

#2 Updated by Jing Tao over 4 years ago

Our code is okay. The user used a wrong token.

#3 Updated by Jing Tao over 4 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)