jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: exception in indexer when creating versionable node
Date Thu, 26 Oct 2006 09:36:24 GMT
Hi Magnus,

I tried to reproduce the problem you described. However I was not able to do so. 
at least not with the exception you described. What I see is an error in the log 
file, when node types are registered on a repository that was started for the 
very first time:

26.10.2006 10:36:02 *ERROR* [main] VirtualNodeTypeStateManager: Unable to index 
new nodetype: javax.jcr.ItemNotFoundException (VirtualNodeTypeStateManager.java, 
line 159)

I've created a jira issue which might be related to the behaviour you see in 
your setup:


btw. what actions do you perform on the repository after you register the node 
types? Or does the NullPointerException already occur when you register the node 


Magnus Grimsell wrote:
> I have the same problem in my unit tests where I create a new repository for every test.
> I have to restart the repository in order to get the tests to work.
> This is my setup code:
> File tmpDir = getTmpDir();
> InputStream xml = getResource("iipax/generic/jcr/test/repository.xml");
> RepositoryConfig repoConf =
> 	RepositoryConfig.create(xml, tmpDir.getAbsolutePath());
> mRepository = RepositoryImpl.create(repoConf);
> Session session = mRepository.login();
> NamespaceRegistry nsReg = session.getWorkspace().getNamespaceRegistry();
> nsReg.registerNamespace(JcrFactory.NAMESPACE_PREFIX, JcrFactory.NAMESPACE);
> JackrabbitNodeTypeManager manager =
> 	(JackrabbitNodeTypeManager)session.getWorkspace().getNodeTypeManager();
> InputStream nodeTypes = getNodeTypeConfig();	
> manager.registerNodeTypes(nodeTypes, JackrabbitNodeTypeManager.TEXT_X_JCR_CND);
> session.save();
> session.logout();
> // this is done to avoid NullPointerException in NodeIndexer
> mRepository.shutdown();
> mRepository = RepositoryImpl.create(repoConf);

View raw message