-----Original Message-----
From: Skip [mailto:s...@thedevers.org]
Sent: Friday, September 13, 2013 1:16 AM
To: Pierre Smits
Subject: RE: Mirgration to OFBiz newer version


Pierre

As I write this, it is it is just past midnight here and I am importing data
into the new system from the old for what I hope will be the final time.
This is a large data set and takes some 9 hours to get finished.  I have
been working on this for two months now and just today feel confident enough
to put it into production.

I have tried to share some of the pitfalls I ran into, but let me recap some
of the major ones.  But be sure to check the message board history for much
more.

1.  There is a major change in the way passwords are computed.  Because we
have external users that we cannot force to change their passwords en-mass,
I put the password computations back the way they were so they accept both
new and old passwords.  Check out HashCrypt.getDigestHash(), and modified
checkPassword() in LoginServices to call a new getUnsaltedPasswordHash()
which for the most part, just calls HashCrypt.getDigestHash() if the
comparePassword() failed.  Note that I commented out all this code in
HashCrypt and pasted in the stuff from the same file in 9.x code because it
will produce a different hash.

2.  When importing data from your old system, make sure you set
entity-eca-enabled="false" in your entityengine.xml for your delegators
before you begin importing and then remove it after.  Otherwise, you end up
with a lot of crap.

3.  There are lots of new ecas that did not exist before.  This caused me no
end of headaches.  Make sure you compare your old xxxseca.xml with the new
and comment out those you do not want.

4.  Date formats are now yyyy-mm-dd instead of localized.  Not a big deal,
but I got lots of complaints during beta testing.  Still have not resolved
this because there is a lot of javascript code to change to put it back the
way it was.

5.  Lots of changes in widgets xls definitions.  After you get it fired up,
visit all your custom screens and check the console.log.  It will have tons
of errors that need cleaned up.

6.  Any custom java code that you have that used Double database fields now
must use BigDecimal for most of it.  Ditto for .bsh scripts.

7.  The bsh interpreter that ships with 12.x doesnt work.  Restore the old
version unless you are going to rewrite all you bsh scripts into .groovy.  I
am using bsh-2.04b.jar but this puts a bunch of "Experimental..." crap in
the log.  But, at least it works until I get that figured out.

8.  To import your data do an export all, delete JobSandbox.xml, Comm*.xml,
ProductKeyword.xml, RuntimeData.xml, UserLoginHistory.xml and Workflow*.xml.
Then, on a clean database, do ant load-seed, then import your exported
files, being sure to turn off entity-eca-enabled.

8.1.  Several table structions have been modified.  ProductAverateCost now
has a new productAverateCostTypeId (set to SIMPLE_AVG_COST), that has to be
added after the export to make it import OK.  None of the other additions
caused import problems.

9.  Things are about 20% slower.

10.  I did my best to keep my ofbiz code untouched, but still, have a couple
hundred modifitions in the framework and application trees (mostly in
applications related to invoices and billing accounts).

11.  Because I did not want to migrate all my applications over to the new
MacroScreenViewHandler, in each of my custom controller.xml, I made a
macroScreen handler and left screen as ScreenWidgetViewHandler.  Then, as I
changed the ftl to use it, I could just change screen to macroScreen.  The
new MacroScreenViewHandler is completely integrated with jQuery, you can
create some really killer end user screens now with very little code.  Its
really easy to modify the css to get it to look just like you like.  The ftl
code behind MacroScreenViewHandler needs some work though to make it the
best it can be.

I do not need multi-tenat.  As such, if I had to do this over again, I would
just have replaced the widget code with the new.  That is all rather clever.
The rest of the changes are mostly useless in my opinion.  Much needless
crap and pointless refactorings in my view.  There is a big rewrite to the
entity engine code and all your custom java files will have to be changed.
Deletator instead of GenericDelegator, EntityCondition.makeCondition instead
of new EntityExpr, and lots stuff like that.  I had about a thousand java
files that I had to change and it is mostly search and replace, but a pain
in the butt for no value.  Even though there is mostly no difference, they
didn't just deprecate, the removed functions all together.  I added lots of
the deprecated functions back in to make my life easier.

Hope this helps

Skip




  -----Original Message-----
  From: Pierre Smits [mailto:pierre.sm...@gmail.com]
  Sent: Friday, September 13, 2013 12:09 AM
  To: s...@thedevers.org
  Subject: Mirgration to OFBiz newer version


  Hi Skip,


  I trust your migration project is going well.


  Currently I am facing the same situation as I need to migrate several
customers to our new multi-tenant environment.
  As I am in the planning phase, I was wondering if your would be willing to
share your best practices and do's and don'ts with me regarding the data
migration.


  With kind regards,


  Pierre Smits


  ORRTIZ.COM
  Services & Solutions for Cloud-
  Based Manufacturing, Professional
  Services and Retail & Trade
  http://www.orrtiz.com

Reply via email to