You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Hervé Agnoux <he...@diaam-informatique.com> on 2009/07/09 11:50:14 UTC
NPE on scan
Hi,
When I do a scan, as tutorial says in
http://wiki.apache.org/jackrabbit/DataStore, jackrabbit says to me :
java.lang.NullPointerException
at
org.apache.jackrabbit.core.data.GarbageCollector.scan(GarbageCollector.java:153)
at com.Maintenance.main(Maintenance.java:103)
What's append ?
I use jackrabbit-core-1.5.5.
If I look svn source repository,
http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-
core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?revision=792437
at line 153, I get :
/** <--- HERE line 153 ??
* Scan the repository. The garbage collector will iterate over all nodes
in the repository
* and update the last modified date. If all persistence managers
implement the
My stupid code :
GarbageCollector gc = sess.createDataStoreGarbageCollector();
gc.scan(); // HERE line 103
gc.stopScan();
gc.deleteUnused();
Thanks for your help.
Re: NPE on scan
Posted by Thomas Müller <th...@day.com>.
Hi,
The DataStore is disabled by default. See also
http://wiki.apache.org/jackrabbit/DataStore
Regards,
Thomas
2009/7/9 Hervé Agnoux <he...@diaam-informatique.com>:
> Le jeudi 09 juillet 2009, Alexander Klimetschek a écrit :
>>
>> Which means your repository doesn't have a DataStore. See
>> https://issues.apache.org/jira/browse/JCR-1985
>>
>
> My poor english is incapabled to express my surprise. How is it possible to
> have a repository without DataStore ?
>
> Until now, I supposed that repository == plainty of DataStores. It's appear
> that repository can be zero data store, is it correct ? Where are the data
> without data store ?
>
>
>
Re: NPE on scan
Posted by Thomas Müller <th...@day.com>.
Hi,
> I don't understand the difference between PersitenceManager and DataStore.
>
> Perhaps PersitenceManager are for all content repository, and DataStore only
> for big objects ?
Yes, exactly. I have updated the wiki pages:
http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
"The PM is an *internal* Jackrabbit component that handle the
persistent storage of content nodes and properties. Property values
are also stored in the persistence manager, with the exception of
large binary values (those are usually kept in the DataStore)."
http://wiki.apache.org/jackrabbit/DataStore
"The data store is used to store large binary values."
Regards,
Thomas
Re: NPE on scan
Posted by Hervé Agnoux <he...@diaam-informatique.com>.
Le jeudi 09 juillet 2009, Alexander Klimetschek a écrit :
> 2009/7/9 Hervé Agnoux <he...@diaam-informatique.com>:
> > Until now, I supposed that repository == plainty of DataStores. It's
> > appear that repository can be zero data store, is it correct ? Where are
> > the data without data store ?
>
> In Persistence Managers:
> http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
>
I don't understand the difference between PersitenceManager and DataStore.
Perhaps PersitenceManager are for all content repository, and DataStore only
for big objects ?
Re: NPE on scan
Posted by Alexander Klimetschek <ak...@day.com>.
2009/7/9 Hervé Agnoux <he...@diaam-informatique.com>:
> Until now, I supposed that repository == plainty of DataStores. It's appear
> that repository can be zero data store, is it correct ? Where are the data
> without data store ?
In Persistence Managers: http://wiki.apache.org/jackrabbit/PersistenceManagerFAQ
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: NPE on scan
Posted by Hervé Agnoux <he...@diaam-informatique.com>.
Le jeudi 09 juillet 2009, Alexander Klimetschek a écrit :
>
> Which means your repository doesn't have a DataStore. See
> https://issues.apache.org/jira/browse/JCR-1985
>
My poor english is incapabled to express my surprise. How is it possible to
have a repository without DataStore ?
Until now, I supposed that repository == plainty of DataStores. It's appear
that repository can be zero data store, is it correct ? Where are the data
without data store ?
Re: NPE on scan
Posted by Alexander Klimetschek <ak...@day.com>.
2009/7/9 Hervé Agnoux <he...@diaam-informatique.com>:
> java.lang.NullPointerException
> at
> org.apache.jackrabbit.core.data.GarbageCollector.scan(GarbageCollector.java:153)
> at com.Maintenance.main(Maintenance.java:103)
>
> What's append ?
>
> I use jackrabbit-core-1.5.5.
>
> If I look svn source repository,
> http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-
> core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?revision=792437
> at line 153, I get :
This is the trunk, where the code obviously has changed since the
1.5.5 release. To get the code for 1.5.5, you have to look at the
tagged version:
http://svn.apache.org/viewvc/jackrabbit/tags/1.5.5/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?view=co
Here, line 153 is this:
store.updateModifiedDateOnAccess(startScanTimestamp);
Which means your repository doesn't have a DataStore. See
https://issues.apache.org/jira/browse/JCR-1985
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com