Installing JasperServer 3 on JBoss AS 5

JasperServer is a kick-ass reporting application.

Running it under JBoss 5 isn't too hard, but you've got to tweak some stuff to do so (or at least I did).

First off, I like to use an ear, so create the jasperserver.ear folder in your chosen deploy folder (ex. jboss/server/default/deploy/jasperserver.ear)

Next create the META-INF folder (ex. jboss/server/default/deploy/jasperserver.ear/META-INF)

Add this as application.xml (ex. jboss/server/default/deploy/jasperserver.ear/META-INF/application.xml):

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">

<display-name>jasperserver 3</display-name>
<module id="WebModule_1">
<web>
<web-uri>jasperserver.war</web-uri>
<context-root>/jasperserver</context-root>
</web>
</module>
</application>

Now move the jasperserver.war file into your ear directory, and rename it to jasperserver.war.zip, and unzip it. This should leave you with a folder like so (ex. jboss/server/default/deploy/jasperserver.ear/jasperserver.war)

Delete the jasperserver.war.zip file.

Edit the jasperserver.war/WEB-INF/web.xml file, and remove the datasources that you don't need (unless you want to use the sugarCRM stuff or example foodmart stuff)

Remove these:

<resource-ref>
<description>SugarCRM example database</description>
<res-ref-name>jdbc/sugarcrm</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<resource-ref>
<description>Foodmart database</description>
<res-ref-name>jdbc/foodmart</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

delete the jasperserver.war/WEB-INF/application.xml (we're using the one in the ear, and the original throws some weird namespace error for me).

I had to delete xercesImpl-2.6.2.jar from the WEB-INF/lib folder for the GA version of JBoss 5 (didn't get in the way for the RCs, but there you go-- classloading changes, I assume).

Copy the js-mysql-ds.xml file from the {jasperserver-bin.zip}/scripts into your deploy folder (ex. jboss/server/default/deploy/js-mysql-ds.xml)

Remove the foodmart and sugarCRM datasources from that file too.

Copy the mysql-connector.jar (if you don't already have one) from {jaspserserver-bin.zip}/scripts/drivers to your server lib directory (ex. jboss/server/default/lib).

Create or update your jasperserver database (scripts are in the {jasperserver-bin.zip}/scripts directory).

Edit the jboss/server/default/deploy/js-mysql-ds.xml file and set the correct username and password.

Start your jboss server.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Dipesh's Gravatar I'm having some problems getting JasperServer 3.5 working with JBoss 5.1 and was wondering if you might have run into the same problems as me. I tried putting jasperserver into an EAR like you suggest in your blog, but I get an error on server startup that is some namespace error. Here's the error message. Any help would be appreciated. I have Apache CXF 3.2.1 installed as the jbossws provider and it has some spring jars that appear to be conflicting with Spring jars included with JasperServer.<br/>
<code>
2009-11-16 09:45:20,802 INFO [STDOUT] (main) 09:45:20,787 ERROR ContextLoader,main:205 - Context initialization failed<br/>
<br/>
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.IllegalArgumentException: Class [org.apache.cxf.transport.http_jetty.spring.NamespaceHandler] does not implement the NamespaceHandler interface<br/>
<br/>
Caused by:<br/>
<br/>
java.lang.IllegalArgumentException: Class [org.apache.cxf.transport.http_jetty.spring.NamespaceHandler] does not implement the NamespaceHandler interface
</code>
# Posted By Dipesh | 11/16/09 9:55 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.3.000. Contact Blog Owner