## ## ## ## ## ## ## ## #####
#### ## ##### ## ## #####
_____ / ___| \ `--. `--. \ /\__/ / \____/
______ ( __ \ | ( \ ) | | ) | | | | | | | ) | | (__/ ) (______/
_ | | | | | | | |____ |______|
IMPORTANT: enter the case-INsensitive alphabetic (no numbers) code AND WRITE SOME SHORT summary of changes (below) if you are saving changes. (not required for previewing changes). Wiki-spamming is not tolerated, will be removed, so it does NOT even show up in history. Spammers go away now. Visit Preferences to set your user name Summary of change: '''This page is for ofbiz developers and users''' We use * postgresql but * upgrade was done doing all the import/export via XML. '''Ofbiz version to test is tag 3.2.0''' That means * http://svn.ofbiz.org/svn/ofbiz/tags/3.2.0 instead of what we used till now: * http://svn.ofbiz.org/svn/ofbiz/trunk export entities first and hope it'll work OK (it should; we don't use many types of entities currently) ---- '''Inventory Problems Solved''' - fixed now. I finally took the time to subscribe to their list. I made a [http://ofbizwiki.go-integral.com/Wiki.jsp?page=InventorySetup 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 * when we're concerned about the inventory items of a facility, sum is shown as "/" for all products * when we're concerned about the inventory items of product, sum is shown as 0 for all facilities '''To prevent incompatibilities while importing data I excluded these''': * InventoryEventPlannedType.xml * InventoryItemDetail.xml * PhysicalInventory.xml * InventoryItem.xml * InventoryItemVariance.xml ---- '''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: <code> <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"/> </code> we also have physical inventory records like: <code> <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"/> </code> ---- '''Foreign key problems during import''' - solved '''Circular dependencies''' - these are the cause the foreign key problems * there are even circular dependencies because of the UserLogin entity field "creator of the entity id - party". * circular deps inside ProductCategory (parent category reference to self) * As [http://lists.ofbiz.org/pipermail/dev/2004-May/004813.html this] points out, the [http://ofbizwiki.go-integral.com/Wiki.jsp?page=IntegrityConstrain drop foreign-key hack] is ugly. But I did the steps, and it works. '''Don't be afraid of dropping foreign keys''' (the data is kept, and it could be recreated later). ---- '''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: <code> 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 </code> 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 * using mysql : does not properly enforce constraints. Use postgresql * Editing and ordering files manually to prevent foreign-key issues: dropping the foreign keys while importing is less laborsome :-) The directory import/export that did not exist in 3.0.0 version really makes all importing/data transfer work easier. * working on distant machine: serious work (such as many new products categorized) should be done on the test system and imported from XML (trivial) or via the EntitySync feature (how exactly?) * ... ---- '''See''' * [http://ofbizwiki.go-integral.com/Wiki.jsp?page=UpgradingOverview upgrade in ofbiz wiki] * WebShop/UnderDevelopment/OfBiz * I ask in [http://ofbizwiki.go-integral.com/Wiki.jsp?page=InventorySetup ofbiz wiki] about the inventory issue. I also drop a mail to their dev list. Optional: Add document to category: Wiki formatting: * is Bullet list ** Bullet list subentry ... '''Bold''', ---- is horizontal ruler, <code> preformatted text... </code> See wiki editing HELP for tables and other formatting tips and tricks.