Importing EAD xml gives 500 | Internal Server Error | Exception Unknown schema or import format: ""

94 views
Skip to first unread message

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 4:00:03 AM10/29/15
to ICA-AtoM Users
Dear AtoM group,

I am currently trying out AtoM installed on my local Ubuntu 14.04 laptop having followed installation instructions to the letter. I work at a government archive in Sweden, and we are exploring replacing our current archival description software with AtoM.

When I try to import a EAD xml-file exported from our current archival description software Visual Arkiv (please find it attached - there is nothing confidential in it) I get the  error message (with debug mode enabled) pasted below. I have validated the xml with w3c's validator, with no problems.

500 | Internal Server Error | Exception

Unknown schema or import format: ""


stack trace

  • at ()
    in SF_ROOT_DIR/lib/QubitXmlImport.class.php line 171 ...
      1.       // error condition, unknown schema or no import filter
      2.       $errorMsg sfContext::getInstance()->i18n->__('Unknown schema or import format: "%format%"', array('%format%' => $importSchema));

      3.       throw new Exception($errorMsg);
      4.     }

      5.     $this->schemaMap sfYaml::load($importMap);
  • at QubitXmlImport->import('/tmp/phpT7UCsP', array('strictXmlParsing' => ))
    in SF_ROOT_DIR/apps/qubit/modules/object/actions/importAction.class.php line 130 ...
  • at ObjectImportAction->execute(object('sfWebRequest'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 92 ...
  • at sfExecutionFilter->executeAction(object('ObjectImportAction'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 78 ...
  • at sfExecutionFilter->handleAction(object('sfFilterChain'), object('ObjectImportAction'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfExecutionFilter.class.php line 42 ...
  • at sfExecutionFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitLimitResults.class.php line 34 ...
  • at QubitLimitResults->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitMeta.class.php line 29 ...
  • at QubitMeta->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitSslRequirementFilter.class.php line 35 ...
  • at QubitSslRequirementFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitLimitIp.class.php line 39 ...
  • at QubitLimitIpFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitSettingsFilter.class.php line 43 ...
  • at QubitSettingsFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfBasicSecurityFilter.class.php line 72 ...
  • at sfBasicSecurityFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfRenderingFilter.class.php line 33 ...
  • at sfRenderingFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/plugins/sfHistoryPlugin/lib/sfHistoryPluginFilter.class.php line 18 ...
  • at sfHistoryPluginFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/lib/filter/QubitTransactionFilter.class.php line 40 ...
  • at QubitTransactionFilter->execute(object('sfFilterChain'))
    in SF_ROOT_DIR/vendor/symfony/lib/filter/sfFilterChain.class.php line 53 ...
  • at sfFilterChain->execute()
    in SF_ROOT_DIR/vendor/symfony/lib/controller/sfController.class.php line 238 ...
  • at sfController->forward('object', 'import')
    in SF_ROOT_DIR/vendor/symfony/lib/controller/sfFrontWebController.class.php line 48 ...
  • at sfFrontWebController->dispatch()
    in SF_ROOT_DIR/vendor/symfony/lib/util/sfContext.class.php line 170 ...
  • at sfContext->dispatch()
    in SF_ROOT_DIR/qubit_dev.php line 21 ...

symfony settings ...

request ...

response ...

user ...

global vars ...

symfony v.1.4.20 - php 5.5.9-1ubuntu4.13

Thanks!

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 4:01:56 AM10/29/15
to ICA-AtoM Users, simon.alfr...@gmail.com
Sorry, forgot to attach file!
EAD_M072_20151029_08-29-59.xml

Andreas Nef

unread,
Oct 29, 2015, 5:16:18 AM10/29/15
to ica-ato...@googlegroups.com
Hi Simon

I think you have to refer to the EAD.dtd rather than a proprietary XSD:
<!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival Description (EAD) Version 2002)//EN" "http://lcweb2.loc.gov/xmlcommon/dtds/ead2002/ead.dtd">
Best,

Andreas


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/850a630d-651f-4415-a562-010b1808dabe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 5:23:54 AM10/29/15
to ICA-AtoM Users
Hi Andreas,

I see. I tried replacing the line in my file mentioning XSD (ead grp) with the one you supplied, was that the right thing to do? It says the import was completed, but I get this error now anyhow, and now button to view archival description:

Warnings were encountered:

libxml error 5 on line 19 in input file: Extra content at the end of the document
libxml error 5 on line 19 in input file: Extra content at the end of the document
libxml error 531 on line 4 in input file: root and DTD name do not match 'eadheader' and 'ead'

Andreas Nef

unread,
Oct 29, 2015, 5:58:22 AM10/29/15
to ica-ato...@googlegroups.com
Hi again

I think you have to modify your EAD so that it validates for the generic DTD that AtoM supports and that is referenced by the before mentioned DOCTYPE declaration. I just did a quick check and it seems that the <eadgrp> does not work in this context. You would have to split your example into separate EAD files, each having the <ead> element as root element (see the example attached).

Kind regards,

Andreas

EAD_M072_20151029_08-29-59-2_part2.xml

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 6:17:56 AM10/29/15
to ICA-AtoM Users
Hi,

Thanks, I tried importing the one you supplied me with, and it imports without trouble! I will try to split up the file like you suggested. Thanks alot for your help!

Simon

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 9:40:10 AM10/29/15
to ICA-AtoM Users, simon.alfr...@gmail.com
Hello again, I have now written a perl script to split the files and add the xml version tag and the dtd tag to each resulting file. Each one can then be imported into AtoM. I'll post it below for the benefit of anyone else who would like to export from Visual Arkiv to AtoM:


#!/usr/bin/perl
print "\n\n## Välkommen till VisualArkiv-till-AtoM-EADxml-manglaren v.1.0 ##\n\n Välj xml-fil att splitta: "; ## här stoppar man in xmlfilen som genererats av Visual, och sen chompar etc.

$file
=<>; #Läs in filnamn, välj alltså xml-filen du genererat i Visual Arkiv 6.2 genom att "exportera till EAD (ARKIS)"

print "\n\n Du valde $file";
chomp $file
;

open
(FI,$file) or die "Kunde ej öppna input-filen";

$cur
=0; # För att räkna output-filerna

open
(FO,">$file" . "-part.$cur.xml") or die;    # Öppna första output-filen och döp den efter input

while(<FI>)                                        # Loopa igenom varje linje i inputfilen
{
   
print FO $_;        ## skriver till output den innevarande linjen
   
if(/^\s*<\/ead>/)     ## loopar tills den stöter på </ead>, då ska den stänga och börja ny fil
   
{
        close
(FO);
        $cur
++;
        open
(FO,">$file" . "-part.$cur.xml") or die; ## öppnar här ny fil för nästa iteration av loopen
       
## nedan lägger jag till doctypen till varje output-fil, förutom den första (eftersom den öppnas utanför loopen)
       
print FO '<?xml version="1.0" encoding="iso-8859-1"?>'. "\n" .'<!DOCTYPE ead PUBLIC "+//ISBN 1-931666-00-8//DTD ead.dtd (Encoded Archival Description (EAD) Version 2002)//EN" "http://lcweb2.loc.gov/xmlcommon/dtds/ead2002/ead.dtd">'. "\n";
       
print "Genererat $file" . "-part.$cur.xml\n";
       
   
}
}
print "$cur filer har skapats.\n\n";
close
(FO);

simon.alfr...@gmail.com

unread,
Oct 29, 2015, 9:42:00 AM10/29/15
to ICA-AtoM Users, simon.alfr...@gmail.com
Oh, I intended to ask one more question, is there a way to import many EAD xml-files at once into AtoM?

Thanks,
Simon

Dan Gillean

unread,
Oct 29, 2015, 12:21:36 PM10/29/15
to ICA-AtoM Users
Hi Simon,

If you have access to the command line, you can perform bulk imports and exports of EAD files from there. For import, see:

Let us know if you have further questions!

Regards,


Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages