Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 90538 invoked from network); 18 Feb 2009 14:45:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Feb 2009 14:45:28 -0000 Received: (qmail 13317 invoked by uid 500); 18 Feb 2009 14:45:25 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 13243 invoked by uid 500); 18 Feb 2009 14:45:25 -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 13216 invoked by uid 99); 18 Feb 2009 14:45:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 06:45:25 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 14:45:22 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 775C4234C495 for ; Wed, 18 Feb 2009 06:45:02 -0800 (PST) Message-ID: <310969192.1234968302487.JavaMail.jira@brutus> Date: Wed, 18 Feb 2009 06:45:02 -0800 (PST) From: "Thomas Mueller (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1985) NullPointerException GarbageCollector.scan() In-Reply-To: <199507283.1234964461876.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12674635#action_12674635 ] Thomas Mueller commented on JCR-1985: ------------------------------------- > "programmatic" way to detect Yes. If this is null then there is no data store: ((RepositoryImpl) s.getRepository()).getDataStore() Anyway the exception you get is not very clear. What about this throws a RepositoryException: ((SessionImpl)mSession).createDataStoreGarbageCollector(); "No data store configured." > NullPointerException GarbageCollector.scan() > -------------------------------------------- > > Key: JCR-1985 > URL: https://issues.apache.org/jira/browse/JCR-1985 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Affects Versions: 1.5.2 > Environment: Windows XP > Reporter: Jacco van Weert > Fix For: 1.5.3 > > > I am running the garbage collector in a separate thread every 5 minutes. > GarbageCollector gc = ((SessionImpl)mSession).createDataStoreGarbageCollector(); > gc.scan(); > gc.stopScan(); > int du = gc.deleteUnused(); > When using Jackrabbit v1.5.2 I get sometimes a null pointer exception; > java.lang.NullPointerException > at org.apache.jackrabbit.core.data.GarbageCollector.scan(GarbageCollector.java:153) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.