Build Troubleshooting

Name Undefined Error (Old Ant Version)

If you are not using the bundled version of Apache Ant included with the JasperReports Server source code package, you could get the following error when running the buildomatic scripts:

c:\js-builds\jasperserver\buildomatic\install.xml:6: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.


The buildomatic scripts require ant version 1.8.1 or higher. Additionally, the ant-contrib.jar file needs to be included in your ant/lib directory. If you are running with your own ant version, you can copy this jar to your <ant-home>/lib directory:







(General example)


(Windows example)


(Linux example)


(Mac example)

Database Troubleshooting

The most common error encountered when building JasperReports Server involves the database. These errors often result from not being able to connect to the database. For information about database connection problems, see the Troubleshooting Appendix of the JasperReports Server Installation Guide.

Maven Troubleshooting

Maven Error on Linux or Mac

If Maven is installed on Linux via rpm, apt-get, or yum (or on Mac) then it will be typical that the Maven binary and the Maven libraries are in separate locations. This can potentially cause a problem with the source build.

/usr/boot Does Not Exist Error

When building under Linux or Mac, it is possible to get an error similar to the following:

/usr/boot does not exist

The Buildomatic scripts attempt to find the MAVEN_HOME setting and can be unsuccessful when the maven binary is installed in the /usr/bin/mvn location. The workaround is to update your file:

cd <js-src>/jasperserver/buildomatic


Un-comment the maven.home line so that it looks like this:

maven.home = /usr/share/maven2 (Linux)

For Mac, the location of the Maven library files is typically slightly different:

maven.home = /usr/share/maven (Mac)

Clear JasperReports Server Artifacts in Maven Local Repository

If you have an existing source build environment and you add new code, such as a bug fix source patch update, you can clear the JasperReports Server artifacts in your Maven local repository to ensure that the newly built artifacts contain the necessary new content. Maven updates the artifacts automatically, but if you have trouble building or pulling in the modified code, you can try deleting these artifact trees.

To clear existing JasperReports Server artifacts:

1. Go to the repository directory:

cd <home-dir-path>/.m2/repository

2. Remove the old versions by deleting the following directories and their contents:


Community Project artifact tree


Commercial version artifact tree

Clear Entire Local Repository

If you want to completely rebuild everything, remove all of the cached jars in your Maven local repository. To do this you can delete (or rename) the entire local repository.

Then when you build JasperServer, all dependencies are re-downloaded.

cd <home-dir-path>/.m2

rm -rf repository

Maven Warnings

Maven generates verbose warnings during the artifact validation process.

The following example shows a warning, even though the required JAR file was downloaded successfully:

[WARNING] Unable to get resource from repository jasperServer (file://C:/svn/js-buildlds/jasperserver-repo
163b downloaded

Maven Error: Transferring Files

With the Maven build, there are many files that are downloaded on the very first build. It is not unusual to get an error downloading a file. You can usually get around a file transfer error by kicking off the build again.

In the following example, there was a transfer error on the castor.jar file:

[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: castor:castor
Reason: Error getting POM for 'castor:castor' from the repository: Error transferring file
from the specified remote repositories:
Maven Snapshots (,
central (,
ApacheSVN-central (,
jasperServer (file://C:\jasperserver-3.7.0-src\jasperserver-repo\jasperserver-maven)

Such problems can be fixed by re-running the mvn install command, which effectively restarts the build.

Maven Build Error: Failed to Resolve Artifact

In some cases, Maven may return the following error:

[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
1) javax.transaction:jta:jar:1.0.1B
	Try downloading the file manually from:
Then, install it using the command:
	mvn install:install-file -DgroupId=javax.transaction -DartifactId=jta \
		-Dversion=1.0.1B -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
	1) com.jaspersoft.jasperserver.api.metadata:jasperserver-api-metadata:jar:3.0.0
	3) org.springframework:spring-jdbc:jar:2.0-m2
	4) org.springframework:spring-dao:jar:2.0-m2
	5) javax.transaction:jta:jar:1.0.1B
2) jasperreports:jasperreports:jar:3.0.0
	Try downloading the file manually from the project website.
		mvn install:install-file -DgroupId=jasperreports -DartifactId=jasperreports \
		-Dversion=3.0.0 -Dpackaging=jar -Dfile=/path/to/file
Path to dependency:
	1) com.jaspersoft.jasperserver.api.metadata:jasperserver-api-metadata:jar:3.1.0
	2) jasperreports:jasperreports:jar:3.1.0
2 required artifacts are missing.
for artifact:
from the specified remote repositories:
	Maven Snapshots (,
	central (,
	ApacheSVN-central (,
	jasperServer (file://C:\jasperserver-3.7.0-src\jasperserver-repo)

This error may indicate that the setting.xml file doesn’t point correctly to the jasperserver-repo directory.

In this case, many of the dependent JARs cannot be found. To resolve the problem, double-check your maven_settings.xml file at buildomatic/build_conf/default.

Old Maven Binary

In general, it is best to use the most current stable version of the Maven tool.

Jaspersoft has found that Maven version 3.0.3 will get errors resolving dependencies; therefore this version should not be used.

Other Build Troubleshooting

Error When Building Database Scripts

When compiling in the jasperserver-repository-hibernate/build-db directory, you might see an error containing the following message:

[INFO] ------------------------------------------------------------------------
[INFO] Error executing ant tasks
Embedded error: Source file does not exist!

The most likely problem is that your .m2/settings.xml file doesn’t point to the correct source location, and the build step did not find the Quartz scripts. The settings.xml file should contain the path to the quartz script corresponding to your database, for example:


If you use the buildomatic scripts you should not get this kind of error.