NPE on scan

7 messages Options
Embed this post
Permalink
Hervé Agnoux

NPE on scan

Reply Threaded More More options
Print post
Permalink
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.

Alexander Klimetschek

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
2009/7/9 Hervé Agnoux <[hidden email]>:

> 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
[hidden email]
Hervé Agnoux

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
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 ?


Thomas Müller-2

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
Hi,

The DataStore is disabled by default. See also
http://wiki.apache.org/jackrabbit/DataStore

Regards,
Thomas


2009/7/9 Hervé Agnoux <[hidden email]>:

> 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 ?
>
>
>
Alexander Klimetschek

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
In reply to this post by Hervé Agnoux
2009/7/9 Hervé Agnoux <[hidden email]>:
> 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
[hidden email]
Hervé Agnoux

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
Le jeudi 09 juillet 2009, Alexander Klimetschek a écrit :
> 2009/7/9 Hervé Agnoux <[hidden email]>:
> > 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 ?

Thomas Müller-2

Re: NPE on scan

Reply Threaded More More options
Print post
Permalink
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