Index fail message after upgrading from Dspace 6.2 to 7.3

483 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
Oct 11, 2022, 2:13:07 AM10/11/22
to DSpace Technical Support
Dear DSpace Team,

dspace@wiredspace:~/install/dspace7.3backend/bin$ ./dspace index-discovery -b

The script has started

(Re)building index from scratch.

java.lang.NullPointerException

      at org.dspace.discovery.SolrServiceResourceRestrictionPlugin.additionalIndex(SolrServiceResourceRestrictionPlugin.java:95)

      at org.dspace.discovery.indexobject.IndexFactoryImpl.buildDocument(IndexFactoryImpl.java:67)

      at org.dspace.discovery.indexobject.InprogressSubmissionIndexFactoryImpl.buildDocument(InprogressSubmissionIndexFactoryImpl.java:46)

      at org.dspace.discovery.indexobject.WorkspaceItemIndexFactoryImpl.buildDocument(WorkspaceItemIndexFactoryImpl.java:63)

      at org.dspace.discovery.indexobject.WorkspaceItemIndexFactoryImpl.buildDocument(WorkspaceItemIndexFactoryImpl.java:30)

      at org.dspace.discovery.SolrServiceImpl.update(SolrServiceImpl.java:165)

      at org.dspace.discovery.SolrServiceImpl.indexContent(SolrServiceImpl.java:155)

      at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:340)

      at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:327)

      at org.dspace.discovery.SolrServiceImpl.createIndex(SolrServiceImpl.java:295)

      at org.dspace.discovery.IndexClient.internalRun(IndexClient.java:72)

      at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:104)

      at org.dspace.app.launcher.ScriptLauncher.executeScript(ScriptLauncher.java:149)

      at org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:131)

      at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98)

dspace@wiredspace:~/install/dspace7.3backend/bin$

 Regards,

Lewatle 

Lewatle Johannes Phaladi

unread,
Oct 11, 2022, 10:08:52 AM10/11/22
to DSpace Technical Support
Hi DSpace Team,

During my upgrade I skipped this step by mistake [dspace]/bin/dspace database update-sequences 
please advise if that can affect re-indexing process "./dspace index-discovery -b"

Database migration went well 

Regards,
Lewatle 

Tim Donohue

unread,
Oct 11, 2022, 1:46:22 PM10/11/22
to Lewatle Johannes Phaladi, DSpace Technical Support
Hi Lewatle,

Based on the error stack, it looks like the problem may be that you somehow have a Resource Policy in your "resourcepolicy" database table that has both no​ "eperson_id" AND no "epersongroup_id".   

That shouldn't be possible, because every Resource Policy is supposed to be related to either an EPerson or a Group.  However, somehow you must have managed to create a resource policy that is not related to anything. 

You may need to find that resource policy and delete it.  I think​ you could use this query to locate it:

SELECT * from resourcepolicy where eperson_id is null and epersongroup_id is null;

Then you likely could do a similar delete:

DELETE FROM resourcepolicy where eperson_id is null and epersongroup_id is null;

Make sure to test this out on a test/development copy of your database.  I doubt it will have side effects, but you should always verify things first before trying it in production.

Tim

From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Lewatle Johannes Phaladi <joem...@gmail.com>
Sent: Tuesday, October 11, 2022 1:13 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: [dspace-tech] Index fail message after upgrading from Dspace 6.2 to 7.3
 
--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/e34f93ed-6923-4643-85e1-1d741c75eeffn%40googlegroups.com.

Lewatle Johannes Phaladi

unread,
Oct 12, 2022, 2:26:46 AM10/12/22
to DSpace Technical Support

Hello Tim,

Thanks a lot I am trying it now.

Regards,
Lewatle 

Lewatle Johannes Phaladi

unread,
Oct 12, 2022, 3:58:05 AM10/12/22
to DSpace Technical Support
Thanks Tim, the script completed without any error.

Mark H. Wood

unread,
Oct 12, 2022, 8:34:23 AM10/12/22
to dspac...@googlegroups.com
On Wed, Oct 12, 2022 at 12:58:05AM -0700, Lewatle Johannes Phaladi wrote:
> Thanks Tim, the script completed without any error.

Then it appears that we are missing a rule:

CONSTRAINT has_subject CHECK (eperson_id IS NOT NULL OR
epersongroup_id IS NOT NULL)

> On Wednesday, 12 October 2022 at 08:26:46 UTC+2 Lewatle Johannes Phaladi
> wrote:
>
> >
> > Hello Tim,
> >
> > Thanks a lot I am trying it now.
> >
> > Regards,
> > Lewatle
> > On Tuesday, 11 October 2022 at 19:46:22 UTC+2 Tim Donohue wrote:
> >
> >> Hi Lewatle,
> >>
> >> Based on the error stack, it looks like the problem may be that you
> >> somehow have a Resource Policy in your "resourcepolicy" database table that
> >> has both *no*​ "eperson_id" AND *no* "epersongroup_id".
> >>
> >> That shouldn't be possible, because every Resource Policy is supposed to
> >> be related to either an EPerson or a Group. However, somehow you must have
> >> managed to create a resource policy that is not related to anything.
> >>
> >> You may need to find that resource policy and delete it. I *think*​ you
> >> could use this query to locate it:
> >>
> >> SELECT * from resourcepolicy where eperson_id is null and epersongroup_id
> >> is null;
> >>
> >> Then you likely could do a similar delete:
> >>
> >> DELETE FROM resourcepolicy where eperson_id is null and epersongroup_id
> >> is null;
> >>
> >> *Make sure to test this out on a test/development copy of your database.*
> >> I doubt it will have side effects, but you should always verify things
> >> first before trying it in production.
> >>
> >> Tim
> >> ------------------------------
> >> *From:* dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf
> >> of Lewatle Johannes Phaladi <joem...@gmail.com>
> >> *Sent:* Tuesday, October 11, 2022 1:13 AM
> >> *To:* DSpace Technical Support <dspac...@googlegroups.com>
> >> *Subject:* [dspace-tech] Index fail message after upgrading from Dspace
> >> <https://groups.google.com/d/msgid/dspace-tech/e34f93ed-6923-4643-85e1-1d741c75eeffn%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> >
>
> --
> All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
> ---
> You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/5dc28b99-0037-459a-8b1c-b1a15c5f1477n%40googlegroups.com.


--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc
Reply all
Reply to author
Forward
0 new messages