Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 55389 invoked from network); 26 Oct 2006 09:37:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 09:37:24 -0000 Received: (qmail 57498 invoked by uid 500); 26 Oct 2006 09:37:34 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 57473 invoked by uid 500); 26 Oct 2006 09:37:33 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 57464 invoked by uid 99); 26 Oct 2006 09:37:33 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2006 02:37:33 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 26 Oct 2006 02:37:20 -0700 Received: (qmail invoked by alias); 26 Oct 2006 09:36:57 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.84]) [212.249.34.130] by mail.gmx.net (mp005) with SMTP; 26 Oct 2006 11:36:57 +0200 X-Authenticated: #894343 Message-ID: <45408198.5030401@gmx.net> Date: Thu, 26 Oct 2006 11:36:24 +0200 From: Marcel Reutegger User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: exception in indexer when creating versionable node References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org 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: http://issues.apache.org/jira/browse/JCR-605 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 types? regards marcel 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); >