Deploying Server to Tomcat 9.0.38
This topic describes how you can deploy Logi Report Server to Tomcat.
In the example we use directory paths based on Unix. The instructions are applicable to both Unix and Windows installations. However, the format of the paths for Windows should use the Windows format, that is, C:\LogiReport\Server
instead of /opt/LogiReport/Server
.
Assume that:
- You installed Tomcat 9.0.38 in the
/opt/apache-tomcat-9.0.38
directory. - The Logi Report Server WAR file jreport.war is in the
/opt/LogiReport/Server/bin/distribute
directory. To create the WAR file, refer to the instructions in Building a WAR/EAR File to Include a Self-contained Logi Report Server.When you set unpackWARs="false" in server.xml in the conf folder of Tomcat, you need to do the following:
- Modify the LogConfig.properties file in
/opt/LogiReport/Server/bin
before you create the WAR as follows:- Remove the code
packages = com.jinfonet.util
. - Change JRRollingFileAppender to RollingFile all over the file.
- Change JRPatternLayout to PatternLayout all over the file.
- Remove the code
- Add the parameter -Djbossas7=true when launching makewar.bat/.sh to build the WAR, for example:
makewar.bat -Djbossas7=true
- Move log4j-api-2.13.3.jar and log4j-core-2.13.3.jar from jreport.war > WEB-INF > lib to the lib folder of Tomcat.
- Modify the LogConfig.properties file in
To deploy Logi Report Server to Tomcat 9.0.38:
- Shut down Tomcat.
- Copy jreport.war to
/opt/apache-tomcat-9.0.38/webapps
. - When running on Java 9 you need to additionally add the arguments in java.option in
$REPORTHOME/bin
to Catalina.sh in$CATALINA_HOME/bin
. - Start Tomcat by running the script file startup.sh.
- Access Logi Report Server using the following URLs:
http://hostname:8080/jreport/jrserver
http://hostname:8080/jreport/jinfonet/index.jsp
Troubleshooting
If you run into problems when using Logi Report Server in Tomcat, send the log files of Logi Report Server to support@logianalytics.com. The following procedure illustrates how to generate the log files:
- Modify the catalina.sh file in
/opt/apache-tomcat-9.0.38/bin
, by adding-Dlogall=true
after the report home definition:JAVA_OPTS="-Dreporthome=
/opt/LogiReport/Server
-Dlogall=true"
Cygwin=falseOr if no report home is specified, add as follows:
JAVA_OPTS=-Dlogall=true
Cygwin=false - Start Tomcat.
- To get information about the Logi Report Server environment, you can access
http://hostname:8080/jreport/admin/info.jsp?cmd=info
. - Save the output to a file.
- After reproducing the problem, send support@logianalytics.com the log files in
reporthome/logs.
The Tomcat log files may also help to identify the problem. The most useful one is /opt/apache-tomcat-9.0.38/logs/catalina.out.