Cannot add new mappings after upgrade

After doing an upgrade from 3.2.2 to 3.3.1, everything works correctly with the asterisk-im plugin with the configurations/mappings that were there before the upgrade, but I cannot add new mappings. If I got through the process of adding a new mapping for an existing user in the web interface, I see nothing has been added to the list immediately after hitting the save button, even thour it say ‘‘Operation Completed Successfully’’.

Here is a message I see in the Error log when I do this.

2007.06.25 08:22:59 org.jivesoftware.phone.database.DbPhoneDAO.insert(DbPhoneDAO.java:311) Duplicate entry ‘‘19’’ for key 1

java.sql.SQLException: Duplicate entry ‘‘19’’ for key 1

For now I have been adding new mappings directly to the phoneuser and phonedevice tables. Once I do that it works fine.

It looks like the java code that generates the sql isn’‘t finding an unused primary key (or it’'s just guessing at one) to assign to the new entry and instead of trying an unused number, it just errors out. My questions are: How does the java code for inserting new mappings iterate through the existing mappings to add an unused number? Will it eventually find an unused one and start accepting new mappings?

Upgraded from:

Wildfire 3.2.2

Asterisk IM 1.2.2

CentOS 4.4

MySQL 5

to:

Wildfire 3.2.4

to:

Openfire 3.3.1

Asterisk IM 1.3.0-Beta

Message was edited by: warmbowski (changed ‘‘Openfire 3.2.4’’ to ‘‘Wildfire 3.2.4’’)

It seems you have messed with the internal id management by adding new rows manually.

You can update the values for id in jiveID (the idTypes used by Asterisk-IM are 100 for devices and 101 for servers) and set them to a value higher than the highest id you’'ve used.

Hope that helps,

Stefan

That did the trick Stefan. Thanks.

I would argue that for some reason the index number in jiveID was reset or made lower during the upgrade process, as I never added mappings manually until this came up. And even at that, I only manually added 2 mappings this way.

Again though, thanks for the super-quick reply.

If you encounter that problem again or can reproduce it report back and I’'ll open a bug.