NULL POINTER EXCEPTION on OAI Import

200 views
Skip to first unread message

Nason Bimbe

unread,
May 11, 2017, 10:11:02 AM5/11/17
to DSpace Community

Hi – I have been trying to run the import but I get the below exception. Has anyone come across this problem and how did they resolve it. I am running DSpace 5.5.

 

[dspace]/bin/dspace oai import -c

 

8700 items imported so far...

8800 items imported so far...

java.lang.NullPointerException

        at org.dspace.xoai.util.ItemUtils.retrieveMetadata(ItemUtils.java:156)

        at org.dspace.xoai.app.XOAI.index(XOAI.java:276)

        at org.dspace.xoai.app.XOAI.index(XOAI.java:211)

        at org.dspace.xoai.app.XOAI.indexAll(XOAI.java:198)

        at org.dspace.xoai.app.XOAI.index(XOAI.java:131)

        at org.dspace.xoai.app.XOAI.main(XOAI.java:414)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)

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

 

Thank you in advance.

 

Regards

_________________________________
Nason Bimbe

orcid.org/0000-0001-7560-5029

Information Systems Manager

British Library for Development Studies (BLDS)

 

Institute of Development Studies

At the University of Sussex, Brighton, BN1 9RE
Tel.  + 44 (0) 1273 915794

Mob. + 44 (0) 7808 794527

Skype. bimben

Twitter. @nbimbe
https://www.ids.ac.uk

https://blds.ids.ac.uk

http://opendocs.ids.ac.uk

http://bulletin.ids.ac.uk

http://resourcefinder.ids.ac.uk/vufind

 

This message is for the addressee only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any views or opinions expressed are solely those of the author and do not necessarily represent those of IDS. Institute of Development Studies at the University of Sussex, Brighton BN1 9RE Tel: +44 (0)1273 606261; Fax: +44 (0)1273 621202 IDS, a charitable company limited by guarantee: Registered Charity No. 306371; Registered in England 877338; VAT No. GB 350 899914

Claudia Jürgen

unread,
May 12, 2017, 6:29:58 AM5/12/17
to dspace-c...@googlegroups.com
Hello Nason,

this looks like
https://jira.duraspace.org/browse/DS-3012
which has been reported for 6.0 (not 5.x)
but it might be worth checking for null in bitstream or bundle names.

Hope this helps

Claudia Jürgen


Am 11.05.2017 um 16:10 schrieb Nason Bimbe:
> Hi - I have been trying to run the import but I get the below exception. Has anyone come across this problem and how did they resolve it. I am running DSpace 5.5.
> https://www.ids.ac.uk<https://www.ids.ac.uk/>
> https://blds.ids.ac.uk<https://blds.ids.ac.uk/>
> http://opendocs.ids.ac.uk
> http://bulletin.ids.ac.uk<http://bulletin.ids.ac.uk/>
> http://resourcefinder.ids.ac.uk/vufind
>
> This message is for the addressee only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any views or opinions expressed are solely those of the author and do not necessarily represent those of IDS. Institute of Development Studies at the University of Sussex, Brighton BN1 9RE Tel: +44 (0)1273 606261; Fax: +44 (0)1273 621202 IDS, a charitable company limited by guarantee: Registered Charity No. 306371; Registered in England 877338; VAT No. GB 350 899914
>

--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
claudia...@tu-dortmund.de
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is solely intended for the recipient. If you are not the intended recipient of this e-mail please contact the sender and delete this message. Thank you. Without prejudice of e-mail correspondence, our statements are only legally binding when they are made in the conventional written form (with personal signature) or when such documents are sent by fax.

Nason Bimbe

unread,
May 15, 2017, 6:54:24 AM5/15/17
to Claudia Jürgen, dspace-c...@googlegroups.com
Hi Claudia,
Thanks for the info and yes I have seen it and used it.

I have run the SQL script mentioned at https://jira.duraspace.org/browse/DS-2807 against the database. A closer look shows this problem happening on Line 189 in ItemUtils.java while my problem is triggered on Line 156 in ItemUtils.java

I have no records that has no submitter and also all the epersons in the database have email addresses as described at http://stackoverflow.com/questions/26300190/oai-import-dspace

I still haven't solved the problem.

Any other suggestions or pointers please?

Regards
Nason
--
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To post to this group, send email to dspace-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-community.
For more options, visit https://groups.google.com/d/optout.

Claudia Jürgen

unread,
May 16, 2017, 4:17:40 AM5/16/17
to Nason Bimbe, dspace-c...@googlegroups.com
Hello Nason,


Am 15.05.2017 um 12:54 schrieb Nason Bimbe:
> Hi Claudia,
> Thanks for the info and yes I have seen it and used it.
>
> I have run the SQL script mentioned at https://jira.duraspace.org/browse/DS-2807 against the database. A closer look shows this problem happening on Line 189 in ItemUtils.java while my problem is triggered on Line 156 in ItemUtils.java
Oh really this was for 6 not for 5.

>
> I have no records that has no submitter and also all the epersons in the database have email addresses as described at http://stackoverflow.com/questions/26300190/oai-import-dspace
Have you checked whether you got bundles without names.
https://github.com/DSpace/DSpace/blob/dspace-5.5/dspace-oai/src/main/java/org/dspace/xoai/util/ItemUtils.java#L156
is right after the name of the bundle is fetched.

Nason Bimbe

unread,
May 16, 2017, 6:12:14 AM5/16/17
to Claudia Jürgen, dspace-c...@googlegroups.com
Hi Claudia,
Is there are a better way of checking for 'bundles without names'?. Looking at the 5.5 data model, I cannot see a name field in the bundle table.

Claudia Jürgen

unread,
May 16, 2017, 7:02:04 AM5/16/17
to Nason Bimbe, dspace-c...@googlegroups.com
Hello Nason,

the name field iis part of the metadata and thus in the table
metadatavalue as a dc.title.
You can query the database:
select * from bundle where bundle_id in (select resource_id from
metadatavalue where resource_type_id=1 and metadata_field_id=64 and
text_value is null);
In a default instance dc.title got id 64.

Hope this helps

Claudia Jürgen



Nason Bimbe

unread,
May 16, 2017, 9:01:01 AM5/16/17
to Claudia Jürgen, dspace-c...@googlegroups.com
Many thanks Claudia for the SQL snippet.

I have run it and no rows were reported that satisfies the criteria. So it is really strange what is causing this NPE.
Reply all
Reply to author
Forward
0 new messages