Deploying to GlassFish V3

The example directory paths listed below are based on Solaris or Linux (referred to as Unix). The instructions are applicable to both Unix and Windows installations; however, the format of the paths for Windows would use the Windows format, that is, C:\JReport\Server instead of /opt/JReport/Server.

It is assumed that the JReport Server WAR file jreport.war is located in the /opt/JReport/Server/bin/distribute directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to include a self-contained JReport Server.

To deploy JReport Server to GlassFish V3:

  1. Start the GlassFish in the default domain1 and then launch the Admin Console.
  2. Click the Applications node on the left.
  3. Click Deploy on the displayed page.
  4. Click Choose File to select the WAR file jreport.war.
  5. Leave Application Name and Context Root as jreport and jreport. Then click OK.
  6. Expand the Deployment node on the left and you will see a new node named jreport. Click jreport and then on the displayed page click Save.
  7. In the console tree, click Configuration. Go to the JVM Settings tab, and then click JVM Options. In the JVM Options section, click Add JVM Option, and then type -Djava.awt.headless=true. Click Save to save your changes.

    You need not add this JVM option if you are using Windows.

  8. Restart GlassFish, and then start the application jreport.
  9. Access JReport Server using the following URLs:

    http://<hostname>:8080/jreport
    http://<hostname>:8080/jreport/admin/index.jsp
    http://<hostname>:8080/jreport/jinfonet/index.jsp

Note: GlassFish 3.1.2 uses a different Derby driver from JReport which leads to that the JReport War file does not work in GlassFish 3.1.2. To solve this, you can replace the files in /opt/glassfish3.1.2/javadb/lib with the jar files in /opt/JReport/Server/derby/lib, or use the folder /opt/glassfish3.0.2/javadb/lib to replace the folder /opt/glassfish3.1.2/javadb/lib if GlassFish 3.0.2 resources are available.

Troubleshooting

If you run into some problems when using the GlassFish V3, send the log files of JReport Server to support@jinfonet.com. The following procedure illustrates how to generate the log files:

  1. Start the GlassFish in the default domain1 and then launch the Admin Console.
  2. In the console tree, click Configuration.
  3. Go to the JVM Settings tab, and then click JVM Options.
  4. In the JVM Options section, click Add JVM Option, and then type -Dlogall=true. Click Save to save your changes.
  5. Restart GlassFish and try to reproduce the problem.
  6. After reproducing the problem, send support@jinfonet.com the log files in reporthome/logs.

    The GlassFish log file may also help to identify the problem. It is /opt/glassfish/domains/domain1/logs/server.log.