Adding POI Jars to the JBoss Server Classpath - Linux
This is a recommended step. It is recommended that POI jar files be added at installation. The POI jar
files are needed when users export table data using Microsoft Excel. Failure to add the necessary files
will result in errors for users. POI jar files can be added at a later time.
- These jars are available as part of the ESI External Libs.
POI Dependency JAR List:
poi-4.1.1.jar,
poi-ooxml-4.1.1.jar
poi-ooxml-schemas-4.1.1.jar
xmlbeans-3.1.0.jar
commons-collections4-4.4.jar
- If the server is running, it must be stopped. Changes to a server that is running will not be dynamically loaded.
- Save all the POI jars to some location in your machine, for example <poi_location>
- Create a new custom folder in
<JBOSS_HOME>\modules\system\layers\base\org\apache\poi\main.
- Copy all the POI jars there from the <poi_location> created in step 1 to the new folder.
- Create a new file module.xml with the following content.
<module xmlns="urn:jboss:module:1.3" name="org.apache.poi">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<resources>
<resource-root path="poi-4.1.1.jar"/>
<resource-root path="poi-ooxml-4.1.1.jar"/>
<resource-root path="poi-ooxml-schemas-4.1.1.jar"/>
<resource-root path="xmlbeans-3.1.0.jar"/>
<resource-root path="commons-collections4-4.4.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
- Place in <JBOSS_HOME>\modules\system\layers\base\org\apache\poi\main location.
- The POI module must be added to all deployments in the standalone.xml or standalonefull.xml file:
- <Jboss_home>\standalone\configuration
Note: For standalone mode it is the standalone/configuration/standalone.xml file and for the domain
mode it is domain/configuration/domain.xml. The standalone-full-ha.xml file can also be used.
- Make a backup copy of the standalone.xml or standalone-full.xml file for safety. If the file you are editing gets corrupted, you can restore the original file.
- Add the following under <subsystem xmlns="urn:jboss:domain:ee:4.0">
<global-modules>
<module name="com.ibm.db2.jcc" slot="main"/>
<module name="org.apache.poi" slot="main"/>
</global -modules>
Note: If using IBM DB2, the POI entry should be in the same global-modules as the DB2 entry.
- Save the standalone.xml or standalone-full.xml.
- The variable will be added to the Server the next time it is started.
Updating the System IP Address
This is an optional step. To access the JBOSS server console using a System IP address or with the local
host URL (http://localhost:8080 ), change the IP address value of <interfaces> node of standalone.xml
from 127.0.0.1 to 0.0.0.0.
Note: If the IP address value is 127.0.0.1 then it will restrict to access the console URL with localhost only. These changes need to be done for a Windows machine. They also can be done on Linux machine.
There are two ways to update the JBOss server binding address:
Option 1
- Locate the folder location of the standalone.xml or standalone-full.xml file:
<jboss_home>\standalone\configuration.
- Create a backup copy and park in a safe location.
- Open the standalone.xml or standalone-full.xml file:
- Change the management and public addresses to 0.0.0.0.
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
</interfaces>
- Save and close the file.
Option 2
When starting JBoss using command line:
- Windows: standalone.bat -c standalone-full.xml -b 10.100.100.100 -bmanagement 10.100.100.100
- Linux: ./standalone.sh -c standalone-full.xml -b 10.100.100.100 -bmanagement 10.100.100.100
Optional – Increasing the Timeout Settings
For long running batch processes in java, timeout settings should be updated to avoid timeout errors.
For example, an EJB Transaction timeout issue occurs when an EJB transaction takes more than
configured time.
This issue can be solved by adjusting the Default Timeout on the admin console.
Note: Depending on your setup, your console may differ and figures are for reference only