You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2013/02/19 15:37:13 UTC
[jira] [Commented] (OAK-642) NPE trying to add a node to an
nt:folder node
[ https://issues.apache.org/jira/browse/OAK-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13581312#comment-13581312 ]
Thomas Mueller commented on OAK-642:
------------------------------------
Test case added in revision 1447734.
> NPE trying to add a node to an nt:folder node
> ---------------------------------------------
>
> Key: OAK-642
> URL: https://issues.apache.org/jira/browse/OAK-642
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: jcr
> Reporter: Thomas Mueller
> Priority: Minor
>
> The following code throws a NPE:
> {code}
> Session s = getAdminSession();
> s.getRootNode().addNode("a", "nt:folder").addNode("b");
> s.save();
> {code}
> Stack trace:
> {code}
> java.lang.NullPointerException
> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
> at org.apache.jackrabbit.oak.namepath.LocalNameMapper.getOakNameOrNull(LocalNameMapper.java:82)
> at org.apache.jackrabbit.oak.namepath.GlobalNameMapper.getOakName(GlobalNameMapper.java:64)
> at org.apache.jackrabbit.oak.namepath.NamePathMapperImpl.getOakName(NamePathMapperImpl.java:62)
> at org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager.getOakName(ReadOnlyNodeTypeManager.java:92)
> at org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager.getNodeType(ReadOnlyNodeTypeManager.java:186)
> at org.apache.jackrabbit.oak.jcr.NodeImpl$5.perform(NodeImpl.java:265)
> at org.apache.jackrabbit.oak.jcr.NodeImpl$5.perform(NodeImpl.java:1)
> at org.apache.jackrabbit.oak.jcr.SessionDelegate.perform(SessionDelegate.java:136)
> at org.apache.jackrabbit.oak.jcr.NodeImpl.addNode(NodeImpl.java:219)
> at org.apache.jackrabbit.oak.jcr.NodeImpl.addNode(NodeImpl.java:210)
> at org.apache.jackrabbit.oak.jcr.CRUDTest.nodeType(CRUDTest.java:122)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira