Hi Stuart,

So, eperson is identified by emailName or number. I've in the past tried 
swapping out an emailName for a generic name `ds_capture' which didn't work. 
That explains it, thanks.

-- Van Ly 



-----Original Message-----
From: Stuart Lewis [mailto:s.le...@auckland.ac.nz]
Sent: Tue 7/04/2009 10:39 AM
To: Van Ly; dspace-tech@lists.sourceforge.net
Subject: RE: [Dspace-tech] using ItemImport WAS:  <no subject>
 
Hi Van,

 

The 'if' statement looking for an email address also has an 'else':

 

if (eperson.indexOf('@') != -1)

{

   // @ sign, must be an email

   myEPerson = EPerson.findByEmail(c, eperson);

}

else

{

   myEPerson = EPerson.find(c, Integer.parseInt(eperson));

}

 

So you are able to use the EPerson ID number for imports.

 

Cheers,

 

 

Stuart Lewis

Digital Services Programmer

Te Tumu Herenga The University of Auckland Library

Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand

Ph: 64 9 373-7599 x81928

http://www.library.auckland.ac.nz <http://www.library.auckland.ac.nz/> /

 

 

 

From: Van Ly [mailto:v...@library.usyd.edu.au] 
Sent: Tuesday, 7 April 2009 12:07 p.m.
To: Karen_Savage; dspace-tech@lists.sourceforge.net
Subject: [Dspace-tech] using ItemImport WAS: <no subject>

 

Hi Karen,

 

I've a script that does data capture with a call to ItemImport, you can
redirect stdout and stderr to files for debugging. I've a feeling the
eperson name has to have `@' <mailto:%60@'>  as part of the value ie. an
email address.

 

--- ItemImport in use

   104  $ds/bin/dsrun org.dspace.app.itemimport.ItemImport \
   105   -a      \
   106   -e $dsEperson      \
   107   -c $dsCollection     \
   108   -s $dsItemCopy     \
   109   -m $dsItemCopy/mapfile         \
   110   > $dsItemCopy/stdout.text   \ 
   111   2> $dsItemCopy/stderr.text

 

--- from ItemImport.java:341

   341          if (eperson.indexOf('@') != -1)
   342          {
   343              // @ sign, must be an email
   344              myEPerson = EPerson.findByEmail(c, eperson);
   345          }

 

-- Van Ly 

________________________________

From: Karen_Savage [mailto:karen_sav...@baylor.edu]
Sent: Tue 7/04/2009 5:00 AM
To: dspace-tech@lists.sourceforge.net
Subject: [Dspace-tech] <no subject>

No, unfortunately, changing the eperson_id over to my email didn't work.
Still the same error message.

-- 
Karen S



________________________________

From: Scott Phillips <scott.a.phill...@gmail.com>
Date: Mon, 6 Apr 2009 10:42:51 -0500
To: Karen Savage <karen_sav...@baylor.edu>
Subject: Re: [Dspace-tech] <no subject>

Karen,

/dspace/bin/dsrun org.dspace.app.itemimport.ItemImport -a -e 2039 -c
3029/2039 -s import -m /mapfiles/mapfile_ball -t


The problem is likely with you're -e switch. -e is suppose to indicate
the EPerson who is performing the action (aka you), you typically want
to use the email address you have registered with your EPerson account
in the repository.

Scott--

On Apr 6, 2009, at 10:35 AM, Karen_Savage wrote:

Hi,
 
 I'm trying to do a batch import of files to a particular etd in our
collection, but I keep getting the following error:
 Destination collections:
 Exception in thread "main" java.lang.ClassCastException:
org.dspace.content.Item
     at org.dspace.app.itemimport.ItemImport.main(ItemImport.java:341)
 
 This is the command I'm running (I've switched out the ids):
 /dspace/bin/dsrun org.dspace.app.itemimport.ItemImport -a -e 2039 -c
3029/2039 -s import -m /mapfiles/mapfile_ball -t
 
 This is my directory structure:
 import
     001
         contents
         dublin_core.xml
         various files to upload
         
 We're running Dspace 1.3.2. I double-checked all the log files and
didn't see any errors for the time that I last ran the command.
 
 I'd appreciate any help or suggestions!
 
-- 
 Karen Savage
 Baylor University
 Central Libraries
 Electronic Libraries
 ext. 3275


------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to