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):
<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:
<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.
