This short guide describes how to install 2 Instances of JasperReports server for Development and Staging environments.

Download the budnled installer from JasperSoft

Perform the guided CUSTOM  install setting the following values.

Development Environment

Install folder C:\JS_DEV

  • Select Bundled Tomcat
  • Select Bundled PostgreSQL database

You would want to have both environments in different database servers for complete isolation.

Specify the following Ports

  • Tomcat Server Port 8181
  • Tomcat Shutdown Port 8006
  • Database Server port 5433

If its not for evaluation purposes then do not select sample databases and sample reports.

Let the installation run till completion, but do not start the tomcat server just yet.

Prepare the staging environment

Staging Environment

Install folder C:\JS_STG

  • Select Bundled Tomcat
  • Select Bundled PostgreSQL database

You would want to have both environments in different database servers for complete isolation.

Specify the following Ports

  • Tomcat Server Port 8080
  • Tomcat Shutdown Port 8005
  • Database Server port 5432

No Sample Reports.

Final Touches

At the current state you cant run both servers simultaneously you will get 404 Error when trying to access http://localhost:8080/jasperserver  on one of the instances.

To be able to use both instances simultaneously you will need to tweak the configuration as follows.

Verify that the following info is

C:\JS_DEV\apache-tomcat\conf\server.xml

As you specified above

Change the Connector Port as it will be the same for both installations, which will result into the application failing to start.

Make changes to the startup and shutdown scripts.

C:\JS_DEV\apache-tomcat\bin\startup.bat

Set catalina_home and base  like so

rem Guess CATALINAHOME if not defined set "CURRENTDIR=%cd%" if not "%CATALINAHOME%" == "" goto gotHome set "CATALINAHOME=%CURRENTDIR%" if exist "%CATALINAHOME%\bin\catalina.bat" goto okHome cd .. rem set "CATALINAHOME=%cd%" set CATALINAHOME=C:\JS_DEV\apache-tomcat

set CATALINABASE=C:\JSDEV\apache-tomcat

cd "%CURRENT_DIR%" :gotHome

Add the same lines to shutdown.bat

Repeat the same for the Staging environment specifying the path of the Staging environment for CATALINABASE and CATALINAHOME

The last piece of the puzzle  is fixing js.diagnostic.properities error

“Caused by: java.io.IOException: Cannot bind to URL [rmi://localhost:10991/jasperserver]: javax.naming.NameAlreadyBoundException: jasperserver [Root exception is java.rmi.AlreadyBoundException: jasperserver]
at javax.management.remote.rmi.RMIConnectorServer.newIOException(RMIConnectorServer.java:826)”

To fix this error open up the following file on one of the Environments, I would prefer DEV.

C:\JS_DEV\apache-tomcat\webapps\jasperserver\WEB-INF\js.diagnostic.properties

Change the diagnostic.port to another number say 20991

Try starting both instances from the command line if all is good you can start the services in the service manager.