jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Tagliani (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2359) infinite recursion creating a nodeType based on an existing nodeType
Date Thu, 22 Oct 2009 07:52:59 GMT

    [ https://issues.apache.org/jira/browse/JCR-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768598#action_12768598
] 

Luca Tagliani commented on JCR-2359:
------------------------------------

Sorry for the duplicate issue...

I've also found a workaround for the 1.6.0 version.
It's possible to set the DeclaredSuperTypeNames on the new NodeTypeTemplate using the following
code:

NodeTypeImpl ntImpl = ...
NodeTypeTemplate ntt = ....

NodeType[] superTypes = ntImpl.getDeclaredSupertypes();
String[] superTypeNames = new String[superTypes.length];
for (int i = 0; i < superTypes.length; i++) {
  NodeType superType = superTypes[i];
  superTypeNames[i] = superType.getName();
}
ntt.setDeclaredSuperTypeNames(superTypeNames);

Hope this helps other people in my same situation.

> infinite recursion creating a nodeType based on an existing nodeType
> --------------------------------------------------------------------
>
>                 Key: JCR-2359
>                 URL: https://issues.apache.org/jira/browse/JCR-2359
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.0
>            Reporter: Luca Tagliani
>
> When I try to create a nodeTypeTemplate using the following code, it's thrown an InvalidNodeTypeException
during the registration:
> NodeTypeManagerImpl ntmgr = (NodeTypeManagerImpl) session.getWorkspace().getNodeTypeManager();
> NodeTypeTemplate ntt = null;
> NodeTypeImpl ntImpl = null;
> ntImpl = ntmgr.getNodeType("wr:group");
> ...
> ... (adding new PropertyDefintion)
> ...
> ntt = ntmgr.createNodeTypeTemplate(ntImpl);
> ntmgr.registerNodeType(ntt, true); ---> here's thrown the exception
> The nodeType wr:group is based on three other nodeType.
> If I inspect the new ntt, I see that the supertype are three, but all equal to "wr:group"

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message