This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

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

Skip to end of metadata
Go to start of metadata

Guidelines to run OFBiz under Tomcat 5.5.26 or 6.0.16

Deprecated

This is deprecated with last versions, for instance the appserver component has been moved first from framework to specialpurpose and then recently to OFBiz Attic#Appserver

Under framework/appserver there is 2 folders, one for Tomcat 5.5 (named tomcat55, validated with Tomcat 5.5.26) and another for Tomcat 6 (named tomcat6, validated wit Tomcat 6.0.16). Now the Tomcat server(s) use the Ofbiz SSL keystore. This How To has been given by Ludovic Maître at  OFBIZ-1738 - Getting issue details... STATUS and has not been tested yet by the core team. Please refer to the Jira issue in case of problems.

Don't forget to have a look at the JRE Memory Leak Prevention Listener. Some lines which were put as examples in OOTB code have been removed at r1626971. See this dev ML tread if you are interested.

Get OfBiz and Tomcat

mkdir ofbiz-tomcat
cd ofbiz-tomcat
svn co http://svn.apache.org/repos/asf/ofbiz/trunk ofbiz
wget http://apache.crihan.fr/dist/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz
tar -zxvf apache-tomcat-6.0.16.tar.gz

Compile OfBiz

cd ofbiz
ant clean && ant

Generate Tomcat templates

Tomcat 5.5

java -jar ofbiz.jar -setup tomcat55

Tomcat 6

java -jar ofbiz.jar -setup tomcat6

Install Tomcat templates in server configuration folder

Tomcat 5

cd ../apache-tomcat-5.5.26
cp ../ofbiz/setup/tomcat55/catalina.sh ../ofbiz/setup/tomcat55/catalina.bat bin/
cp ../ofbiz/setup/tomcat55/catalina.properties ../ofbiz/setup/tomcat55/server.xml conf/

Tomcat 6

cd ../apache-tomcat-6.0.16
cp ../ofbiz/setup/tomcat6/catalina.sh ../ofbiz/setup/tomcat6/catalina.bat bin/
cp ../ofbiz/setup/tomcat6/catalina.properties ../ofbiz/setup/tomcat6/server.xml conf/

Run Tomcat

./bin/catalina.sh run

Run a cluster of Tomcats

As usual for a Tomcat (and OfBiz) cluster.

  • No labels

8 Comments

  1. Unknown User (tburdeinei)

    great stuff till we get to the end- can we at least have a link to how to run a cluster of ofbiz tomcats?

  2. Unknown User (skorpiun@gmail.com)

    It would be helpful to add one last step for testing the installation. Just a quick list of steps someone can use to verify that all the aspects of the system are running as expected.

  3. We need to edit the catalina.bat file generated by the template , when we used that file we were getting large error list, so definitely JAVA_OPTS setting was the error

    So, googling was the only option and some where i could find this was the error, we need to change this line
    rem BEGIN OfBiz settings
    set JAVA_OPTS=&"%JAVA_OPTS% -Dofbiz.home=E:/ecommerceofbiz/apache-ofbiz-09.04/apache-ofbiz-09.04"
    rem END OfBiz settings

    rem BEGIN OfBiz settings
    set JAVA_OPTS=-Dofbiz.home="E:/ecommerceofbiz/apache-ofbiz-09.04/apache-ofbiz-09.04"
    rem END OfBiz settings

    But still getting a lot of error, so again googled, found catalina.properties has also be changed, like its file:// in there, we have to change it to file:////, then started tomcat and it was working..

    http://localhost:8080/ecommerce/control/main..

    phew, a sigh of relief.. Anyway ofbiz rocks..loved it

  4. Does it really work?

    Jacques, did you test these steps? I didn't but I suspect, from what I know of the OFBiz bootstrap architecture, that you will end up with a broken deployment.

  5. We should provide the link to the official Tomcat download page rather than:

    wget http://apache.crihan.fr/dist/tomcat/tomcat-6/v6.0.16/bin/apache-tomcat-6.0.16.tar.gz

     

    1. Actually this link is part of the 1st of suggested code by Ludovic. I guess he succesfully used it before suggesting. But I must say I did not try. And the last persons who tried to use an external Tomcat installation got issues. Maybe not because they followed this How To.

      I'd though keep this How To, even if not perfect and maybe deprecaed at least it gives some clues about what to do and look for...

  6. Jacopo Cappellato: actually I never used Tomcat alone. The only external installation I did was with Geronimo (aka IBM WASCE), and yes it worked, but with some minor limitations. I created a page for that Geronimo & IBM Websphere Application Server Community Edition . But this was in 2008, I did not retry since...