Professional Documents
Culture Documents
1
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Installation Index
1. Introduction ................................................................................................................................................... 4
1.1. Caution ................................................................................................................................................... 4
1.2. Checking the installation ........................................................................................................................ 4
2. Environment Configuration ........................................................................................................................... 5
3. Pre-Requirements for Running the Installer ................................................................................................. 6
3.1. JDK .......................................................................................................................................................... 6
3.2. Operational systems ............................................................................................................................... 6
3.3. Connection to the database server ........................................................................................................ 6
3.4. File permissions ...................................................................................................................................... 6
4. How to Create Artifacts for Deployment....................................................................................................... 6
4.1. Parameterization file .............................................................................................................................. 6
4.2. Application root directory ...................................................................................................................... 7
4.3. Parallel instances deployment................................................................................................................ 8
4.4. Notes ...................................................................................................................................................... 8
5. How to Run the Installer ................................................................................................................................ 9
6. How to Configure JBoss Application Server ................................................................................................ 12
6.1. Overview ............................................................................................................................................... 12
6.2. Requirements ....................................................................................................................................... 12
6.3. Creating the administrator user ........................................................................................................... 12
6.4. Configuring maximum Metaspace size................................................................................................. 12
6.5. Configuring Oracle JDBC driver............................................................................................................. 13
7. JBoss Configuration Example ....................................................................................................................... 13
7.1. JVM ....................................................................................................................................................... 13
7.2. Memory configuration.......................................................................................................................... 16
7.3. Configuring maximum post size ........................................................................................................... 17
8. Configure the Database Connection ........................................................................................................... 19
9. Configure the System log Mecanism ........................................................................................................... 24
10. Deploy .EAR ............................................................................................................................................... 29
11. Post-installation ......................................................................................................................................... 30
11.1. Environment validation ...................................................................................................................... 30
11.2. Administrator first login ..................................................................................................................... 31
11.3. Configuring the application ................................................................................................................ 32
2
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
The main objective of this guide is to help with the configuration and installation process of
the Solução Fiscal Web. The configuration file and installation instructions may change
from version to version.
Important Changes:
The client.properties file will be migrated to the database. All values you
have set in this file will no longer be retrieved from it, instead will be
retrieved from the database. But since the installation process requires a
database connection you will still need to configure the needed properties for
it, listed below:
o database.username
o database.password
o database.url
o database.tablespace
o database.indexspace
o database.lobspace
Also there are another properties needed for the installation process and
needed to be in the client.properties:
o sufixo.url.ambiente
o sfw.web.root.dir
o sfw.batch.root.dir
All other application configuration will be done from inside the SFW
application and stored in the database.
The Solução Fiscal Web application will be unable to be accessed by
the users until an Administrator verify the properties migrated to the
database.
3
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
1. Introduction
1.1. Caution
The main objective of this guide is to help with the configuration and installation
process of the Solução Fiscal Web. The configuration file and installation
instructions may change from one version to another.
So if you are reinstalling or updating the product, please refer to new artifacts
version.
Before unzipping the sfw_installer.zip, check the MD5 hash against the contents of
sfw_installer_md5.txt file.
To generate the file MD5 hash on the Linux operating system, use the following
command: md5sum sfw_installer.zip
4
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
To generate the file md5 hash in the Windows operating system, you must
download the software MD5summer at: http://www.md5summer.org
2. Environment Configuration
Create Oracle User for application. See the sample create statement:
5
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
3.1. JDK:
1.8.0 or higher in the version 1.8. Check with the Application Server vendor for
required versions.
Before the execution of the installer will need the configuration file. If it’s a new
installation, please use only the sfw.properties file for the installation process. If
you are updating from a previous version, use only the client.properties.
All required parameters must be set, as described in the text boxes on the file's
contents. Required parameters:
o database.username
o database.password
o database.url
o database.tablespace
o database.indexspace
o database.lobspace
o sufixo.url.ambiente
o sfw.web.root.dir
o sfw.batch.root.dir (only in a distributed installation)
6
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
After editing all required parameters, save the file and close.
Example:
7
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
4.4. Notes:
In a Distributed Deploy: Define the directory structure in both instances (WEB and
BATCH). If both instances are running on the same machine, do not use the same
root dir for both. Create a separated root directory for each instance.
Example:
8
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Note: Linux: grant permission to run the file executing the command:
chmod +x install.sh
The installer will display a welcome screen with some information about the SFW
version you are installing.
The installer checks if the correct JDK is configured and checks the md5 of the
installation files. It also checks if the required parameters in the "client.properties" are
set, if any required property is empty, the installation will be aborted.
The properties set on properties file are logged into the installation log file
"install_log.txt" inside output folder, this feature is important to troubleshooting analysis
related to environment and installation problems.
After the validations the installer prompts to continue with the installation. Enter “ok” to
continue.
Inform the Application Server with one of the following options: jboss, wildfly,
weblogic, websphere:
The EAR file (Enterprise Archive) will be structured according to the chosen
application server.
9
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Inform the desired process with one of the following options: i (install) or u (update).
This information is used to identify which artifacts shall be generated:
If the selected option is n (no) and if this is the FIRST installation, you have to
manually create the “database version control” table of the application before continue
with the installation process.
After creating the table type "ok" (prompt) to proceed with the installation.
The installer checks if the required database privileges are granted to the database
user configured for installation. If some database required privilege are not granted to
the database user, the message below will be displayed.
10
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
After check the required privileges, type "ok" (prompt) to proceed with the installation.
The final step of the installation process is the verification of the client.properties file
migration to the database in the case of an update. If it’s not migrated, the installer will
migrate it automatically and create a sfw.properties file.
11
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
6.1. Overview
6.2. Requirements
For JBoss configuration and the deploy of the Solução Fiscal Web, we have to
conform the following requirements:
JBoss and DBMS version compatible with the application as described in the
document of hardware and software available in the product website:
http://produtos.synchro.com.br
To configure the maximum post size in order to enable large file uploads go to
<jboss_home>/bin directory and edit the standalone.conf.bat file. Locate the
properties below (JVM memory allocation pool parameter) and configure the
values -Xms2048m -Xmx6000m -XX:MetaspaceSize=64m -
XX:MaxMetaspaceSize=512m
12
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Start the JBoss server. If the server started without errors go to <jboss_home>/bin
and execute the jboss-cli.sh (Linux) or jboss-cli.bat (Windows).
Note: due to a bug in some consoles and editors instead of copy/pasting the command
above type it in the console.
Check if no error messages are displayed. Next enter the following command:
/subsystem=datasources/jdbc-driver=oracle:add(driver-name="oracle",driver-module-
name="com.oracle",driver-class-name=oracle.jdbc.driver.OracleDriver
Note: due to a bug in some consoles and editors instead of copy/pasting the command
above type it in the console.
7.1. JVM
Check if the JVM version is one supported version according to the Hardware and
Software Requirements. To check the JVM version, access the Administration
Console.
13
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
From the menu navigate Runtime > Standalone Server > Log Files and click View.
Select server.log and click View.
14
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Search for java.runtime.version and check if the value is according tho the requirements.
15
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
From the menu navigate Runtime > Standalone Server > Log Files and click View.
Select server.log and click View.
Check if the Heap and Metaspace memory are set properly. We should set at least
the following parameters values:
16
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
17
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Select HTTP Listener tab and click edit. Fill the Max post size property with
10737418240. Click Save.
18
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
19
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Inform the value SFW_DS for the name and java:/SFW_DS for the JNDI name. Click
Next.
In the next screen select Detect Driver and select oracle. Click Next.
20
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
In the next screen inform the connection properties as given by the customer and click
Next. Example:
21
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
22
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Select the created datasource, click on the drop-down and select the option “Test
Connection”. Check if the connection was successful.
23
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
From the mains menu, navigate to Configuration -> Subsystems -> Logging and
click View.
Navigate to Handler and select Size. Click Add. Inform the name SFW_LOGGER and click
Next.
24
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Inform the path of the log file server.log and relative to jboss.server.log.dir and click
Finish.
25
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Next select the SFW_LOGGER and click Edit in the Attributes tab. Fill the values like
below and click Save:
Append: false;
Autoflush: true;
Enabled: true;
Encoding: blank;
Filter spec: blank;
Formatter: %d %-5p [%c] %m%n
Level: ERROR;
Max backup index: 10;
Named formatter: blank;
Rotate on boot: false;
Rotate size: 51200K
Suffix: blank
26
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Next, select the Log Categories tab and add the following categories:
27
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Next select the Root Logger tab and click Edit. Add the SFW_LOGGER to the
Handlers list and remove the FILE handler, click Save.
28
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Navigate to Handler and select Periodic. Select the FILE handler and click Remove.
Restart the server for the changes to take effect.
With the JBoss server started select Deployments in the menu and click Add. Select
“Upload a new deployment” and click Next. Select the file sfw-<versao>-
<app_server>.ear located in <installer_path>/output/ and click Next. Click Finish. Wait
for the deployment to finish and check if the deployment was successful.
29
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
11. Post-installation
11.1. Environment validation
When starting the application server, the environment validator can stop SFW
Application if there is any issue about the environment.
The Environment Validator performs validation on the following items:
The JVM perm memory: If the value is lower than the specified.
The application directory structure: If they are not proper configured (See
item "Parameterization file client.properties: Application's root directory:").
Validation scripts applied in data base: Check "User Name" created on data base,
to make sure that there is just one SFW EAR file in the deploy folder and Install
application again.
The sample below shows the stacktrace that can exist in the server log file:
Note: So, if the SFW application is not up after start, look up in the application
server log files for the stacktrace shown below.
30
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
Where:
Note about distributed deployment: the URL for accessing the application (HTTP) is that
deployed in the WEB instance.
If the installation was successful you should see the login screen:
Log in as admin password 12345. You will be asked to type in a new password.
31
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved
Installation and Configuration Guide for JBoss
Solução Fiscal Web
After the first login, the Administrator needs to review and configure the application
properties in order to enable the other users to access the application. In the menu
select Configuração de Sistema > Configuração da Aplicação
Configure each individual group accordingly, and then click Gravar. Each group will be
validated and the properties values will be saved in the database. If the properties
values are valid the other users will be able to access the Solução Fiscal Web and the
application will be ready for use.
32
Copyright © 2017 Synchro Brazil Tax Solution
All Rights Reserved