Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Guidelines to use OFBiz under WASCE 2.0.0.1 or Geronimo 2.0.3

...

This uses a totally exploded EAR architecture (with exploded WARs as welll)

WASCE 2.0.0.1 is based on Geronimo 2.0.3 which is a snapshot (previous versions, and so far 2.1, don't work), I got it there http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/assemblies/geronimo-tomcat6-jee5/2.0.3-SNAPSHOT/geronimo-tomcat6-jee5-2.0.3-20080318.171132-2-bin.zip
To know more have a look at https://issues.apache.org/jira/browse/GERONIMO-3947

The code and templates are in framework/appserver/wasce2. Of course, this works under Linux and Windows as well.

Install

...

http://publib.boulder.ibm.com/wasce/V2.0.0/en/quick-start.htmlImage Modified or Geronimo 2.0.3 (see link above)
If needed refer to documentation using bread crumbs links in the web page above (WASCE 2.0 Documentation > Index > Content > Setup > Choosing an installation bundle)

...

or/and use Geronimo documentation : http://cwiki.apache.org/GMOxDOC20/Image Added

  • After the installation, don't forget to set your GERONIMO_HOME env var (for me for instance, on Windows it was C:\Program Files\IBM\WebSphere\AppServerCommunityEdition)
    If you need to set GERONIMO_HOME dymanically (for instance with multi Geronimo or WASCE versions) you can use the 3th optionnal parameter of the setup option like below, it overrides GERONIMO_HOME
    Code Block
    java -jar ofbiz.jar -setup wasce2 /META-INF/  ["myGERONIMO_HOME"]
    (using the real value of myGERONIMO_HOME of course for instance for me was <<-setup wasce2 /META-INF/ "C:\Program Files\IBM\WebSphere\AppServerCommunityEdition">>)
    The first parameter is related to the subdirectory from where you want to create deployment plans
    A fourth parameter is not used yet, but is reserved to allow running OFBiz multi-instance in Geronimo later.
    I'm still not sure I will keep the second parameter by the way
  • At this stage, don't try to install and use Eclipse plugins. They are not up to date yet, and will not be of a great help in our case anyway (I tried them, and lost some time around this)
  • After installation, you may set your GERONIMO_HOME env var (for me for instance, on Windows it was C:\Program Files\IBM\WebSphere\AppServerCommunityEdition).
    But you might prefer to set it in the appserver.properties file. In the same time check the content of this file and adapt it suiting your needs.

Setup and deploy

From a clean OFBiz installation which runs well on the same machine than where WASCE is installed, at OFBiz root (or Eclipse, or what else) run

Code Block
java -jar ofbiz.jar -setup wasce2

...

This should deploy OFBiz under your application server (offline or inline depending of appserver.properties file setting for offline parameter) and

...

generate 3 kinds of files

  1. OFBiz jar files in the Geronimo repository
  2. Deployment plans (application.xml and geronimo-application.xml) in a generated META-INF directory (in OFBiz root directory). Though the term "deployment plans" is normally used for Geronimo specific "J2EE deployment descriptors" (application.xml for instance is a standard "J2EE deployment descriptors")
  3. Deployment plans (geronimo-web.xml) in each applications WEB-INF directories

Actually there is one more README file generated in OFBiz META-INF directory. Open it and follow its intructions

...

Code Block
deploy --user system --password manager --offline deploy --inPlace C:\OFBiz

...

before running your application server (so the 1st time you need to deploy offline)

Something like "Illegal character in path" in the log means that you must remove the corresponding file, these errors are often related to .xls of .pdf files (or what else) found in the OFBiz directories structure (these kinds of files don't exist in OFBiz OOTB). If it's not related directly to OFBiz remove it.

Note that system/manager are the defaut login/pwd coming with WASCE (and Geronimo); --offline allows to deploy without Geronimo running; --inPlace because we use and Exploded architecture.
Af first sight what this command does is replicating OFBiz directories structure and content in GERONIMO_HOME\repository\org\ofbiz\ofbiz\1.0\Ear\ofbiz-1.0.ear. You may need to change them in appserver.properties

Run

  • Then if you launch the WASCE server using regular command (or preferably running "Geronimo script run" from GERONIMO_HOME\bin) it should start also OFBIz in itselfwith OFBiz modules loaded. For obvious conflict reasonsport conflicts reason, don't run standard OFBiz in at the same time.
    • If you run the Geronimo script from GERONIMO_HOME\bin
      Code Block
      geronimo run 
      with the setenv and geronimo script modified following instructions in the README file you will see what happens. This is why I think it's a preferable way of launching the server.
  • You will find OFBiz specific logs in geronimo_home\bin\framework\logs directory

Multi-instances

The appserver "-setup" deployment option is able to deploy OFBiz multi-instances in Geronimo. Actually there are, at least, 2 cases for multi-instances.

  1. Instances are all the same (simple case)
  2. Instances are differents or mixed (some instances may be the same)

In the simple case we need only one root (ofbiz.home) and only one classpath.
In the second case there are as many as roots and classpathes couples as there are different instances. I have already in code all what is needed to deal with both cases, but an issue when writing to modules web.xml (the xml root node is readonly and I don't understand why).
In the simple case it's not a problem as we need only to write in the 1st web.xml file (in webtools's) and we can do it by hand (we don't need to dynamically put an intance number in it).

Thanks for any help on the readonly root node issue ... (I'm not an xml specialist, I must confess) (smile)