jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Bocanegra" <tobias.bocane...@day.com>
Subject Re: How to unregister NodeTypes ?
Date Sun, 23 Apr 2006 17:39:58 GMT
the proper unregistration of nodetypes is not fully implemented in
jackrabbit yet (as the exception mentions). the method that is missing
should provide a check, if any node still uses the respective
nodetype.

nevertheless, if you anyways want to unregister a nodetype, either:

1) shutdown the repository, edit the custom_nodetypes.xml, and restart it again

or

2) edit the NodeTypeRegistry.java and remove the exception in
"checkForReferencesInContent()" (around line 1719).

please note, that both solutions do not check if content exists that
use that nodetype.

regards, toby



On 4/23/06, Dirk V. Schesmer <dirk.schesmer@mac.com> wrote:
> Hello list,
>
> I am trying to unregister a custom node type "myapp:User" by executing:
>
> QName quName = new QName("myapp", "User");
> NodeTypeManagerImpl ntMgr = (NodeTypeManagerImpl) session.getWorkspace
> ().getNodeTypeManager();
> NodeTypeRegistry ntreg = ntMgr.getNodeTypeRegistry();
> ntreg.unregisterNodeType(quName);
>
> As a result when executing the code, I get reported
> "javax.jcr.RepositoryException: not yet implemented"
>
> Am I doing something incorrectly? If not, is there a work around ?
>
> Thanks a lot,
>
> Dirk V. Schesmer
> Stuttgart/Germany
>


--
-----------------------------------------< tobias.bocanegra@day.com >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---

Mime
View raw message