java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When a METS packaged in a zip is ingested, the ingester doesn't check if the files referenced from the mets.xml actually exist in the zip. It fails with the following exception, which makes it difficult to find out why it is failing. ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: java.lang.NullPointerException: entry at java.util.zip.ZipFile.getInputStream(ZipFile.java:342) at org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490) at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93) at org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111) at org.dspace.sword.DepositManager.deposit(DepositManager.java:148) at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120) at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) To reproduce, try to deposit through SWORD with the attached example.zip. It is just dspace-sword/example/example.zip with one of the PDF files removed but still referenced from the mets.xml.
    via by Àlex Magaz Graça,
  • When the keep-package-on-fail option in sword-server.cfg is set to true, the package should be saved (in de directory defined in failed-package.dir) if the deposit fails. However, this doesn't happen if the deposit fails because of a RuntimeException. Steps to reproduce: 1. Set keep-package-on-fail to true. 2. Set a directory in failed-package.dir. 3. Try to deposit with the attached example.zip. It is just dspace-sword/example/example.zip with one of the PDF files removed but still referenced from the mets.xml. 4. The deposit fails with the following exception: ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: java.lang.NullPointerException: entry at java.util.zip.ZipFile.getInputStream(ZipFile.java:342) at org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490) at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93) at org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111) at org.dspace.sword.DepositManager.deposit(DepositManager.java:148) at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120) at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) However, the package is not found under the failed-package.dir directory.
    via by Àlex Magaz Graça,
  • When a METS packaged in a zip is ingested, the ingester doesn't check if the files referenced from the mets.xml actually exist in the zip. It fails with the following exception, which makes it difficult to find out why it is failing. ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: java.lang.NullPointerException: entry at java.util.zip.ZipFile.getInputStream(ZipFile.java:342) at org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490) at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93) at org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111) at org.dspace.sword.DepositManager.deposit(DepositManager.java:148) at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120) at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) To reproduce, try to deposit through SWORD with the attached example.zip. It is just dspace-sword/example/example.zip with one of the PDF files removed but still referenced from the mets.xml.
    via by Àlex Magaz Graça,
  • When the keep-package-on-fail option in sword-server.cfg is set to true, the package should be saved (in de directory defined in failed-package.dir) if the deposit fails. However, this doesn't happen if the deposit fails because of a RuntimeException. Steps to reproduce: 1. Set keep-package-on-fail to true. 2. Set a directory in failed-package.dir. 3. Try to deposit with the attached example.zip. It is just dspace-sword/example/example.zip with one of the PDF files removed but still referenced from the mets.xml. 4. The deposit fails with the following exception: ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: java.lang.NullPointerException: entry at java.util.zip.ZipFile.getInputStream(ZipFile.java:342) at org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490) at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93) at org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111) at org.dspace.sword.DepositManager.deposit(DepositManager.java:148) at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120) at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) However, the package is not found under the failed-package.dir directory.
    via by Àlex Magaz Graça,
  • Exception on Startup
    via by John E. Conlon,
  • GitHub comment 3490#148272516
    via GitHub by badlogic
    ,
  • Network-Drive, indexing crashes
    via docfetcher by *anonymous
    ,
  • GitHub comment 16#216889269
    via GitHub by handsetvn
    ,
    • java.lang.NullPointerException: entry at java.util.zip.ZipFile.getInputStream(ZipFile.java:342) at org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490) at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776) at org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500) at org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234) at org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93) at org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111) at org.dspace.sword.DepositManager.deposit(DepositManager.java:148) at org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120) at org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)

    Users with the same issue

    davidvanlaatum
    8 times, last one,
    Unknown User
    24 times, last one,
    jk
    2 times, last one,