WebShop/UnderDevelopment/OfBiz/VersionUpgrade

This page is for ofbiz developers and users

Upgrading the OfBiz? code

We use

Ofbiz version in use is tag 3.2.0

That means


Inventory Problems Solved - fixed now.

I finally took the time to subscribe to their list. I made a [ report] and sent them the relevant exported XML records. Guess what: it was fixed within an hour ! No comments.

The rest is history

After serious problems we decided to drop all the inventory records.

Probably semantics changed somewhat.

Currently all the (newly entered) variances can be listed, but

To prevent incompatibilities while importing data I excluded these:


Previous attempt to import inventory - note that we don't care about loosing inventory data any more. We just want to use ofbiz and enter inventory from ground up. But other important data should not be lost (Visits and other secondary entities are also not important to migrate).

For future, I would still care what would be the proper way to upgrade with keeping Inventory data.

Examine if this entity XML OK, or a different format is needed for recent ofbiz:

    <InventoryItem inventoryItemId="10018" inventoryItemTypeId="NON_SERIAL_INV_ITEM" productId="clampingplate" facilityId="10000" quantityOnHand="44.0" availableToPromise="44.0" lastUpdatedStamp="2004-10-03 22:35:30.0" lastUpdatedTxStamp="2004-10-03 22:35:30.0" createdStamp="2004-08-06 18:47:50.0" createdTxStamp="2004-08-06 18:47:50.0"/>

we also have physical inventory records like:

 <PhysicalInventory physicalInventoryId="10153" physicalInventoryDate="2004-10-23 05:09:52.0" partyId="10000"
lastUpdatedStamp="2004-10-24 04:31:32.605" lastUpdatedTxStamp="2004-10-24 04:31:28.882" createdStamp="2004-10-24
04:31:32.605" createdTxStamp="2004-10-24 04:31:28.882"/>

Foreign key problems during import - solved

Circular dependencies - these are the cause the foreign key problems


Primary key problems - under investigation.

Suspicion is that holes in the primary key sequences (that can happen when deleting entities; also I dropped some entities at an earlier import) confuse the pk-generation.

Here is a pk () issue when adding a simple phone number type contact to a party:

ERROR: Could not complete the Create Contact Mechanism process [problem creating the newValue value: Exception while inserting the following entity:
 [GenericEntity:ContactMech][createdTxStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][infoString,null()][lastUpdatedTxStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][contactMechId,10011(java.lang.String)][createdStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][lastUpdatedStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][contactMechTypeId,TELECOM_NUMBER(java.lang.String)] (while inserting: [GenericEntity:ContactMech][createdTxStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][infoString,null()][lastUpdatedTxStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][contactMechId,10011(java.lang.String)][createdStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][lastUpdatedStamp,2004-11-29 22:10:37.695(java.sql.Timestamp)][contactMechTypeId,TELECOM_NUMBER(java.lang.String)] (SQL Exception while executing the following:
INSERT INTO public.CONTACT_MECH (CONTACT_MECH_ID, CONTACT_MECH_TYPE_ID, INFO_STRING, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?) 
(ERROR: duplicate key violates unique constraint "pk_contact_mech")))] calling service createContactMech in createTelecomNumber calling service createTelecomNumber in createPartyTelecomNumber

After reposting the form several times once it just worked - misterious. Sly and Marcell experienced the same. Maybe simultaneous access caused the problem (pk-generation returned the same for both visitors?). We only have one ofbiz. instance.


Earlier problems: learn from these


See