OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



DB Error: Duplicate entry '' for key 3

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

DB Error: Duplicate entry '' for key 3

Postby tlove » Thu Apr 23, 2009 12:32 am

Hello,
I'm trying to upload a hundred users using the import xml file and I'm getting the error
"DB Error: Duplicate entry '' for key 3"

I've tried to follow the existing sample.xml file
First rows of my xml file are:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE users SYSTEM "users.dtd">

<!--
* sample.xml
*
* Copyright (c) 2000-2008 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Sample user import data.
*
* $Id: sample.xml,v 1.2 2008/03/07 21:39:22 asmecher Exp $
-->

<users>
<user>
<username>jsmith@abc.com.au</username >
<password>gNGxglps12</password >
<salutation></salutation >
<first_name></first_name >
<last_name></last_name >
<gender></gender >
<affiliation></affiliation >
<email>jsmith@abc.com.au</email >
<country></country >
<biography locale="de_DE"></biography>
<biography locale="en_US"></biography>
<biography locale="es_ES"></biography>
<role type="presenter"/>
</user>
I welcome any advice.
Best regards,
Terry
tlove
 
Posts: 30
Joined: Mon Oct 01, 2007 8:47 am
Location: Australia

Re: DB Error: Duplicate entry '' for key 3

Postby jmacgreg » Thu Apr 23, 2009 4:00 pm

Hi Terry,

IIRC, the supplied sample XML files haven't been given a thorough vetting for a while, and they may be slightly out of date; in any case, they don't necessarily apply to any one journal's configuration. I haven't seen the kind of error you are encountering with the users XML import plugin; to narrow possible problems, I would recommend the following:

- review http://pkp.sfu.ca/wiki/index.php/Import ... ML_Plugin;
- start with a subset of the 100 users as a test-case, say 5 or 10 in one XML file;
- pare the import file down to the essentials (for example, don't include biography elements if you don't have biographical information for the users);
- check that your import file validates;
- report back with problems if you still hit them.

If you still encounter problems, I'm happy to review a sample of the XML file. You can either post part here (obfuscated emails/usernames, of course) or PM me with more details.

Cheers,
James
jmacgreg
 
Posts: 4191
Joined: Tue Feb 14, 2006 10:50 am

Re: DB Error: Duplicate entry '' for key 3

Postby systemsconsciousness » Sat Oct 17, 2009 6:38 pm

are you saying this problem is being caused by improperly formed xml or an invalid character? maybe someone could help... i keep getting the error "DB Error: Duplicate entry '' for key 3" when trying to import reviewers. i need to migrate more than 10k records. the most i could get to work at a time was about 75 before getting this error. oh and i've validated my xml and have used the import tool successfully with chunks of this dataset at a time... yet i can't find anything specifically wrong with my text... could blank xml <fields></fields> do this?

any idea?

cheers,
dean
systemsconsciousness
 
Posts: 1
Joined: Sat Oct 17, 2009 6:31 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests