JasperReportsIntegration 2.0.0 Beta on JBoss 7

Dietmar Aust / Opal Consulting have released JasperReportsIntegration 2.0.0 Beta for testing.

You can see the announcement here

It is has some amazing new features, is updated for JasperReports 4.7.0, and has a new deployment model.

Most importantly, the new version allows you to easily run JasperReportsIntegration on JBoss 🙂

If you don’t have JBoss 7.1.1 installed, you can follow my tutorial here:

One important note – it did not work for me with JDK 1.7 but worked wonderfully with JDK 1.6

The zip file contains the required items for deployment on JBoss as well as items for Oracle (/sql directory) and Apex (/apex directory), it also contains some scripts to run in standalone mode as well as Jetty.

1. Create a directory under /usr/share to be the home for under JasperReportsIntegration

2. Change to the new directory:

3. Download the kit from Opal:

Or use wget:

3. unzip it.

4. Your directory will look like this:

5. Change to the webapp directory and locate JasperReportsIntegration.war:

6. Move the JasperReportsIntegration.war to JBOSS_HOME/standalone/deployments

In my case /usr/share/jboss-as/standalone/deployments:

7. Once you have moved the WAR, delete the webapp directory along with the following:

4. You should now be left with the following:

If you are running under the user jboss, change ownership of the logs directory at /usr/share/JasperReportsIntegration/logs to the user jboss

5. Change to the conf directory, where you will find application.properties and log4jproperties:

6. The application.properties will look as below:

Change the data sources to your own.

Note that one of the verification tests later will look for a data source with the name ‘default’, so may want to leave one named as ‘default’.

7. Placing OC_JASPER_CONFIG_HOME into the path of JBoss.

Where you place the path to OC_JASPER_CONFIG_HOME depends on the user you running JBoss under.

If you are running JBoss under the user jboss, you need to add the path to OC_JASPER_CONFIG_HOME to the .bash_profile of user jboss.

If you are running JBoss under the user root, you need to add the path to OC_JASPER_CONFIG_HOME to the .bash_profile of the user root.

If you simply place the path into the Jboss init script (JBOSS_HOME/bin/jboss-as-standalone.sh) or into your jboss script under /etc/init.d, it will throw the following error as JBoss will look for the application.properties file under ../JasperReportsIntegration.war-xxx/conf/application.properties:

So, add the following to the .bash_profile of the user your running jboss under (jboss or root):

Along with JAVA_HOME and bin paths (and any others you have), your jboss (or root) user bash_profile would look something like:

8. Install the SQL into the user schema

This bit has not changed.

Connect to your database server and change directories to the location you uploaded the /sql directory.

Connect to SQL*Plus as the required user and run @user_install.sql

Make sure it compiles with no errors.

 

9. Install the f860_JasperIntegrationTest_2.0.0.0.sql Application

Import the f860_JasperIntegrationTest_2.0.0.0.sql into your work space.

The new testing application has some new features as you can see below.

 

10. Verify your installation.

In the screenshot below, you can see I did not use the name ‘default’ for any of my data sources.

JBoss 7 JRI Application

11. Test your reports.

Among other new features, there is now a “Save File on Server” option. This allows you to save the generated report on the file system of the application server (jboss). You need to supply the full OS path. One additional note, if you are running as user jboss you will only be able to save into directories owned by jboss (or made available to user jboss). If you are running a root, of course, you can save anywhere on the server.

Jboss 7 Jasper Test

There is the file, fromapp.pdf, saved to server in above screen shot.

 

Cool beans. Hoping to learn a lot more about this

Official Installation Guide

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

5 + 2 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.