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.
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.
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:
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.
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 |
3.144.113.55