Bug #7379
GMN could not save Node document with null NodeReplicationPolicy.max size property
100%
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)
Related issues
Associated revisions
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).
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).
fixes: #7379: fixes NPEs in mapNodeModificationItemList related to null NodeReplicationPolicy properties.
History
#1 Updated by Rob Nahf about 9 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 about 9 years ago
- File flynn-gmn-2_node_doc.xml added
#3 Updated by Ben Leinfelder about 9 years ago
- Duplicated by Bug #7383: CN.registerNode() fails when nodeReplicationPolicy is partially present added
#4 Updated by Rob Nahf over 8 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 8 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 about 8 years ago
- Related to Bug #7665: NullPointer exception if NodeReplicationPolicy does contain maxObjectSize added