[Kobv-opus-tester] Probleme bei der Migration

Dirk Oelkers d.oelkers at ostfalia.de
Fre Jan 28 13:38:11 MET 2011


Sehr geehrte Frau Thiede.

Vielen Dank für den Tip. Das hat geholfen.

Dafür habe ich neue Probleme gefunden. :-)


Problem 1 konnte ich duch Löschen des doppelten eintrages im XML Dumpo lösen.

University imported: Universität fuer Bildende Künste Braunschweig
PHP Fatal error:  Uncaught exception 'Opus_Model_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Universität fuer Bildende Künste Braunschweig' for key 'name' Model: Opus_DnbInstitute
Thrown in /u1/opus4/libs/ZendFramework-1.11.2-minimal/library/Zend/Db/Statement/Pdo.php:234' in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php:559
Stack trace:
#0 /u1/opus4/opus4/library/Opus/Model/AbstractDb.php(499): Opus_Model_AbstractDb->_storeInternalFields()
#1 /u1/opus4/opus4/import/importer/Opus3InstituteImport.php(125): Opus_Model_AbstractDb->store()
#2 /u1/opus4/opus4/import/importer/Opus3InstituteImport.php(58): Opus3InstituteImport->importUniversities(Object(DOMElement), Object(Opus_CollectionRole))
#3 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(121): Opus3InstituteImport->__construct(Object(DOMDocument))
#4 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(157): Opus3Migration_ICL->load_institutes()
#5 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(182): Opus3Migration_ICL->run()
# in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php on line 559


Problem 2 kann man durch das Eintragen von fake urns in das xmldump lösen.

z.B.
<field name="urn">urn:nbn:de:bsz:nn-opus-999</field>

Vielleicht könnte man das automatisieren, falls die Contstaints der DB das Feld erfordern.

Die frage ist nur, wie ich dann an korrekte urns rankomme.


63 root at opus_hbk_new1 opus4/scripts#./opus3-migration.sh -p /u1/opus3_2_data/volltexte -f /u1/opus3_2_data/opus3_2_dump_try2.xml
Clean workspace/files/* and workspace/log/import.log and workspace/tmp/* directory
Clean database
Dropping database: opus402
Creating database: opus402
Importing database schema file 'schema/opus400.sql'
Inserting file 'masterdata/000_insert_default_roles.sql'
Inserting file 'masterdata/001_insert_default_privileges.sql'
Inserting file 'masterdata/002_create_languages.sql'
Inserting file 'masterdata/004_create_user_accounts.sql'
Inserting file 'masterdata/010_create_collections_tables.sql'
Inserting file 'masterdata/011_create_collections_data.sql'
Inserting file 'masterdata/012_create_collections_constraints.sql'
Import institutes, collections and licenses
Collection imported: TEST
Collection imported: TEST1


University imported: Universität fuer Bildende Künste Braunschweig
Faculty imported: Hochschule für Bildende Künste (HBK)
Institute imported: Kunst
Institute imported: Kunst- und Medienwissenschaften
Institute imported: Design
Licence imported: publ-mit-pod
Licence imported: publ-ohne-pod
Licence imported: cc_by-nc-nd
Licence imported: cc_by

Import metadata and fulltext
2011-01-28 13:23:27 Successfully imported old ID 19 with new ID 1 -- memory 2416 (KB), peak memory 2551 (KB)
2011-01-28 13:23:27 Successfully imported old ID 12 with new ID 2 -- memory 8448 (KB), peak memory 9673 (KB)
2011-01-28 13:23:28 Successfully imported old ID 18 with new ID 3 -- memory 8695 (KB), peak memory 10095 (KB)
2011-01-28 13:23:28 Successfully imported old ID 13 with new ID 4 -- memory 8919 (KB), peak memory 10254 (KB)
2011-01-28 13:23:29 Successfully imported old ID 14 with new ID 5 -- memory 9113 (KB), peak memory 10314 (KB)
2011-01-28 13:23:29 Successfully imported old ID 15 with new ID 6 -- memory 9382 (KB), peak memory 10609 (KB)
2011-01-28 13:23:30 Successfully imported old ID 16 with new ID 7 -- memory 9574 (KB), peak memory 10748 (KB)
2011-01-28 13:23:30 Successfully imported old ID 17 with new ID 8 -- memory 9772 (KB), peak memory 11008 (KB)
2011-01-28 13:23:31 Successfully imported old ID 40 with new ID 9 -- memory 9983 (KB), peak memory 11263 (KB)
2011-01-28 13:23:31 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 41
2011-01-28 13:23:33 Successfully imported old ID 42 with new ID 11 -- memory 10253 (KB), peak memory 11392 (KB)
2011-01-28 13:23:34 Successfully imported old ID 44 with new ID 12 -- memory 10496 (KB), peak memory 12037 (KB)
2011-01-28 13:23:34 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 45
2011-01-28 13:23:34 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 46
2011-01-28 13:23:34 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 47
2011-01-28 13:23:34 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 48
2011-01-28 13:23:34 ERROR: Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93 for old ID 49
2011-01-28 13:23:35 Successfully imported old ID 50 with new ID 18 -- memory 11033 (KB), peak memory 12295 (KB)
2011-01-28 13:23:35 Successfully imported old ID 51 with new ID 19 -- memory 11397 (KB), peak memory 12902 (KB)
2011-01-28 13:23:36 Successfully imported old ID 62 with new ID 20 -- memory 11638 (KB), peak memory 13143 (KB)
2011-01-28 13:23:36 Successfully imported old ID 63 with new ID 21 -- memory 11821 (KB), peak memory 13143 (KB)
2011-01-28 13:23:37 Successfully imported old ID 70 with new ID 22 -- memory 11990 (KB), peak memory 13163 (KB)
PHP Fatal error:  Uncaught exception 'Opus_Model_Exception' with message 'Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93' in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php:607
Stack trace:
#0 /u1/opus4/opus4/library/Opus/Model/AbstractDb.php(501): Opus_Model_AbstractDb->_storeExternalFields()
#1 /u1/opus4/opus4/import/importer/Opus3FileImport.php(179): Opus_Model_AbstractDb->store()
#2 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(159): Opus3FileImport->loadFiles('1')
#3 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(197): Opus3Migration_Documents->load_fulltext()
#4 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(220): Opus3Migration_Documents->run()
#5 {main}
   thrown in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php on line 607

Fatal error: Uncaught exception 'Opus_Model_Exception' with message 'Used invalid namespace identifier. See RFC 2141. Model: Opus_Document Field: IdentifierUrn.
Thrown in /u1/opus4/opus4/library/Opus/Identifier/Urn.php:93' in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php:607
Stack trace:
#0 /u1/opus4/opus4/library/Opus/Model/AbstractDb.php(501): Opus_Model_AbstractDb->_storeExternalFields()
#1 /u1/opus4/opus4/import/importer/Opus3FileImport.php(179): Opus_Model_AbstractDb->store()
#2 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(159): Opus3FileImport->loadFiles('1')
#3 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(197): Opus3Migration_Documents->load_fulltext()
#4 /u1/opus4/opus4/scripts/Opus3Migration_Documents.php(220): Opus3Migration_Documents->run()
#5 {main}
   thrown in /u1/opus4/opus4/library/Opus/Model/AbstractDb.php on line 607
2011-01-28 13:23:37 Start indexing of 16 documents.
2011-01-28 13:23:38 Stats after 10 documents -- memory 7 MB, peak memory 7 (MB), 17.17 docs/second, 0.06 seconds/doc

2011-01-28 13:23:38 Finished indexing.

Operation completed successfully in 0 seconds.




Mit besten Gruessen

Dirk Oelkers

Ostfalia Hochschule für angewandte Wissenschaften
- Fachhochschule Braunschweig/Wolfenbuettel -
Rechenzentrum
Salzdahlumer Str. 46/48
38302 Wolfenbuettel
Tel    : +49 5331 939 19240
Fax    : +49 5331 939 19004
E-Mail : d.oelkers at ostfalia.de
URL    : http://www.ostfalia.de/rz
-----
Center of Excellence for Sun Java Enterprise System
-----

On 01/27/11 10:05 AM, Doreen Thiede wrote:
> Sehr geehrter Herr Oelkers,
>
> dieser Fehler tritt auf, wenn in einer OPUS 3.x-Instanz keine Collections (in der OPUS 3.2-Tabelle collections) angelegt wurden. Es handelt sich um einen Bug, der im nächsten Bugfix-Release 4.0.3 behoben wird.
>
> Ein schneller Workaround wäre einfach testweise eine Collection in OPUS 3.2 anzulegen und diese nach der Migration wieder zu löschen.
>
> Beste Grüße,
> Doreen Thiede
> OPUS4-Entwicklerteam
>
> Am 26.01.2011 18:52, schrieb Dirk Oelkers:
>> Sehr geehrte Damen und Herren.
>>
>> Ich versuche seit einiger Zeit die Opus Installation der Hochschule für
>> bildende Künste zu migrieren.
>>
>> Ich habe mich von der Version 2.0 bis zur Version 3.2 vorgekämpft.
>>
>> Nun komme ich nicht mehr weiter.
>>
>> Wenn ich nun die Migration auf 4.0.2 versuche, bekomme ich die folgende
>> Fehlermeldung:
>>
>> Hat vielleicht jemand bei Ihnen eine Idee, woran das liegen könnte ?
>>
>> root at opus_hbk_new1 opus4/scripts#./opus3-migration.sh -f
>> /u1/opus3_2_data/opus3_2_dump.xml -p /u1/opus3_2_data/volltexte
>> Clean workspace/files/* and workspace/log/import.log and workspace/tmp/*
>> directory
>> Clean database
>> Dropping database: opus402
>> Creating database: opus402
>> Importing database schema file 'schema/opus400.sql'
>> Inserting file 'masterdata/000_insert_default_roles.sql'
>> Inserting file 'masterdata/001_insert_default_privileges.sql'
>> Inserting file 'masterdata/002_create_languages.sql'
>> Inserting file 'masterdata/004_create_user_accounts.sql'
>> Inserting file 'masterdata/010_create_collections_tables.sql'
>> Inserting file 'masterdata/011_create_collections_data.sql'
>> Inserting file 'masterdata/012_create_collections_constraints.sql'
>> Import institutes, collections and licenses
>> PHP Fatal error: Uncaught exception 'Exception' with message 'ERROR:
>> Sorted collections empty.' in
>> /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php:116
>> Stack trace:
>> #0 /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php(51):
>> Opus3CollectionsImport->importCollectionsDirectly(Object(DOMElement),
>> Object(Opus_CollectionRole))
>> #1 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(116):
>> Opus3CollectionsImport->__construct(Object(DOMDocument))
>> #2 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(154):
>> Opus3Migration_ICL->load_collections()
>> #3 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(182):
>> Opus3Migration_ICL->run()
>> #4 {main}
>> thrown in /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php on
>> line 116
>>
>> Fatal error: Uncaught exception 'Exception' with message 'ERROR: Sorted
>> collections empty.' in
>> /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php:116
>> Stack trace:
>> #0 /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php(51):
>> Opus3CollectionsImport->importCollectionsDirectly(Object(DOMElement),
>> Object(Opus_CollectionRole))
>> #1 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(116):
>> Opus3CollectionsImport->__construct(Object(DOMDocument))
>> #2 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(154):
>> Opus3Migration_ICL->load_collections()
>> #3 /u1/opus4/opus4/scripts/Opus3Migration_ICL.php(182):
>> Opus3Migration_ICL->run()
>> #4 {main}
>> thrown in /u1/opus4/opus4/import/importer/Opus3CollectionsImport.php on
>> line 116
>> Import metadata and fulltext
>> PHP Warning: file(../workspace/tmp/grantor.map): failed to open stream:
>> No such file or directory in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 341
>>
>> Warning: file(../workspace/tmp/grantor.map): failed to open stream: No
>> such file or directory in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 341
>> PHP Warning: Invalid argument supplied for foreach() in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 343
>>
>> Warning: Invalid argument supplied for foreach() in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 343
>> PHP Warning: file(../workspace/tmp/institute.map): failed to open
>> stream: No such file or directory in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 341
>>
>> Warning: file(../workspace/tmp/institute.map): failed to open stream: No
>> such file or directory in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 341
>> PHP Warning: Invalid argument supplied for foreach() in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 343
>>
>> Warning: Invalid argument supplied for foreach() in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 343
>> 2011-01-26 18:06:01 ERROR: No Opus_Db_DocumentLicences with id 1 in
>> database. for old ID 19
>> PHP Warning: file(../workspace/tmp/grantor.map): failed to open stream:
>> No such file or directory in
>> /u1/opus4/opus4/import/importer/Opus3XMLImport.php on line 341
>>
>>
>>
>
>