Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

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.html 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/

  • 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

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 before running your application server (so the 1st time you need to deploy offline).
Don't forget to have a look in this file, there are important informations there

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). You may need to change them in appserver.properties

I should mention that it seems to me that deploying with a server already running (offline=false in appserver.properties) is faster but I did not measure exactly yet. Anyway, you need to deploy offline the 1st time you deploy since you need to generate the mandatory META-INF/README informations.

Run

  • Then if you launch the WASCE server using regular command (or running "Geronimo run" from GERONIMO_HOME\bin) it should start with OFBiz modules loaded. For obvious port conflicts reason, don't run standard OFBiz at the same time.
    • If you run the Geronimo script from GERONIMO_HOME\bin
      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)

  • No labels