Dear Members,

i want to ingest content in dspace 5.2 with the packager command.  The
data for the ingest is really big so i want only zip the mets.xml and
want to reference to the files in the filesysteme. My goal is to trigger
point 5 from the typical ingest operations
(https://wiki.duraspace.org/display/DSPACE/PackagerPlugins).

The ingest is started with the follwing command: 
> dspace packager -o manifestOnly=true --eperson=user2@localhost -p
123456789/17 -t METS $(pwd)/t.zip

Here is the mets.xml:

<?xml version="1.0" encoding="UTF-8"?>
<mets:mets xmlns:mets="http://www.loc.gov/METS/";
    xmlns:mods="http://www.loc.gov/mods/v3";
    xmlns:rts="http://cosimo.stanford.edu/sdr/metsrights/";
    xmlns:mix="http://www.loc.gov/mix/v10";
    xmlns:xlink="http://www.w3.org/1999/xlink";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:schemaLocation="http://www.loc.gov/METS/
        http://www.loc.gov/standards/mets/mets.xsd
        http://cosimo.stanford.edu/sdr/metsrights/
        http://cosimo.stanford.edu/sdr/metsrights.xsd
        http://www.loc.gov/mods/v3
        http://www.loc.gov/standards/mods/v3/mods-3-2.xsd
        http://www.loc.gov/mix/v10
        http://www.loc.gov/standards/mix/mix10/mix10.xsd";
    PROFILE="DSpace METS SIP Profile 1.0" >

    <mets:metsHdr CREATEDATE="2015-10-28T00:00:00">
        <mets:agent ROLE="CUSTODIAN" TYPE="ORGANIZATION">
            <mets:name>Rick Sanchez</mets:name>
        </mets:agent>
    </mets:metsHdr>

    <mets:dmdSec ID="mets-dmd-1">
        <mets:mdWrap MDTYPE="OTHER" OTHERMDTYPE="DIM">
            <mets:xmlData
xmlns:dim="http://www.dspace.org/xmlns/dspace/dim";>
                <dim:dim>
                    <dim:field mdschema="dc" element="description"
qualifier="abstract">Haben Sie gesehen Mittwoch</dim:field>
                    <dim:field mdschema="dc"
element="title">FooBarBaz</dim:field>
                </dim:dim>
            </mets:xmlData>
        </mets:mdWrap>
        <!--<mets:mdWrap MDTYPE="DC" label="Silence">
            <mets:xmlData>
                <dc:record xmlns:dc="http://purl.org/dc/elements/1.1/";>
                    <dc:title>TIngest for packger</dc:title>
                    <dc:contributor>Fooman</dc:contributor>
                </dc:record>
            </mets:xmlData>
        </mets:mdWrap>-->
    </mets:dmdSec>

    <mets:fileSec>
        <mets:fileGrp ID="test1" USE="CONTENT">
            <mets:file GROUPID="test1" ID="test1-f1"
MIMETYPE="application/pdf">
                <mets:FLocat LOCTYPE="URL"
xlink:href="/mnt/tingest-packager/tingest/pdf1.pdf" />
            </mets:file>
        </mets:fileGrp>
    </mets:fileSec>

    <mets:structMap type="logical">
        <mets:div id="test1-div1" DMDID="mets-dmd-1" type="test object">
            <mets:div id="test1-div2" type="File">
                <mets:fptr fileid="test1-f1" />
            </mets:div>
        </mets:div>
    </mets:structMap>
</mets:mets>

The ingest command throws the follwing exceptions:

Destination parents:
Owner: 123456789/17

Ingesting package located at /mnt/tingest-packager/tingest/t.zip
org.dspace.content.crosswalk.MetadataValidationException: Error
validating METS in java.io.FileInputStream@1f443fae
        at
org.dspace.content.packager.METSManifest.create(METSManifest.java:293)
        at
org.dspace.content.packager.AbstractMETSIngester.parsePackage(AbstractMETSIngester.java:316)
        at
org.dspace.content.packager.AbstractMETSIngester.ingest(AbstractMETSIngester.java:195)
        at org.dspace.app.packager.Packager.ingest(Packager.java:570)
        at org.dspace.app.packager.Packager.main(Packager.java:427)
        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:497)
        at
org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
        at
org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: org.jdom.input.JDOMParseException: Error on line 1: Content
is not allowed in prolog.
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:770)
        at
org.dspace.content.packager.METSManifest.create(METSManifest.java:280)
        ... 10 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber:
1; Content is not allowed in prolog.
        at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
        at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.jdom.input.SAXBuilder.build(SAXBuilder.java:453)
        ... 12 more
org.dspace.content.crosswalk.MetadataValidationException: Error
validating METS in java.io.FileInputStream@

I got the same error when i ingest a empty mets.xml file.

My questions are:
- Is the mets.xml right?
- What should i changed in the mets.xml to trigger point 5?

Thanks in advance,
Stefan

-- 
Stefan Fritzsche
email: [email protected]
tel: (49) 351 463-33212
---------------------------------------------
Zellescher Weg 12 // Willersbau A 109
01069 Dresden


-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to