VTUL / vtechworks

DSpace at Virginia Tech
http://vtechworks.lib.vt.edu
Other
6 stars 8 forks source link

Null pointer exception when trying to download metadata CSV for a community #734

Closed alawvt closed 3 years ago

alawvt commented 3 years ago

I have been downloading metadata CSVs for many top-level communities recently without problem. Today I attempted to download the CSV for ICTAS, https://vtechworks.lib.vt.edu/csv/handle/10919/23765, and received a Null Pointer exeception.

An error has occurred
java.lang.NullPointerException:
Cocoon stacktrace
Failed to process reader
context:/file:///dspace/webapps/xmlui/sitemap.xmap - 391:71
context:/file:///dspace/webapps/xmlui/sitemap.xmap - 390:61

Java stacktrace
java.lang.NullPointerException
    at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
    at com.google.common.collect.Iterators.concat(Iterators.java:464)
    at org.dspace.app.bulkedit.MetadataExport.addItemsToResult(MetadataExport.java:136)
    at org.dspace.app.bulkedit.MetadataExport.buildFromCommunity(MetadataExport.java:125)
    at org.dspace.app.bulkedit.MetadataExport.<init>(MetadataExport.java:77)
    at org.dspace.app.xmlui.cocoon.MetadataExportReader.setup(MetadataExportReader.java:141)
    at sun.reflect.GeneratedMethodAccessor182.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
    at com.sun.proxy.$Proxy167.setup(Unknown Source)
    at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupReader(AbstractProcessingPipeline.java:560)
    at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:464)
    at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:411)
    at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
    at com.sun.proxy.$Proxy166.process(Unknown Source)...
alawvt commented 3 years ago

It appears this is occurring because this community contains a sub-community, Virginia Center for Autonomous Systems, with no collections. To test, I created a collection within it, Virginia Center for Autonomous Systems research which does not have any items. After that, the CSV would download. So this indicates that for the CSV download to work, all sub-communities within a community must contain at least one collection but these collections do not require any items.

I reported this in DS-4245: NPE in CSV export.