This guide describes how to install BellaDati WAR on GlassFish. Please refer to the GlassFish quick start guide or the GlassFish documentation for more information about how to install GlassFish.


    BellaDati supports GlassFish 4.1.1 and above (including GlassFish 5.0.1). Please download and install the Glassfish 5 Web Profile.  (https://download.oracle.com/glassfish/5.0.1/release/index.html).

    The BellaDati WAR file is the BellaDati application packaged in a WAR archive. It must be deployed into an existing application server and needs to be connected to a data warehouse running on an existing database server.
    Deploying BellaDati 2.9 - 2.9.9 requires manual replacement of conflicting glassfish/modules/jboss-logging.jar with newer version of jboss-logging.jar. This action is no more necessary with Glassfish 5.

    Before You Begin

    Please read the following important notes before you begin installing BellaDati on GlassFish:

    • Make sure you have the right version of Java. See Installing Java for more details.


      For installing GlassFish 5.0.1 as Application server, Java 8 1.8.0_202 is recommended now. Glassfish 5.0 supports Java 8 up to 1.8.0_144.

    • Install GlassFish application server
    • Deploying multiple BellaDati WAR application in a single GlassFish application server is not supported. We do not test this configuration and updating any of the applications (even for point releases) is likely to break it.
    • We recommend not deploying any other applications in the same GlassFish container that runs BellaDati, especially if these other applications have large memory requirements or require additional libraries in GlassFish's lib sub-directory. Multiple applications in a container can impact stability as a crash in one application could make the entire container inaccessible. Additionally, in order to update or reconfigure any of the applications, you'll need to restart the whole container.


    Watch the video tutorial and or follow guidelines below

    1. Setup data warehouse

    Please follow the instructions on the Setting up the PostgreSQL Database page.

    2. Download and extract BellaDati WAR Archive

    Download the BellaDati WAR distribution as a ZIP archive from the BellaDati download page and extract its content using a tool such as 7-Zip for Windows or Linux's GNU tar tools. Only one of the files in the ZIP archive is used for this setup - belladati.war.

    (warning)  Avoid using Windows' built-in file extraction tool! This tool silently fails to extract files with long names. Other users have also reported problems with WinRAR.

    (warning)  Avoid using Solaris' default tar utility! Please use GNU tar on this operating system to extract BellaDati, as GNU tar handles long file names better.

    3. Configure BellaDati WAR

    Since version 2.7.14 there is no special configuration change needed, however, there are several advanced settings (e.g. enforcing the SSL), which are configurable in application.properties only.


    Configuration settings are explained in detail in the BellaDati WAR Configuration Overview.

    4. Configure GlassFish

    4.1 Configure Memory Settings in GlassFish

    BellaDati requires more memory than what GlassFish provides by default. This may lead to OutOfMemory errors when running BellaDati if these memory settings are not increased.

    To increase the available memory, log in into the GlassFish Administration console (by default available at port 4848). Open the Application server's JVM Settings menu and click on JVM Options. Change the setting for -XX:MaxPermSize to 512m and -Xmx to 2048m and change -client to -server as shown in the screenshot below. If any of these options doesn't exist yet, create it. Please make sure you don't have set a -server and -client option at the same time.

    If you are using the command line, execute the following commands instead:

    Restart GlassFish. For other environments and more information on memory settings, see the System Requirements and Recommended JVM Options.

    4.2 Configure Thread Pool Settings in GlassFish

    We highly recommend to increase maximum thread pool size for thread pools called "http-thread-pool" and "thread-pool-1" in thread pool settings.

    1. Login to Administration console.
    2. Open Configurations->server-config-> Thread Pools
    3. Click on "http-thread-pool", set Max Thread Pool Size to 512 and save this change
    4. Click on "thread-pool-1", set Max Thread Pool Size to 512 and save this change


    4.3 Configure the GlassFish's JDBC resource

    BellaDati uses JDBC resources which connect to the database subsystem. Although BellaDati can connect to the database directly using its own JDBC setup, we recommend using GlassFish's JDBC resources for better performance and more control over the database transaction management. You can set up the JDBC connection pool and JDBC resource following these steps:

    4.3.1 Using GlassFish's Administration console

    You can use the GlassFish's Administration console as described in the previous step:

    1. Login to Administration console.
    2. Open Resources->JDBC->Connection Pools and click the New button.
    3. Fill the Name, Type and Database Vendor fields and click Next.

    4. Specify the database pool settings. The defaults may be fine, but we recommend to set values as shown on the right (see table Recommended connection parameters).


    Good idea is to enable ping during pool creation;When enabled, the pool is pinged during creation or reconfiguration to identify and warn of any erroneous values for its attributes

    5. In the property list, enter the values matching your system configuration for DatabaseName, User, Password, ServerName and Port. Remove all other properties.

    6. After the connection pool was created, select it on the left side and click on tab Advanced. Set Connection Settings and turn on Connection Validation using the settings shown on the right (see table Recommended connection parameters).


    7. Please test connection by Ping button on the top of Edit JDBC Connection Pool page. You should see Ping Succeeded message.


    JDBC driver


    If the ping message is with error: "Classname is wrong or classpath is not set for: org.postgresql.ds.PGConnectionPoolDataSource"

    (For example, if JAVA 8 installed , driver postgresql-42.2.2.jar https://mvnrepository.com/artifact/org.postgresql/postgresql/42.2.2 is valid).

    • Restart glassfish and start new JDBC setting up.



    8. Open Resources->JDBC->Resources and click the New button.

    9. For JNDI Name, enter the value from jdbc.resource in BellaDati's application.properties. As Pool Name, select the connection pool created during the previous steps.

    Recommended connection parameters

    Resource Type

    javax.sql. ConnectionPoolDataSource

    Database Vendor


    Pool Settings

    Initial and Minimum Pool Size


    Maximum Pool Size


    Pool Resize Quantity


    Idle Timeout


    Max Wait Time


    Connection Validation

    Connection validation


    Validate at most once in

    Validation Method


    Table Name


    On Any Failure

    not checked

    Allow Non Component callers

    not checked

    4.3.2 Using the asadmin command

    1. Start GlassFish
    2. Create a JDBC connection pool:

    For DatabaseName, User, Password and ServerName, enter the values matching your system configuration.

    3. Create a JDBC resource:

    The jdbc/belladati_db corresponds to the parameter jdbc.resource from BellaDati's application.properties.

    5. Deploying BellaDati into GlassFish

    5.1 Using GlassFish's Administration console

    You can use the Admin Console to deploy BellaDati into GlassFish.

    1. Log in to Administration console.
    2. Open Applications.
    3. Click on the Deploy button.
    4. Click Browse and select the belladati.war file.

    5.2 Using the asadmin command

    In order to deploy BellaDati, execute this command:

    This command deploys the BellaDati WAR file under the /belladati context.

    6. Run the Setup Wizard

    Point your browser to http://localhost:8080/belladati. This starts the Setup Wizard, which will take you through BellaDati's setup procedure.

    7. Starting/Stopping GlassFish

    GlassFish application server can be started/stopped from the command line or by using the service. This differs depending on the operating system used:

    7.1 Windows command line

    7.2 Windows service

    If you want to install GlassFish as Windows service, you can either execute the following script or create it using the sc command manually:

    Please note, that this script requires the Administrator privileges and .NET 3.5 installed on the machine.


    For installing GlassFish 5.0 as Application server, Java 8 up to build 1.8.0_152-b16 is recommended now.

    • No labels