Jump to content
We've recently updated our Privacy Statement, available here ×
  • This documentation is an older version of JasperReports Server Source Build Guide. View the latest documentation.

    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:

    Solution:

    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:

    From:

    <js-src>/apache-ant/lib/ant-contrib.jar

    or

    <js-src>/jasperserver/buildomatic/extra-jars/ant-contrib.jar

    To:

    <ant-home>/lib

    (General example)

    C:apache-ant-1.8.1lib

    (Windows example)

    /usr/share/java/apache-ant/lib

    (Linux example)

    /usr/share/ant/lib

    (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:

    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

    default_master.properties file:

    cd <js-src>/jasperserver/buildomatic

    edit default_master.properties

    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:

    com/jaspersoft:

    Community Project artifact tree

    jaspersoft:

    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:

    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:

    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:

    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:

    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:

    <js.quartz.script>/home/<user>/<js-src>/jasperserver/scripts/quartz/tables_<database>.sql</js.quartz.script>

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

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...