java.lang.NullPointerException: entry

Sakai JIRA | Àlex Magaz Graça | 2 years ago
  1. 0

    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.

    Sakai JIRA | 2 years ago | Àlex Magaz Graça
    java.lang.NullPointerException: entry
  2. 0

    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.

    Sakai JIRA | 2 years ago | Àlex Magaz Graça
    java.lang.NullPointerException: entry
  3. 0

    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.

    Sakai JIRA | 2 years ago | Àlex Magaz Graça
    java.lang.NullPointerException: entry
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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.

    Sakai JIRA | 2 years ago | Àlex Magaz Graça
    java.lang.NullPointerException: entry
  6. 0

    Exception on Startup

    ace-users | 2 years ago | John E. Conlon
    java.lang.NullPointerException: entry
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    entry

    at java.util.zip.ZipFile.getInputStream()
  2. Java RT
    ZipFile.getInputStream
    1. java.util.zip.ZipFile.getInputStream(ZipFile.java:342)
    1 frame
  3. DSpace Kernel :: API and Implementation
    AbstractMETSIngester.ingest
    1. org.dspace.content.packager.AbstractMETSIngester.getFileInputStream(AbstractMETSIngester.java:1490)
    2. org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:776)
    3. org.dspace.content.packager.AbstractMETSIngester.ingestObject(AbstractMETSIngester.java:500)
    4. org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:234)
    4 frames
  4. org.dspace.sword
    DSpaceSWORDServer.doDeposit
    1. org.dspace.sword.SWORDMETSIngester.ingest(SWORDMETSIngester.java:93)
    2. org.dspace.sword.CollectionDepositor.doDeposit(CollectionDepositor.java:111)
    3. org.dspace.sword.DepositManager.deposit(DepositManager.java:148)
    4. org.dspace.sword.DSpaceSWORDServer.doDeposit(DSpaceSWORDServer.java:120)
    4 frames
  5. org.purl.sword
    DepositServlet.doPost
    1. org.purl.sword.server.DepositServlet.doPost(DepositServlet.java:299)
    1 frame
  6. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    2 frames
  7. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    10 frames
  8. org.apache.coyote
    AjpAprProcessor.process
    1. org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:197)
    1 frame
  9. Grizzly HTTP
    AprEndpoint$SocketProcessor.run
    1. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    2. org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2430)
    3. org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2419)
    3 frames
  10. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    3. java.lang.Thread.run(Thread.java:744)
    3 frames