[Dspace-tech] Index-all error

2 views
Skip to first unread message

Mika Stenberg

unread,
Aug 24, 2015, 5:02:35 PM8/24/15
to dspac...@lists.sourceforge.net
Im trying to run index-all on brand new Dspace 1.4.2 installation with
only few test items in it. I get this error when running, what could be
causing it?

Creating browse index
Indexing all Items in DSpace.... ... Done
Creating search index
Exception in thread "main" java.lang.NullPointerException: value cannot
be null
at org.apache.lucene.document.Field.<init>(Field.java:188)
at org.apache.lucene.document.Field.<init>(Field.java:164)
at org.dspace.search.DSIndexer.buildDocument(DSIndexer.java:890)
at org.dspace.search.DSIndexer.createIndex(DSIndexer.java:383)
at org.dspace.search.DSIndexer.main(DSIndexer.java:547)

-Mika


James Rutherford

unread,
Aug 24, 2015, 5:02:40 PM8/24/15
to Mika Stenberg, dspac...@lists.sourceforge.net
Are you positive this is the 1.4.2 release? Line 890 of DSIndexer in
that release is:

ArrayList fields = new ArrayList();

which will never give you a NullPointerException. Did you upgrade from
an older version, or install it totally "fresh"?

cheers,

Jim

--
James Rutherford | Hewlett-Packard Limited registered Office:
Research Engineer | Cain Road,
HP Labs | Bracknell,
Bristol, UK | Berks
+44 117 312 7066 | RG12 1HN.
james.ru...@hp.com | Registered No: 690597 England

The contents of this message and any attachments to it are confidential and
may be legally privileged. If you have received this message in error, you
should delete it from your system immediately and advise the sender. To any
recipient of this message within HP, unless otherwise stated you should
consider this message and attachments as "HP CONFIDENTIAL".

Mika Stenberg

unread,
Aug 24, 2015, 5:02:50 PM8/24/15
to James Rutherford, dspac...@lists.sourceforge.net
Interestingly I did fresh install with 1.4.2.
I found out that the problem was caused by collections marked as null.

-Mika

Mark Diggory

unread,
Aug 24, 2015, 5:08:05 PM8/24/15
to Mika Stenberg, dspac...@lists.sourceforge.net
We should deal with this as a bug in DSpace 1.4.2... We can make it
more robust in DSIndexer.

James, this error arises at line 890 of build document, which makes
me think they are still using dspace 1.4.2-beta where that line
corresponds to the getName call on a collection See:

http://fisheye3.cenqua.com/browse/dspace/branches/dspace-1_4_x/dspace/
src/org/dspace/search/DSIndexer.java?r=1797#l890

Thats not the same line in the 1.4.2 release...

http://fisheye3.cenqua.com/browse/dspace/branches/dspace-1_4_x/dspace/
src/org/dspace/search/DSIndexer.java?r=1878#l890

Mika, I see what is happening, Can you make sure you do not have
collections that have no "name"? and we'll throw in some hooks into
the next version of DSIndexer to control for that?

Also beware that you may have dspace 1.4.2 beta installed and on the
official release of dspace 1.4.2

-Mark
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> DSpace-tech mailing list
> DSpac...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech

~~~~~~~~~~~~~
Mark R. Diggory - DSpace Systems Manager
MIT Libraries, Systems and Technology Services
Massachusetts Institute of Technology
Office: E25-131
Phone: (617) 253-1096



Reply all
Reply to author
Forward
0 new messages