Procedure: Configure ICE to EPrints

1 About this document

This procedure demonstrates how to configure an EPrints 3.X Repository to accept ICE documents.
This procedure is written for Linux System Administrators or EPrints Administrators with a background in Linux System Administration.
ssh access to EPrints server (eprints user and root)
subversion on EPrints server (used to check out code)
Intergrated Content Environment (ICE) System
EPrints Institutional Repository Software
This procedure was carried out on an EPrints Repository with LDAP and HTTPS enabled. Not having these features should not affect this procedure in any way. However if you would like to enable LDAP and support for HTTPS see the configuring-eprints-to-use-ldap-and-https documentation.
This version date
02/09/09 02:22:54 PM

2 Getting the code

  1. Log into the EPrints server as the EPrints user

  2. Go to the EPrints users home directory

    cd ~
  3. Check out the code using subversion

    svn co ice_eprints

3 Configuration

  1. Go into the directory where the code is checked out

    cd ice_eprints
  2. Open for editing

    1. Enter the valid username and password of your ICE server, below is an example of the file

    # ICE server username and password
    $c->{"ice_ore_import"}->{username} = "ice_username";
    $c->{"ice_ore_import"}->{password} = "ice_password";

    Note: An ICE server can be set up to use multiple repositories, this ICE to EPrints procedure is currently limited to only accept one ICE username and password. Please ensure that the username and password entered here, is that of the ICE Repository you will be submitting documents from.

  3. Copy to $EPRINTS_HOME/archive/$ARCHIVEID/cfg/cfg.d

  4. Copy to $EPRINTS_HOME/perl_lib/EPrints/Plugin/Import

  5. Copy to $EPRINTS_HOME/perl_lib/EPrints/Plugin/Sword/Import

  6. Open the file for editing

    vi $EPRINTS_HOME/archives/$ARCHIVEID/cfg/cfg.d/
    1. Add the following ORE format namespace for sword in the file

      $sword->{importers} = {
           "" => "Sword::Import::IceOre",
           "IceORE" => "Sword::Import::IceOre",
  7. Open the file for editing

    vi $EPRINTS_HOME/perl_lib/EPrints/
    1. Add the following lines to the file

         'executables' => {
           'xsltproc' => '/usr/bin/xsltproc',
           'convert' => '/usr/bin/convert',
         'invocation' => {
           'xsltproc' => '$(xsltproc) --nomkdir -o $(TARGET) $(STYLESHEET) $(SOURCE)',
           'convert_crop_white' => '$(convert) -crop 0x0 -bordercolor white -border 4x4 $(SOURCE) $(TARGET)',

    Note: Check the path to your xsltproc and convert commands if you are concerned that the above default values are incorrect

  8. Open /opt/eprints3/perl_lib/EPrints/Sword/ file for editing

    vi /opt/eprints3/perl_lib/EPrints/Sword/
  9. Substitute the value $db with the value $session on line number 193

4 Restart EPrints

  1. Change to the root user

    su -
  2. Restart Apache

    /usr/sbin/apachectl startssl

    Note: If you get an error: Can’t locate HTML/, please go to Appendix A at the end of this document to resolve that issue and then return to this step.

5 Testing

  1. Create a document in ICE ; If using an existing document skip to step 3

  2. Save the document

  3. Select the document in the ICE web view


  4. Click on the Advanced tab, in the ICE web view and then click on Force render selected


    Note: The above step is not always necessary with new documents, this step was added to ensure that there were no hiccups during this procedure. Older documents however may require this step if the documents were created before the RDF feature was implemented in the ICE code.

  5. Open the document in the ICE web view

  6. Click on the Publish tab and then click on SWORD Deposit


  7. Fill out the URL fields
  8. Fill out the Authentication (select Basic)

    Note: This will be the username and password of the EPrints repository that you are sending the document to. This username and password can be either a local EPrints user or an LDAP EPrints user. This was made possible by the step in the config above where we replaced the $db variable with $session.

  9. Click Get collections

    graphics4Note: If you get an error regarding EPrints::Sword::ServiceDocument please go to Appendix B at the end of this document to resolve that issue and then return to this step.

  10. When the page refreshes make sure that you set the Collection and Title are correct (it is preferred that you select User Inbox in the collection setting as shown in the screen capture below) then click the Deposit button.


  11. Go to the EPrints repository in your browser

  12. Log in as the user we just entered in the authentication step

  13. Click on Manage deposits


Note: Your item should now appear in your inbox

Appendix A: Can’t locate HTML/ error

  1. Change back to the EPrints user if root and go to their home directory

    cd ~
  2. Download HTML-Tree-3.23.tar.gz

  3. Untar the tar.gz file

    tar -xzf HTML-Tree-3.23.tar.gz
  4. Change to the lib directory

    cd HTML-Tree-3.23/lib
  5. Copy the HTML directory to EPrints perl lib

    cp -r HTML/ /opt/eprints3/perl_lib

Appendix B: Upgrading mod_perl

  • Note: the full error is

failed to resolve handler `EPrints::Sword::ServiceDocument': Bareword "Apache2::Const::DONE" not allowed while "strict subs" in use at /opt/eprints3/perl_lib/EPrints/Sword/ line 63.\nBareword "Apache2::Const::DONE" not allowed while "strict subs" in use at /opt/eprints3/perl_lib/EPrints/Sword/ line 85.\nBareword "Apache2::Const::DONE" not allowed while "strict subs" in use at /opt/eprints3/perl_lib/EPrints/Sword/ line 208.\nCompilation failed in require at (eval 1308) line 3.

This error is caused if the version of mod_perl the operating system is using is too old. To update carry out the following steps.

  1. Open the /etc/yum/repos.d/Centos-Base file for editing

    vi /etc/yum/repos.d/Centos-Base
  2. Change the enable value from 0 to 1 for the “centosplus” repository, below is an example of the file.

    #additional packages that extend functionality of existing packages
    name=CentOS-$releasever - Plus
  3. Change to root user and upgrade mod_perl

    yum upgrade mod_perl

One thought on “Procedure: Configure ICE to EPrints

  1. Pingback: DepoST revisited « Repository News

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s