Book Image

Apache OfBiz Cookbook

Book Image

Apache OfBiz Cookbook

Overview of this book

Apache Open For Business (OFBiz) is an enterprise resource planning (ERP) system that provides a common data model and an extensive set of business processes. But without proper guidance on developing performance-critical applications, it is easy to make the wrong design and technology decisions. The power and promise of Apache OFBiz is comprehensively revealed in a collection of self-contained, quick, practical recipes in this Cookbook. This book covers a range of topics from initial system setup to web application and HTML page creation, Java development, and data maintenance tasks. Focusing on a series of the most commonly performed OFBiz tasks, it provides clear, cogent, and easy-to-follow instructions designed to make the most of your OFBiz experience. Let this book be your guide to enhancing your OFBiz productivity by saving you valuable time. Written specifically to give clear and straightforward answers to the most commonly asked OFBiz questions, this compendium of OFBiz recipes will show you everything you need to know to get things done in OFBiz. Whether you are new to OFBiz or an old pro, you are sure to find many useful hints and handy tips here. Topics range from getting started to configuration and system setup, security and database management through the final stages of developing and testing new OFBiz applications.
Table of Contents (15 chapters)
Apache OFBiz Cookbook
Credits
About the Author
About the Reviewers
Preface

"Class Not Found" errors


Another startup error that you may encounter is a "Class Not Found" error. This is usually indicative of incompatibilities between the Java runtime in use and the version of OFBiz. These errors will show up in the console window and in the OFBiz log file (~runtime/logs/ofbiz.log), and occasionally as a web page error during normal OFBiz operations.

Getting ready

Tracking down the source of "Class Not Found" errors may involve some detective work. In some cases, these errors are not immediately fatal. If the error is causing OFBiz to immediately shutdown, then you most probably have an incompatibility between the OFBiz runtime and the version of the JVM in use.

To fix OFBiz startup "Class Not Found" errors, you must first determine the version of Java being invoked from the startup script or the command line. The following section shows how this can be determined.

How to do it...

To find out which version of the Java JVM OFBiz is running in and where your JAVA_HOME environment variable is pointing, perform the following:

  1. 1. Navigate to the OFBiz install directory.

  2. 2. As the user invoking the startup script or command line Java execute statement, type in the following Java command:

    java version
    

If the information returned does not say 1.5 or 1.6, then you will need to install the Java 1.5 or 1.6 SDK. You may also need to modify the JAVA_HOME variable as shown previously.

How it works...

The Java runtime executable may be invoked with the -version parameter to return the version of the JVM being called. When executed this way, the JVM is started, the version number is checked, and then the JVM is shutdown.

Running this command as the same user who invokes the OFBiz startup scripts ensures that you pass to the JVM the same environment settings, including the JAVA_HOME setting that will be available when the startup script is invoked. In this way, you may quickly determine which version of Java you are running when you start up OFBiz.

If the version number returned is not compatible with the OFBiz release you are running, then you will need to either set your JAVA_HOME variable as shown previously to the appropriate version of Java or install the necessary Java SDK. The following table summarizes OFBiz Java dependencies:

Release

Java version

OFBiz 9.04

1.5

OFBiz 4.0

1.5

OFBiz trunk

1.6

There's more...

There is no recommended Java reference platform for OFBiz. Known implementations of the Java SDK that have successfully built OFBiz include the Sun and Mac Java SDKs.