Issue Upgrading from OJS 3.3 to OJS 3.4: Database Error with Duplicate Entry

Hello,

I am currently upgrading my Open Journal Systems (OJS) installation from version 3.3 to version 3.4 following the instructions provided in this forum link. However, I am encountering an error during the database upgrade process.

The error message I am receiving is as follows:

A database error has occurred: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘PKP\task\ReviewReminder’ for key ‘scheduled_tasks_pkey’ (SQL: UPDATE scheduled_tasks SET class_name = PKP\task\ReviewReminder WHERE class_name = lib.pkp.classes.task.ReviewReminder)

It seems like there is a duplicate entry issue related to the scheduled_tasks table. I’m not sure how to resolve this problem or what steps to take next.

Has anyone else encountered this issue during their upgrade process? Any guidance or suggestions on how to fix this would be greatly appreciated.

Thank you!

Could you please check your database? Specifically, look at the scheduled_tasks table and see if there are any entries in the last_run column with the value “0000-00-00 00:00:00”. If so, I recommend updating these entries with valid dates. After making these changes, try running the update again.

Also, make sure to back up your database before making any changes or running the update.

Thank you for the suggestion. But the last_run_column has been recorded with the required date as you can see below the screenshot.

Could you suggest any other method or guidance to solve this problem?

Thank you!

Are there NULL values in the review_round_id column in the review_assignments table?

No all the records in the review_round_id column has value in the review_assignments table. Please see the attachment below.

image

I am having this exact problem. Did you resolve it and if so how?
Br/Fredrik

I also have the same problem. Has anyone solved it?
Thanks
Fulvio

I also have this same issue. I’ve searched the forum, yet to get a solution. Will be restoring to 3-3-0-14 and try again in another week.

If anyone has some insight and/or a solution to this please post.

Hi all,

Can you confirm before running the upgrade script that there is no result for the following SQL query?

SELECT * FROM scheduled_tasks WHERE class_name='PKP\\task\\ReviewReminder';

If you do get a result for that query, I wonder if this is due to an incorrect database restore after another failed upgrade attempt. If an upgrade fails, you need to completely restore your OJS from backup before trying again.

Regards,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 9 days. New replies are no longer allowed.