Error importing MODS XML

roberto
2012-01-03
2013-05-28
  • roberto
    roberto
    2012-01-03

    Hi all
    there is something wrong with my import from MODS XML format. After some attempts executed with the data I prepared, I always get the following error:

    There were validation errors regarding the data you entered:

    I thought it was related with some troubles in writing my XML file, and I tryed following:
    I exported one of the record actually present in my working Refbase installation,  I deleted the record, while executing the import the same error appear.
    Here the XML file I tryed to import:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <modsCollection xmlns="http://www.loc.gov/mods/v3">
        <mods ID="Aberle+Witte2003">
            <titleInfo>
                <title>Deep-sea macrofauna exposed to a simulated sedimentation event in the abyssal NE Atlantic: _in situ_ pulse-chase experiments using [super:13]C-labelled phytodetritus</title>
            </titleInfo>
            <name type="personal">
                <namePart type="family">Aberle</namePart>
                <namePart type="given">N</namePart>
                <role>
                    <roleTerm authority="marcrelator" type="text">author</roleTerm>
                </role>
            </name>
            <name type="personal">
                <namePart type="family">Witte</namePart>
                <namePart type="given">U</namePart>
                <role>
                    <roleTerm authority="marcrelator" type="text">author</roleTerm>
                </role>
            </name>
            <originInfo>
                <dateIssued>2003</dateIssued>
            </originInfo>
            <language>English</language>
            <abstract lang="English">Tracer experiments with  ....  results from our study site in the abyssal plain, we thus propose pronounced differences in feeding strategies between macrofauna communities from continental margins and abyssal plains.</abstract>
            <subject>
                <topic>Deep-sea</topic>
            </subject>
            <subject>
                <topic>Pulse-chase experiment</topic>
            </subject>
            <subject>
                <topic>[delta][super:13]C</topic>
            </subject>
            <subject>
                <topic>Benthic carbon remineralisation</topic>
            </subject>
            <subject>
                <topic>Macrofauna</topic>
            </subject>
            <subject>
                <topic>Porcupine Abyssal Plain</topic>
            </subject>
            <typeOfResource>text</typeOfResource>
            <location>
                <url>http://www.int-res.com/abstracts/meps/v251/p37-47/</url>
            </location>
            <identifier type="uri">http://www.int-res.com/abstracts/meps/v251/p37-47/</identifier>
            <identifier type="citekey">Aberle+Witte2003</identifier>
            <identifier type="local">IPÖ @ alorenz @ alphabetical order</identifier>
            <identifier type="local">IPÖ @ msteffens @ 706</identifier>
        </mods>
    </modsCollection>
    

    could please someone help me?
    best regards.
    RM

     
  • Hi robmor,

    I'm currently travelling, so I cannot fully test this. However, I tried to import the MODS data you've given at the refbase demo database (http://demo.refbase.net). There the import works more or less fine, i.e. the data gets loaded into the refbase Edit form without any error.

    Please check that your Bibutils installation has been setup correctly with refbase. Refbase requires Bibutils for MODS import. If you can export and import BibTeX data correctly, your Bibutils installation should be fine.

    HTH, Matthias

     
  • roberto
    roberto
    2012-01-05

    Hi Matthias
    thank you for your quick response, I have done following :
    in my remote temporary installation of Refbase I've executed the right installation of Bibutils, as you mentioned (see: http://www.refbase.net/index.php/Bibutils, enable Bibutils support for an existing refbase installation) and the problem remains the same.
    Locally instead, after having updated my Mac from Snow Leopard to Lion, the error message is the following:
    'you cannot open xml2ris because PowerPC applications are no longer supported' ….
    I'm stuck….
    Best regards
    RM

     
  • roberto
    roberto
    2012-01-10

    Hi I'm still stuck. I've tried to execute the whole Refbase setup once again (on remote server) but there must always be a problem with Bibutils.
    Because of security reasons I have to perform the manual installation. The complete procedure works fine; when I perform SQL operations

    UPDATE depends SET depends_path = "/path/to/bibutils/" WHERE depends_external = "bibutils";
    

    returns result ' 1 row affected….', lastly everything should be working.
    When I try to import my MODS XML file the system always warns me 'There were validation errors regarding the data you entered' and stops execution of import.
    The file is correct, if I try to import it into your online demo installation, the operation terminates successfully.
    Do you have any suggestions?
    best regards
    RM

     
  • Hi robmor,

    which version of Bibutils are you using?  If you're currently using Bibutils v4.x, please try Bibutils 3.4 which is still available here:

    http://bibutils.refbase.org/

    Does this make for any difference?

    Also, may I ask you to post the current contents of your refbase table 'depends', i.e. issue this MySQL command:

    SELECT * FROM depends;

    from within your MySQL command line interpreter, or a web-based MySQL tool such as phpMyAdmin. If you don't want to post the actual paths, feel free to send them offline.

    And what about your PHP 'safe_mode' setting? Is it set to ON? If so, make sure that Bibutils has been installed in the directory specified in the PHP 'safe_mode_exec_dir' directive.

    And are you running refbase on your own server, or are you using a hosted server account?

    The latter usually has consequences for the PHP temp/session directory. On a hosted server account, it is often necessary to specify the absolute path to the PHP temp/session directory (that's been given to you by your ISP) in variable '$sessionTempDir' in file 'initialize/ini.inc.php'.

    If you're running refbase on your own server instead, you could login on the server's shell and try to execute Bibutils manually (on the shell). Does it execute normally? When converting a file on the shell, do you get correct output? Also try, reading & writing from the PHP temp/session directory. Does this work as well?

    You might also want to search the refbase forums for similar topics, e.g. see this thread:

    https://sourceforge.net/projects/refbase/forums/forum/218758/topic/3562872

    HTH, Matthias

     
  • roberto
    roberto
    2012-01-11

    Hi I have 3 different installations.
    1) local on a MAC, after update to LION version is dead
    2) Online on a hosted server account
    2.1)about PHP 'safe_mode' setting here I have no idea
    2.2) to specify the absolute path to the PHP temp/session directory: I think I will never discover this value….
    Structure

    Field
    Type
    Null
    Predefined

    depends_id
    mediumint(8)
    Yes
    NULL

    depends_external
    varchar(100)
    Yes
    NULL

    depends_enabled
    enum('true', 'false')
    Yes
    true

    depends_path
    varchar(255)
    Yes
    NULL

    Dump

    depends_id
    depends_external
    depends_enabled
    depends_path
    1
    refbase
    true
    NULL
    2
    bibutils
    true
    /bibutils/
    3
    pdftotext
    true
    NULL

    3)Local on Windows Vista
    about PHP 'safe_mode' setting here is OK
    Structure

    Field
    Type
    Null
    Predefined

    depends_id
    mediumint(8)
    No

    depends_external
    varchar(100)
    Yes
    NULL

    depends_enabled
    enum('true', 'false')
    No
    true

    depends_path
    varchar(255)
    Yes
    NULL

    Dump

    depends_id
    depends_external
    depends_enabled
    depends_path
    1
    refbase
    true
    NULL
    2
    bibutils
    true
    bibutils\
    3
    pdftotext
    true
    NULL

    When you say

    "to execute Bibutils manually (on the shell). Does it execute normally"

    I tryed to execute

    bib2xml BibTeX_file.bib > output_file.xml

    but system says that bib2xml s not recognized as a command, in last version it seems not to be present ?
    I've executed it locally in 3.4 version and the answer is: 'Processed'

    I've substituted bibutils version, by simply swapping folders on Refbase installation path but result is unchanged

    Lastly what does it mean:

    reading & writing from the PHP temp/session directory

    best regards

     
  • roberto
    roberto
    2012-01-11

    sorry for the awful formatting, I've tested it before in an HTML page and everything was allright, maybe BBCode does not supoprt tables….
    here in HTML

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html>
            <head>
    
            </head>
            <body>
                <div id="container">
        <p>
        2) Online on a hosted server account <br />
        Structure
        <table>
        <tr><th>Field</th>
        <th>Type</th>
        <th>Null</th>
        <th>Predefined</th></tr>
        <tr><td>depends_id</td>
        <td>mediumint(8) </td>
        <td>Yes</td>
        <td>NULL</td></tr>
        <tr><td>depends_external</td>
        <td>varchar(100)</td>
        <td>Yes</td>
        <td>NULL</td></tr>
        <tr><td>depends_enabled</td>
        <td>enum('true', 'false')</td>
        <td>Yes</td>
        <td>true</td></tr>
        <tr><td>depends_path</td>
        <td>varchar(255)</td>
        <td>Yes</td>
        <td>NULL</td></tr>
        </table>
        Dump 
        <table>
        <tr><th>depends_id</th>
        <th>depends_external</th>
        <th>depends_enabled</th>
        <th>depends_path</th></tr>
        <tr><td>1</td>
        <td>refbase</td>
        <td>true</td>
        <td>NULL</td></tr>
        <tr><td>2</td>
        <td>bibutils</td>
        <td>true</td>
        <td>/bibutils/</td></tr>
        <tr><td>3</td>
        <td>pdftotext</td>
        <td>true</td>
        <td>NULL</td></tr>
        </table>
        3)Local on Windows Vista <br />
        Structure
        <table>
        <tr><th>Field</th>
        <th>Type</th>
        <th>Null</th>
        <th>Predefined</th></tr>
        <tr><td>depends_id</td>
        <td>mediumint(8) </td>
        <td>No</td>
        <td> </td></tr>
        <tr><td>depends_external</td>
        <td>varchar(100)</td>
        <td>Yes</td>
        <td>NULL</td></tr>
        <tr><td>depends_enabled</td>
        <td>enum('true', 'false')</td>
        <td>No</td>
        <td>true</td></tr>
        <tr><td>depends_path</td>
        <td>varchar(255)</td>
        <td>Yes</td>
        <td>NULL</td></tr>
        </table>
        Dump 
        <table>
        <tr><th>depends_id</th>
        <th>depends_external</th>
        <th>depends_enabled</th>
        <th>depends_path</th></tr>
        <tr><td>1</td>
        <td>refbase</td>
        <td>true</td>
        <td>NULL</td></tr>
        <tr><td>2</td>
        <td>bibutils</td>
        <td>true</td>
        <td>bibutils\</td></tr>
        <tr><td>3</td>
        <td>pdftotext</td>
        <td>true</td>
        <td>NULL</td></tr>
        </table>
        </p>
                </div>
            </body>
        </html>
    
     
  • 2.1)about PHP 'safe_mode' setting here I have no idea

    Check with phpinfo

    But note that you specify the absolute path to bibutils as '/bibutils/'  I doubt you have it installed there!  On my server, it is in /usr/local/bin/.

    to execute Bibutils manually (on the shell). Does it execute normally"" I tryed to execute "bib2xml BibTeX_file.bib > output_file.xml" but system says that bib2xml s not recognized as a command, in last version it seems not to be present ?

    You'll need to prefix it with the path & confirm it is executable.  If you can't execute it, chances are refbase won't be able to either.

    -Rick