The buildomatic scripts depend on both Java and Apache Ant. There are two common configuration errors when attempting to do an installation using these scripts (if you are not using the included, bundled Apache Ant).
Missing Java JDK
If you have the Java JRE (Java Runtime Environment) instead of the JDK, you will not have the additional utilities that are required. In particular, an error referring to the tools.jar might occur, as in the following message:
[exec] [ERROR] BUILD FAILURE [exec] [INFO] ---------------------------------------------------- [exec] [INFO] Compilation failure [exec] Unable to locate the Javac Compiler in: [exec] c:\Program Files\Java\jdk1.6.0_10\jre\..\lib\tools.jar [exec] Please ensure you are using JDK 1.6 or above and [exec] not a JRE (the com.sun.tools.javac.Main class is required). [exec] In most cases you can change the location of your Java [exec] installation by setting the JAVA_HOME environment variable. |
The solution is to download and install the Sun Java JDK, labeled as the Java SE Development Kit on the Sun web site.
If you are upgrading JasperReports Server, you can also use the Java 1.6 JDK bundled in the previous version, as described in the JasperReports Server Upgrade Guide.
Forgot to Copy the File ant-contrib.jar
If you are using your own version of Ant and your Ant instance does not have the ant-contrib.jar in the lib directory, you will get an error similar to the following:
BUILD FAILED
c:\js-builds\jasperserver\buildomatic\install.xml:6:
Ant failed to create a task or type. To correct the error, copy <js-install>/buildomatic/extra-jars/ant-contrib.jar to your <apache-ant>/lib directory.
Failure with '$' Character in Passwords in Buildomatic Scripts
Ant is unable to accept more than one consecutive '$' character in passwords in buildomatic scripts.
This issue only occurs when two dollar signs are used in a row. For example, “$pas$word$” or “pas$word$” will not fail. If you have two consecutive dollar signs, escape each with 4 dollar signs. For example, if you use “pa$$word” you would need to set it as “pa$$$$$$$$word” in the configuration file. Once you do this, JasperReports Server will have all data connections set to “pa$$word”.
Older Apache Ant Version
As of the release of JasperReports Server 4.0, Apache Ant version 1.8.1 or higher is required. There are improvements to error handling routines in the buildomatic js-install scripts which required the higher level of Ant. If you are using an older version of Ant, you will get an error similar to the following:
BUILD FAILED
c:\js-builds\jasperserver\buildomatic\install.xml:37:
Problem: failed to create task or type componentdef
To check your version of Ant and verify that it is at a high enough level, enter:
ant -version
If you have a lower version of Ant, check to see if it is set in your class path by entering:
echo $CLASSPATH
To use the JasperReports Server version of Ant, update your CLASSPATH variable to point at the <js-install>/apache-ant/bin directory.