OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



DB Error: Duplicate entry '45' for key 2

Open Harvester Systems support questions and answers, bug reports, and development issues.

Moderators: jmacgreg, michael, John

Forum rules
Developer Resources:

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome.

DB Error: Duplicate entry '45' for key 2

Postby esperr » Tue Jun 13, 2006 12:12 pm

I'm getting a consistent "DB Error: Duplicate entry '[something]' for key 2" error when I try to update the metadata for a new installation of PKP Harvester2. The first archive added updates fine, but any subsequent attempts crap out with the error above. I'm running PHP4 (couldn't get Harvester2 to run under PHP5 at all).

Anything like this turn up in testing? Something I can do on this end?
esperr
 
Posts: 2
Joined: Tue Jun 13, 2006 11:38 am

Postby asmecher » Tue Jun 13, 2006 12:27 pm

Hi esperr,

Harvester2 should run on PHP 5.x without issue; could you send specifics of the problems you are having?

I suspect the indexing problem you're having is due to your DBMS not being UTF-8 capable. If you have MySQL >= 4.1.1, try enabling the connection_charset and database_charset options in Harvester2's config.inc.php configuration file. This should correct the problem. (You can re-generate the search index afterward using the tools/rebuildSearchIndex.php tool.)

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm

Postby esperr » Wed Jun 14, 2006 7:30 am

Alec --

Under PHP4, I blew away the existing directory (and database) and reinstalled from scratch.

I have set in my config.inc.php:
client_charset = utf-8
connection_charset = utf8
database_charset = utf8
Default charset for the server is utf-8, and I've also gone into phpmyadmin and verified that the Collations for each table are “utf8_general_ci”

I set up two archives in my new install and then harvested both. So far so good. But when I set up a *third* archive and try to crawl that one, I get “DB Error: Duplicate entry '' for key 2”

____________________


Retried installing under PHP5 on another machine (PHP Version 5.1.2 & mysql 4.18-nt) and got at the top of each page:

Warning: opendir(plugins\postprocessors) [function.opendir]: failed to open dir: Invalid argument in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 73

Warning: readdir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 74

Warning: closedir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 88

Warning: opendir(plugins\postprocessors) [function.opendir]: failed to open dir: Invalid argument in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 73

Warning: readdir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 74

Warning: closedir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 88

Warning: opendir(plugins\postprocessors) [function.opendir]: failed to open dir: Invalid argument in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 73

Warning: readdir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 74

Warning: closedir(): supplied argument is not a valid Directory resource in C:\webapps\harvester2\classes\plugins\PluginRegistry.inc.php on line 88


Thanks!

Ed
esperr
 
Posts: 2
Joined: Tue Jun 13, 2006 11:38 am

Postby asmecher » Wed Jun 14, 2006 1:37 pm

Hi Ed,

You can generate more debugging output by turning on the "show_stacktrace" option in the Harvester's config.inc.php file; could you do so and mail the output to me personally (removing anything you deem to be private)?

Additionally, I can debug the duplicate entry error if you send me the OAI URLs for the archives you're harvesting.

OTOH, the error messages you're experiencing with PHP 5.x may be caused by an archive extractor (e.g. Winzip) omitting empty directories in the Harvester archive. I can give you more information with the debug output, but in the meantime, please ensure that the directory plugins/postprocessors exists in the Harvester2 root.

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8315
Joined: Wed Aug 10, 2005 12:56 pm


Return to Open Harvester Systems Support and Development

Who is online

Users browsing this forum: No registered users and 1 guest