Project

General

Profile

Bug #7379

GMN could not save Node document with null NodeReplicationPolicy.max size property

Added by Rob Nahf over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
d1_cn_node_registry
Target version:
Start date:
2015-09-23
Due date:
% Done:

100%

Milestone:
None
Product Version:
*
Story Points:
Sprint:

Description

partial error logs showing where the NPE was thrown:

[ERROR] 2015-09-23 11:34:35,175 (NodeRegistryService:register:273) Problem regis
tering node Flynn Test Node 2
java.lang.NullPointerException
at org.dataone.cn.ldap.NodeAccess.mapNodeAttributes(NodeAccess.java:880)
at org.dataone.cn.ldap.NodeAccess.createNode(NodeAccess.java:1127)
at org.dataone.service.cn.impl.v2.NodeRegistryService.register(NodeRegis
tryService.java:260)
at org.dataone.service.cn.impl.v1.NodeRegistryService.register(NodeRegis
tryService.java:173)
at org.dataone.cn.rest.web.node.v1.NodeController.register(NodeControlle
r.java:501)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)

flynn-gmn-2_node_doc.xml Magnifier (992 Bytes) Mark Flynn, 2015-09-23 21:25


Related issues

Related to CN REST - Bug #7665: NullPointer exception if NodeReplicationPolicy does contain maxObjectSize Rejected 2016-02-25
Duplicated by CN REST - Bug #7383: CN.registerNode() fails when nodeReplicationPolicy is partially present Rejected 2015-09-23

Associated revisions

Revision 16433
Added by Rob Nahf over 8 years ago

refs: #7379. added Null checks on 2 NodeReplicationPolicy attributes in the NodeAccess.mapNodeAttributes. These are optional values, so can be null. Not sure why that wasn't picked up earlier when other null checks were added a year ago (by me).

Revision 16433
Added by Rob Nahf over 8 years ago

refs: #7379. added Null checks on 2 NodeReplicationPolicy attributes in the NodeAccess.mapNodeAttributes. These are optional values, so can be null. Not sure why that wasn't picked up earlier when other null checks were added a year ago (by me).

Revision 18256
Added by Rob Nahf over 7 years ago

fixes: #7379: fixes NPEs in mapNodeModificationItemList related to null NodeReplicationPolicy properties.

History

#1 Updated by Rob Nahf over 8 years ago

found the spot in the code (NodeAccess.mapNodeAttributes) that was assuming the max size and space allocated fields would not be null. Added null check.

#2 Updated by Mark Flynn over 8 years ago

#3 Updated by Ben Leinfelder over 8 years ago

  • Duplicated by Bug #7383: CN.registerNode() fails when nodeReplicationPolicy is partially present added

#4 Updated by Rob Nahf over 7 years ago

  • Target version changed from CCI-2.0.0 to CCI-2.3.0
  • Status changed from Closed to In Progress
  • % Done changed from 100 to 30

another NPE arises from similar cirumstance, this time in mapNodeModificationItemList method:

[ERROR] 2016-07-28 16:06:50,218 (NodeRegistryServiceImpl:updateNodeCapabilities:259) Problem registering node GMN v2 Test
java.lang.NullPointerException
at org.dataone.cn.ldap.NodeAccess.mapNodeModificationItemList(NodeAccess.java:867)
at org.dataone.cn.ldap.NodeAccess.updateNode(NodeAccess.java:1070)
at org.dataone.cn.ldap.NodeFacade.updateNode(NodeFacade.java:247)
at org.dataone.service.cn.v2.impl.NodeRegistryServiceImpl.updateNodeCapabilities(NodeRegistryServiceImpl.java:241)
at org.dataone.service.cn.v1.impl.NodeRegistryServiceImpl.updateNodeCapabilities(NodeRegistryServiceImpl.java:216)
at org.dataone.cn.rest.web.node.v1.NodeController.updateNodeCapabilities(NodeController.java:368)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

#5 Updated by Rob Nahf over 7 years ago

  • % Done changed from 30 to 100
  • Status changed from In Progress to Closed

Applied in changeset d1-python:d1_python|r18256.

#6 Updated by Rob Nahf over 7 years ago

  • Related to Bug #7665: NullPointer exception if NodeReplicationPolicy does contain maxObjectSize added

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)