Memory Issues Running Under Tomcat
These steps might solve problems related to the release of memory or to container tag pooling:
|1.||Set the following parameter in the global $CATALINA_BASE/conf/web.xml:|
enablepooling = false
Java Out of Memory Error
If you encounter a Java out of memory error, try increasing your Java heap size setting. See Setting JVM Options for Application Servers. As a minimum, add -Xms2048m -Xmx4096m to your JAVA_OPTS setting. You may need to increase this setting according to your usage.
This Java option is set within the application server, so you must restart your application server.
Configuration File Locations
You'll find JasperReports Server configuration properties specific to your application server in the following files.
<tomcat>/apache-tomcat/webapps/jasperserver/WEB-INF/web.xml (JNDI config)
<tomcat>/apache-tomcat/config/Catalina/localhost/jasperserver.xml (delete: see below)
Tomcat Installed Using apt-get/yum
If you're installing JasperReports Server to an instance of Tomcat that was installed using a package manager like apt-get, yum, or rpm, you can use the CATALINA_HOME and CATALINA_BASE properties found in your default_master.properties file.
Go to the section of the default_master.properties that looks like this:
# Tomcat app server root dir appServerDir = C:\\Program Files\\Apache Software Foundation\\Tomcat 9.0 # appServerDir = /home/devuser/apache-tomcat-9.0 # if linux package managed tomcat instance, set two properties below # CATALINA_HOME = /usr/share/tomcat9 # CATALINA_BASE = /var/lib/tomcat9
and change which lines are commented so it looks like this:
# Tomcat app server root dir # appServerDir = C:\\Program Files\\Apache Software Foundation\\Tomcat 9.0 # appServerDir = /home/devuser/apache-tomcat-9.0 # if linux package managed tomcat instance, set two properties below CATALINA_HOME = /usr/share/tomcat9 CATALINA_BASE = /var/lib/tomcat9
Note that you must set both CATALINA_HOME and CATALINA_BASE.
Database Driver Location
After installing JasperReports Server, make sure there's a copy of the database driver file in the /usr/share/tomcat9/webapps/jasperserver/WEB-INF/lib directory. If it's not there, copy the driver to this location. For example, for PostgreSQL, you can copy the driver from the
JBoss 7 Startup Error
JBoss 7 has a default startup time period. If your JBoss 7 takes longer than 60 seconds to start or deploy, you may receive the following error:
“(DeploymentScanner-threads - 1) Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment”.
To fix this, you need to increase your deployment-timeout setting as follows:
|1.||Change to the JBoss standalone configuration directory.|
|2.||Open the standalone.xml file.|
|3.||Look for the <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1"> element, for example:|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
|4.||Edit this to add or set the attribute deployment-timeout to the preferred time in seconds, for example:|
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="600"/>
|5.||Save the file.|
On server restart, your system will have the specified time to start up.
Using a Non-default JBoss Profile
If JBoss is your application server, and you’re using a profile other than the default, you need to set the jboss.profile property before running the js-install script in Installing the WAR File Using js-install Scripts:
|1.||Open this buildomatic property file:|
|2.||Uncomment the jboss.profile property and change the profile name as follows:|
# jboss.profile = default
jboss.profile = <your_profile>
Using JBoss with Non-Latin Characters
If JBoss is your application server, and your organization is created with non-Latin characters, you will need to edit the standalone.xml configuration file.
|2.||Add a new <system-properties> tag after the <extensions> tag, as shown in the following example.|
...... </extensions> <system-properties> <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/> <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/> </system-properties>
Maximum Post Size in Wildfly
If you're upgrading or importing on some versions of Wildfly and your repository or other import file is large, the import may fail and the connection may be reset. In this case, you may need to set max-post-size. To do this, open the file <wildfly-home>standalone/configuration/standalone.xml and add or change the max-post-size attribute of the http-listener property, for example:
<http-listener name="default" socket-binding="http" max-header-size="974247881" max-post-size="974247881"/>
Disabling User Session Persistence in Application Servers
JasperReports Server stores non-serializable data in its user sessions, which can cause errors after restarting your application server:
Exception loading sessions from persistent storage
Cause: java.io.NotSerializableException ...
The errors appear in the JasperReports Server log when users log in after the application server has been restarted. Users don't see the errors, and they have no impact on JasperReports Server operations.
Because JasperReports Server user sessions are not persistent, you can configure your application server to disable persistence and avoid the error. For example, in Apache Tomcat, edit the file <tomcat>/conf/context.xml and locate the following lines.
<!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> -->
Remove the comment markers from lines 2 and 4 above, then restart Apache-Tomcat activate the change. For other application servers, refer to the product documentation.