org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute.

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

    Originally reported on dspace-tech by Àlex Magaz Graça: http://dspace.2283337.n4.nabble.com/Problems-trying-to-deposit-through-SWORD-tt4669426.html Àlex wrote there: I've been trying to deposit through SWORD (both with versions 1 and 2) but it either fails or does it incorrectly. Fetching the servicedocument and depositing a file to an item work though. With SWORD v1: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/sword/deposit/12345/2 It gives me this error: WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 [...] ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) 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) [...] Actually, the file element has an ID attribute, what the code is really checking for is the ADMID attribute, which I've confirmed it is missing. With SWORD v2: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword/package/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/swordv2/collection/12345/2 The deposit doesn't fail, but the zip doesn't get unpacked either. An item is created with no metadata from the METS file. It just contains a bitstream with the name test1.zip, which corresponds to example.zip. In the logs I see this warning: WARN org.dspace.core.PluginManager @ Cannot find named plugin for interface=org.dspace.sword2.SwordContentIngester, name="application/zip" It seems like it is using the Content-Type header instead of X-Packaging. So if set the value of the Content-Type header of the previous command to "Content-Type: http://purl.org/net/sword/package/METSDSpaceSIP", I get this error: [...] WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 INFO org.dspace.content.Bitstream @ sword:session_id=0:update_bitstream:bitstream_id=18 ERROR org.dspace.sword2.SwordMETSContentIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) at org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:660) at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1187) at org.dspace.sword2.SwordMETSContentIngester.ingestToCollection(SwordMETSContentIngester.java:108) at org.dspace.sword2.AbstractSwordContentIngester.ingest(AbstractSwordContentIngester.java:45) at org.dspace.sword2.SwordMETSContentIngester.ingest(SwordMETSContentIngester.java:44) at org.dspace.sword2.CollectionDepositManagerDSpace.createNewFromBinary(CollectionDepositManagerDSpace.java:229) [...] If I try to deposit from another repository with the SWORD client functionality, it also fails with the ID attribute error, although in this case the ADMID attribute is present in the file element. I've made all these tests with DSpace 4 (master) test machine without any customisation apart from the install directories in build.properties. Nevertheless, I get the same results with demo.dspace.org.

    Sakai JIRA | 3 years ago | Àlex Magaz Graça
    org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute.
  2. 0

    Originally reported on dspace-tech by Àlex Magaz Graça: http://dspace.2283337.n4.nabble.com/Problems-trying-to-deposit-through-SWORD-tt4669426.html Àlex wrote there: I've been trying to deposit through SWORD (both with versions 1 and 2) but it either fails or does it incorrectly. Fetching the servicedocument and depositing a file to an item work though. With SWORD v1: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/sword/deposit/12345/2 It gives me this error: WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 [...] ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) 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) [...] Actually, the file element has an ID attribute, what the code is really checking for is the ADMID attribute, which I've confirmed it is missing. With SWORD v2: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword/package/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/swordv2/collection/12345/2 The deposit doesn't fail, but the zip doesn't get unpacked either. An item is created with no metadata from the METS file. It just contains a bitstream with the name test1.zip, which corresponds to example.zip. In the logs I see this warning: WARN org.dspace.core.PluginManager @ Cannot find named plugin for interface=org.dspace.sword2.SwordContentIngester, name="application/zip" It seems like it is using the Content-Type header instead of X-Packaging. So if set the value of the Content-Type header of the previous command to "Content-Type: http://purl.org/net/sword/package/METSDSpaceSIP", I get this error: [...] WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 INFO org.dspace.content.Bitstream @ sword:session_id=0:update_bitstream:bitstream_id=18 ERROR org.dspace.sword2.SwordMETSContentIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) at org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:660) at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1187) at org.dspace.sword2.SwordMETSContentIngester.ingestToCollection(SwordMETSContentIngester.java:108) at org.dspace.sword2.AbstractSwordContentIngester.ingest(AbstractSwordContentIngester.java:45) at org.dspace.sword2.SwordMETSContentIngester.ingest(SwordMETSContentIngester.java:44) at org.dspace.sword2.CollectionDepositManagerDSpace.createNewFromBinary(CollectionDepositManagerDSpace.java:229) [...] If I try to deposit from another repository with the SWORD client functionality, it also fails with the ID attribute error, although in this case the ADMID attribute is present in the file element. I've made all these tests with DSpace 4 (master) test machine without any customisation apart from the install directories in build.properties. Nevertheless, I get the same results with demo.dspace.org.

    Sakai JIRA | 3 years ago | Àlex Magaz Graça
    org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute.
  3. 0

    Originally reported on dspace-tech by Àlex Magaz Graça: http://dspace.2283337.n4.nabble.com/Problems-trying-to-deposit-through-SWORD-tt4669426.html Àlex wrote there: I've been trying to deposit through SWORD (both with versions 1 and 2) but it either fails or does it incorrectly. Fetching the servicedocument and depositing a file to an item work though. With SWORD v1: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword-types/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/sword/deposit/12345/2 It gives me this error: WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 [...] ERROR org.dspace.sword.SWORDMETSIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) 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) [...] Actually, the file element has an ID attribute, what the code is really checking for is the ADMID attribute, which I've confirmed it is missing. With SWORD v2: curl -i --data-binary "@dspace-sword/example/example.zip" -H "Content-Disposition: filename=test1.zip" -H "Content-Type: application/zip" -H "X-Packaging: http://purl.org/net/sword/package/METSDSpaceSIP" -H "X-No-Op: false" -H "X-Verbose: true" --user "user:pass" http://1.2.3.4/swordv2/collection/12345/2 The deposit doesn't fail, but the zip doesn't get unpacked either. An item is created with no metadata from the METS file. It just contains a bitstream with the name test1.zip, which corresponds to example.zip. In the logs I see this warning: WARN org.dspace.core.PluginManager @ Cannot find named plugin for interface=org.dspace.sword2.SwordContentIngester, name="application/zip" It seems like it is using the Content-Type header instead of X-Packaging. So if set the value of the Content-Type header of the previous command to "Content-Type: http://purl.org/net/sword/package/METSDSpaceSIP", I get this error: [...] WARN org.dspace.content.packager.METSManifest @ Got no bitstream ADMID, file@ID=sword-mets-file-3 INFO org.dspace.content.Bitstream @ sword:session_id=0:update_bitstream:bitstream_id=18 ERROR org.dspace.sword2.SwordMETSContentIngester @ caught exception: org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute. at org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850) at org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:660) at org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1187) at org.dspace.sword2.SwordMETSContentIngester.ingestToCollection(SwordMETSContentIngester.java:108) at org.dspace.sword2.AbstractSwordContentIngester.ingest(AbstractSwordContentIngester.java:45) at org.dspace.sword2.SwordMETSContentIngester.ingest(SwordMETSContentIngester.java:44) at org.dspace.sword2.CollectionDepositManagerDSpace.createNewFromBinary(CollectionDepositManagerDSpace.java:229) [...] If I try to deposit from another repository with the SWORD client functionality, it also fails with the ID attribute error, although in this case the ADMID attribute is present in the file element. I've made all these tests with DSpace 4 (master) test machine without any customisation apart from the install directories in build.properties. Nevertheless, I get the same results with demo.dspace.org.

    Sakai JIRA | 3 years ago | Àlex Magaz Graça
    org.dspace.content.packager.PackageValidationException: Invalid METS Manifest: file element without ID attribute.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Unable to find METSRIGHTS crosswalk plugin when exporting items as AIP

    Google Groups | 3 months ago | Max Sullivan
    org.dspace.content.packager.PackageValidationException: Cannot find METSRIGHTS crosswalk plugin, either DisseminationCrosswalk or StreamDisseminationCrosswalk at org.dspace.content.packager.AbstractMETSDisseminator.makeMdSec(AbstractMETSDisseminator.java:701) at org.dspace.content.packager.AbstractMETSDisseminator.addToAmdSec(AbstractMETSDisseminator.java:727) at org.dspace.content.packager.AbstractMETSDisseminator.addAmdSec(AbstractMETSDisseminator.java:754) at org.dspace.content.packager.AbstractMETSDisseminator.makeManifest(AbstractMETSDisseminator.java:839) at org.dspace.content.packager.AbstractMETSDisseminator.writeZipPackage(AbstractMETSDisseminator.java:311) at org.dspace.content.packager.AbstractMETSDisseminator.disseminate(AbstractMETSDisseminator.java:258) at org.dspace.content.packager.DSpaceAIPDisseminator.disseminate(DSpaceAIPDisseminator.java:160)
  6. 0

    Unable to find METSRIGHTS crosswalk plugin when exporting items as AIP

    Google Groups | 3 months ago | Max Sullivan
    org.dspace.content.packager.PackageValidationException: Cannot find METSRIGHTS crosswalk plugin, either DisseminationCrosswalk or StreamDisseminationCrosswalk

    Root Cause Analysis

    1. org.dspace.content.packager.PackageValidationException

      Invalid METS Manifest: file element without ID attribute.

      at org.dspace.content.packager.AbstractMETSIngester.addBitstreams()
    2. DSpace Kernel :: API and Implementation
      AbstractMETSIngester.replace
      1. org.dspace.content.packager.AbstractMETSIngester.addBitstreams(AbstractMETSIngester.java:850)
      2. org.dspace.content.packager.AbstractMETSIngester.replaceObject(AbstractMETSIngester.java:660)
      3. org.dspace.content.packager.AbstractMETSIngester.replace(AbstractMETSIngester.java:1187)
      3 frames
    3. org.dspace.sword2
      CollectionDepositManagerDSpace.createNewFromBinary
      1. org.dspace.sword2.SwordMETSContentIngester.ingestToCollection(SwordMETSContentIngester.java:108)
      2. org.dspace.sword2.AbstractSwordContentIngester.ingest(AbstractSwordContentIngester.java:45)
      3. org.dspace.sword2.SwordMETSContentIngester.ingest(SwordMETSContentIngester.java:44)
      4. org.dspace.sword2.CollectionDepositManagerDSpace.createNewFromBinary(CollectionDepositManagerDSpace.java:229)
      4 frames