Thanks for the reply.
I successfully exported an item - and nearly imported it again...
1.) Export result:
$ /opt/dspace/bin/dsrun org.dspace.app.itemexport.ItemExport --type=ITEM
--id=2008/8 --number=0 --dest=/home/dspace/testExport/
Exporting Item 14 to /home/dspace/testExport/0
Attempting to create file /home/dspace/testExport/0/metadata_vCard.xml
Attempting to create file /home/dspace/testExport/0/metadata_xmd.xml
Attempting to create file /home/dspace/testExport/0/metadata_marc.xml
Attempting to create file /home/dspace/testExport/0/dublin_core.xml
Attempting to create file /home/dspace/testExport/0/metadata_uos.xml
Attempting to create file /home/dspace/testExport/0/metadata_ddb.xml
Attempting to create file /home/dspace/testExport/0/metadata_dct.xml
All files were really created, an all other needed files too (licenses,
content, handle, ...).
2.) Import result:
$ /opt/dspace/bin/dsrun org.dspace.app.itemimport.ItemImport --add
[EMAIL PROTECTED] --collection=2008/7
--source=/home/dspace/testExport --mapfile=testImport.map
Destination collections:
Owning Collection: Sonstige qualifizierende, wissenschaftliche Arbeiten
Adding items from directory: /home/dspace/testExport
Generating mapfile: testImport.map
Adding item from directory 0
Loading dublin core from /home/dspace/testExport/0/dublin_core.xml
Schema: dc Element: creator Qualifier: none Value: Roggenbuck, R.
Schema: dc Element: date Qualifier: accessioned Value:
2008-06-30T12:22:51Z
Schema: dc Element: date Qualifier: available Value:
2008-06-30T12:22:51Z
Schema: dc Element: date Qualifier: issued Value: 2008-06-30T12:22:51Z
Schema: dc Element: identifier Qualifier: none Value: 1
Schema: dc Element: identifier Qualifier: uri Value:
http://hdl.handle.net/2008/8
Schema: dc Element: description Qualifier: provenance Value:
Submitted by Robert Roggenbuck ([EMAIL PROTECTED]) on 2008-06-30T12:20:41Z
No. of bitstreams: 2
bestPracticeForPeriodicals.html: 8415 bytes, checksum:
17027f9be5b0d1481d95480c4893444b (MD5)
textSmall.css: 93 bytes, checksum: c07b4db54f31a09abe659d3cc2140717 (MD5)
Schema: dc Element: description Qualifier: provenance Value:
Approved for entry into archive by Robert Roggenbuck([EMAIL PROTECTED]) on
2008-06-30T12:22:51Z (GMT) No. of bitstreams: 2
bestPracticeForPeriodicals.html: 8415 bytes, checksum:
17027f9be5b0d1481d95480c4893444b (MD5)
textSmall.css: 93 bytes, checksum: c07b4db54f31a09abe659d3cc2140717 (MD5)
Schema: dc Element: description Qualifier: provenance Value: Made
available in DSpace on 2008-06-30T12:22:51Z (GMT). No. of bitstreams: 2
bestPracticeForPeriodicals.html: 8415 bytes, checksum:
17027f9be5b0d1481d95480c4893444b (MD5)
textSmall.css: 93 bytes, checksum: c07b4db54f31a09abe659d3cc2140717 (MD5)
Schema: dc Element: publisher Qualifier: none Value: Universität
Osnabrück
Schema: dc Element: subject Qualifier: none Value: Stich
Schema: dc Element: subject Qualifier: none Value: Wort
Schema: dc Element: title Qualifier: none Value: Vergessenes
Schema: dc Element: type Qualifier: none Value: tmp
Loading dublin core from /home/dspace/testExport/0/metadata_vCard.xml
Schema: vCard Element: ORG Qualifier: none Value: fb01
Loading dublin core from /home/dspace/testExport/0/metadata_dct.xml
Schema: dct Element: created Qualifier: none Value: 1990-01-01
Schema: dct Element: modified Qualifier: none Value: 1990-01-01
Schema: dct Element: accessRights Qualifier: none Value: v
Schema: dct Element: abstract Qualifier: none Value: Dieses hier ist
die Zusammenfassung, die ich vergessen habe.
Schema: dct Element: alternative Qualifier: none Value: Forgotten Things
Schema: dct Element: ISO639-2 Qualifier: none Value: de
Schema: dct Element: DDC Qualifier: none Value: ddc.12.45
Schema: dct Element: modified1 Qualifier: none Value: 1990-01-01
Schema: dct Element: modified2 Qualifier: none Value: 1990-01-02
Loading dublin core from /home/dspace/testExport/0/metadata_xmd.xml
Schema: xmd Element: PACS2003 Qualifier: none Value: pacs2003.f34m
Schema: xmd Element: CCS1998 Qualifier: none Value: ccs1998.a1
Schema: xmd Element: BK Qualifier: none Value: bk.w
Schema: xmd Element: ZDM Qualifier: none Value: zdm.A12
Schema: xmd Element: MSC1991 Qualifier: none Value: msc1991.12D34
Schema: xmd Element: MSC2000 Qualifier: none Value: msc2000.12D34
Loading dublin core from /home/dspace/testExport/0/metadata_ddb.xml
Schema: ddb Element: annotation Qualifier: none Value: Bemerkungen?
Loading dublin core from /home/dspace/testExport/0/metadata_marc.xml
Schema: marc Element: edt Qualifier: none Value: rr
Schema: marc Element: ths Qualifier: none Value: Prof. Dr. Profi
Schema: marc Element: rev Qualifier: none Value: Dr. Doktoribus
Loading dublin core from /home/dspace/testExport/0/metadata_uos.xml
Schema: uos Element: ISO639-2title Qualifier: none Value: de
Schema: uos Element: ISO639-2alt Qualifier: none Value: en
Schema: uos Element: examDateOral Qualifier: none Value: 1989-12-01
Schema: uos Element: DNB Qualifier: none Value: dnb.123
Schema: uos Element: PACS1996 Qualifier: none Value: pacs1996.f34m
Schema: uos Element: PACS1998 Qualifier: none Value: pacs1998.f34m
Schema: uos Element: PACS1999 Qualifier: none Value: pacs1999.f34m
Schema: uos Element: PACS2001 Qualifier: none Value: pacs2001.f34m
Schema: uos Element: PACS2006 Qualifier: none Value: pacs2006.f34m
Schema: uos Element: CCS1991 Qualifier: none Value: ccs1991.a
Processing contents file: /home/dspace/testExport/0/contents
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:850)
at edu.sdsc.grid.io.local.LocalFile.createNewFile(LocalFile.java:486)
at
org.dspace.storage.bitstore.BitstreamStorageManager.store(BitstreamStorageManager.java:332)
at org.dspace.content.Bitstream.create(Bitstream.java:194)
at org.dspace.content.Bundle.createBitstream(Bundle.java:375)
at
org.dspace.app.itemimport.ItemImport.processContentFileEntry(ItemImport.java:1210)
at
org.dspace.app.itemimport.ItemImport.processContentsFile(ItemImport.java:1112)
at org.dspace.app.itemimport.ItemImport.addItem(ItemImport.java:648)
at org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:514)
at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:421)
java.io.IOException: No such file or directory
This is odd, because the file 'contents' is there, reading permissions
are ok and all files listed in 'contents' ale there too.
$ more contents
bestPracticeForPeriodicals.html bundle:ORIGINAL
textSmall.css bundle:ORIGINAL
license_url bundle:CC-LICENSE
license_text bundle:CC-LICENSE
license_rdf bundle:CC-LICENSE
license.txt bundle:LICENSE
$ ls -l /home/dspace/testExport/0
-rw-r--r-- 1 dspace dspace 8415 1. Jul 10:45
bestPracticeForPeriodicals.html
-rw-r--r-- 1 dspace dspace 196 1. Jul 10:45 contents
-rw-r--r-- 1 dspace dspace 1880 1. Jul 10:45 dublin_core.xml
-rw-r--r-- 1 dspace dspace 19757 1. Jul 10:45 license_rdf
-rw-r--r-- 1 dspace dspace 13315 1. Jul 10:45 license_text
-rw-r--r-- 1 dspace dspace 1835 1. Jul 10:45 license.txt
-rw-r--r-- 1 dspace dspace 43 1. Jul 10:45 license_url
-rw-r--r-- 1 dspace dspace 750 1. Jul 10:45 metadata_dct.xml
-rw-r--r-- 1 dspace dspace 169 1. Jul 10:45 metadata_ddb.xml
-rw-r--r-- 1 dspace dspace 288 1. Jul 10:45 metadata_marc.xml
-rw-r--r-- 1 dspace dspace 778 1. Jul 10:45 metadata_uos.xml
-rw-r--r-- 1 dspace dspace 156 1. Jul 10:45 metadata_vCard.xml
-rw-r--r-- 1 dspace dspace 491 1. Jul 10:45 metadata_xmd.xml
-rw-r--r-- 1 dspace dspace 93 1. Jul 10:45 textSmall.css
Any ideas how to proceed? How to figure out to which file "No such file
or directory" referes?
Best Regrds
Robert
Fox, Graeme schrieb:
> All the fields are optional, so leaving the fields out should not cause a
> problem.
>
> This is a copy of the steps I did for the itemexport and iteminport, running
> in a linux environment. I created the output directory and ran the itemeport
> command
> 1/ EXPORTING THE ITEM
> [EMAIL PROTECTED] ~]$ mkdir TestCase2
> [EMAIL PROTECTED] ~]$ $DSPACE/bin/dsrun org.dspace.app.itemexport.ItemExport
> --type=ITEM --id=10179/571 --number=0 --dest=$HOME/TestCase2
> Exporting Item 492 to /home/dspace/TestCase2/0
> Attempting to create file /home/dspace/TestCase2/0/dublin_core.xml
> Attempting to create file /home/dspace/TestCase2/0/metadata_massey.xml
>
> 2/ then I removed the handle file and ran the itemimport command
>
> 2 Expected output
> [EMAIL PROTECTED] ~]$ $DSPACE/bin/dsrun
> org.dspace.app.itemimport.ItemImport --add [EMAIL PROTECTED]
> --collection=10179/295 --source=$HOME/TestCase1 --mapfile=$HOME/mapfile
> Destination collections:
> Owning Collection: Journal Articles
> Adding items from directory: /home/dspace/TestCase1
> Generating mapfile: /home/dspace/mapfile
> Adding item from directory 0
> Loading dublin core from
> /home/dspace/TestCase4/0/dublin_core.xml
> Schema: dc Element: contributor Qualifier: none Value: Ann R
> Holmes
> Schema: dc Element: contributor Qualifier: none Value: Sarah
> Tsao
> Schema: dc Element: contributor Qualifier: author Value:
> Soo-Wee Ong
> Schema: dc Element: contributor Qualifier: author Value:
> Erwin Lamping
> Schema: dc Element: contributor Qualifier: author Value:
> Kyoko Niimi
> Schema: dc Element: contributor Qualifier: author Value:
> Brian C Monk
> Schema: dc Element: contributor Qualifier: author Value:
> Masakazu Niimi
> Schema: dc Element: contributor Qualifier: author Value: Aki
> Kaneko
> Schema: dc Element: contributor Qualifier: author Value: Dr
> Barbara Ruth Holland
> Schema: dc Element: contributor Qualifier: author Value: Dr
> Jan Schmid
> Schema: dc Element: contributor Qualifier: author Value:
> A/Prof Richard D Cannon
> Schema: dc Element: date Qualifier: none Value: 2006
> Schema: dc Element: date Qualifier: none Value:
> 2008-02-17T22:10:40Z
> Schema: dc Element: date Qualifier: accessioned Value:
> 2008-06-23T02:38:56Z
> Schema: dc Element: date Qualifier: available Value:
> 2008-06-23T02:38:56Z
> Schema: dc Element: date Qualifier: issued Value:
> 2008-06-23T02:38:56Z
> Schema: dc Element: identifier Qualifier: uri Value:
> http://hdl.handle.net/123456789/584
> Schema: dc Element: description Qualifier: provenance Value:
> Made available in DSpace on 2008-06-23T02:38:56Z (GMT). No. of bitstreams: 2
> license.txt: 882 bytes, checksum: 231f1e978863b3c3913d563aad54441d
> (MD5)
> 20060000773.pdf: 56337 bytes, checksum:
> b59230c11e8a589f61bf068a3e33ece1 (MD5)
> Schema: dc Element: format Qualifier: none Value: PDF
> Schema: dc Element: language Qualifier: none Value: en_US
> Schema: dc Element: publisher Qualifier: none Value:
> Blackwell Publishing
> Schema: dc Element: relation Qualifier: none Value: Molecular
> Microbiology
> Schema: dc Element: title Qualifier: none Value:
> Heterozygosity and functional allelic variation in the Candida albacans
> efflux pump genes CDR1 and CDR2
> Loading dublin core from
> /home/dspace/TestCase4/0/metadata_massey.xml
> Schema: massey Element: contributor Qualifier: author Value:
> Dr Barbara Ruth Holland
> Schema: massey Element: contributor Qualifier: author Value:
> Dr Jan Schmid
> Schema: massey Element: identifier Qualifier: rims Value:
> 2006000773
> Schema: massey Element: title Qualifier: budgetcentre Value:
> 124 Institute of Molecular Biosciences
> Schema: massey Element: identifier Qualifier: issue Value: 1
> Schema: massey Element: identifier Qualifier: pages Value: 17
> Schema: massey Element: identifier Qualifier: startpage
> Value: 170
> Schema: massey Element: identifier Qualifier: endpage Value:
> 186
> Schema: massey Element: identifier Qualifier: volume Value: 62
> Schema: massey Element: contributor Qualifier: lprivate
> Value: 0
> Schema: massey Element: contributor Qualifier:
> collegepublished Value: 50 College of Sciences
> Schema: massey Element: title Qualifier: college Value: 50
> College of Sciences
> Processing contents file: /home/dspace/TestCase4/0/contents
> Bitstream: license.txt Bundle: LICENSE
> Bitstream: 20060000773.pdf Bundle: ORIGINAL
> Processing handle file: handle
> It appears there is no handle file -- generating one
> 0 0
>
> ----------------------------------------------------------------------
> The itemimport output shows the two different schemas used.
>
> Hope this helps
>
> regards
> Graeme Fox
> Project Manager
> Information Technology Services
> Massey University
> Private Bag 11222 Email: [EMAIL PROTECTED]
> Palmerston North Phone: +64 6 350-5799 ext 2109
> New Zealand Mobile: 027 3584848
>
> -----Original Message-----
> From: Robert Roggenbuck [mailto:[EMAIL PROTECTED]
> Sent: Monday, 30 June 2008 7:19 p.m.
> To: Fox, Graeme
> Cc: [email protected]
> Subject: Re: [Dspace-tech] Failed ItemImport (Robert Roggenbuck)
>
> Thanks for the hint.
> The metadata schemes / fields are made already (I think if not the
> import will sure fail). I added manually only a "standard" item, because
> until now I failed to localise the input forms. My plan was to extend /
> modify the input form after the successfully localisation. Could it be
> that fields missing in the input form prevent the import?
> Anyway I will try Your suggestion to see whether there is a problem with
> the XML-format.
>
> Greetings
>
> Robert
>
> ---
>
> Fox, Graeme schrieb:
>> Failed ItemImport (Robert Roggenbuck)
>>
>> Try reversing the process, that is:
>> 1/ setup your meta schema registry names, dct, marc, uos and vCard
>> 2/ add an item to your repository utlising fields from these meta
>> data registry names
>> 3/ Export the item, that is, run ItemExport
>> 4/ this will create the required directory with the exported files,
>> handle file, xml files, contents file
>> 5/ From there you can import the item, to check the syntax, running
>> ItemImport
>>
>>
>> regards
>> Graeme Fox
> [snip]
>> ------------------------------
>>
>> Message: 2
>> Date: Fri, 27 Jun 2008 16:04:04 +0200
>> From: Robert Roggenbuck <[EMAIL PROTECTED]>
>> Subject: [Dspace-tech] Failed ItemImport
>> To: "[email protected] Tech"
>> <[email protected]>
>> Message-ID: <[EMAIL PROTECTED]>
>> Content-Type: text/plain; charset=ISO-8859-15; format=flowed
>>
>> Hi all,
>>
>> I tried to import metadata containing more then 1 file and using more
>> then 1 metatdata schema. As far as I see in the code of ItemImport.java
>> this should be possible. But I encounter the an error whent I try to do
>> the import:
>>
>> $ ./import -a -e [EMAIL PROTECTED] -c 123456789/4 -s /tmp/dc -m
>> 080627.map --test
>> **Test Run** - not actually importing items.
>> Destination collections:
>> Owning Collection: Osnabr?cker E-Dissertationen
>> Adding items from directory: /tmp/dc
>> Generating mapfile: 080627.map
>> java.lang.NullPointerException
>> at
>> org.dspace.app.itemimport.ItemImport.addItems(ItemImport.java:506)
>> at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:421)
>> java.lang.NullPointerException
>> ***End of Test Run***
>>
>> Here is the data I work with:
>>
>> The content of /tmp/dc is only 1 directory named dc0. dc0 contains:
>> contents
>> dublin_core.xml
>> E-Diss6_hepp.tar.gz
>> E-Diss6_hepp.tar.gz.sha2
>> E-Diss6_Int_Hepp.pdf
>> E-Diss6_Int_Hepp.pdf.sha2
>> license_text
>> metadata_dct.xml
>> metadata_marc.xml
>> metadata_uos.xml
>> metadata_vCard.xml
>>
>> The content of dublin_core.xml is
>>
>> <?xml version="1.0"?>
>> <dublin_core schema="dc">
>> <dcvalue element="creator" qualifier="">Hepp, Alexander</dcvalue>
>> <dcvalue element="identifier" qualifier="">6</dcvalue>
>> <dcvalue element="title" qualifier="">Isolobale Substitution in
>> Tetraphosphortrisulfid und in seinen Derivaten</dcvalue>
>> <dcvalue element="type" qualifier="">diss</dcvalue>
>> </dublin_core>
>>
>> And metadata_marc.xml, as an example for the other schemas:
>>
>> <?xml version="1.0"?>
>> <dublin_core schema="marc">
>> <dcvalue element="edt" qualifier="">fangmeier</dcvalue>
>> <dcvalue element="rev" qualifier="">Prof. Dr. Roger Blachnik; Dr. habil.
>> Konstantin Karaghiosoff</dcvalue>
>> <dcvalue element="ths" qualifier="">Prof. Dr. Roger Blachnik</dcvalue>
>> </dublin_core>
>>
>> The file 'license_text' is empty and 'contents' contains just the
>> filenames of the 4 files of the bundle.
>>
>> What did I wrong?
>>
>> Greetings
>>
>> Robert
>>
>>
>> --
>>
>> ===================================
>> Robert Roggenbuck
>> Universitaetsbibliothek Osnabrueck
>> Germany
>> ===================================
>>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech