Error persisting business object

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Error persisting business object

Post by ACDC »

I am getting this error all of a sudden:

"Error persisting business object Customer Duplicate entry '4853' for key 1"

Does anyone have an idea why this would occur and how to resolve it

Thank You
pbrad
Posts: 781
Joined: Mon Jul 17, 2006 11:03 pm
Location: Ontario, Canada

Post by pbrad »

Hi,

Sounds like you have a duplicate entry for the primary key (ID) field in the Customers table. Can you access the database directly with something like phpmyadmin, RazorSQL or Navicat and duplicate the duplicate entry?

Pete
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Post by ACDC »

Hi

I am a bit confused as to how a primary key can be duplicated. Is the Aware system generating the ID key or is it a database function ?

When I look at the table, I don't see any duplications in the Primary Key, but I suspect, when adding a new Customer, the primary key the system tries to create already exists. Hows that possible

Also, something strange with the primary key numbering , The most recent IDs are in the 7850 range, then all of a sudden it drops down to 3 digit ID numbers , could that be an indicator that something funny is happening ?

This is new territory for me ! maybe support could comment on this

I am using MYSQL 5.0 and the state of the DB is fine, and no error logs
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

What you are saying is correct - there is no way Aware IM would create a duplicate primary key (unless, of course, there is some bug, but I have never heard of this particular problem before).

Maybe it is related to indexing rather than primary keys - are you using indexes anywhere in your application?
Aware IM Support Team
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Post by ACDC »

No, I am using no indexing at all.

This problem suddenly appeared out of nowhere.

It exists in a live published application which has been behaving well for it least 2 months - very confusing. I have done just about everything I can think of to try and resolve it .
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

This error is generated by the database, not by Aware IM, so it is possible that the problem has nothing to do with Aware IM. If you Google on "Duplicate entry '4853' for key 1" you will find quite a few posts about this problem - some of them suggest database corruption. Please have a look there - you may find your solution.
Aware IM Support Team
Post Reply