The FlexDeploy distribution for Tomcat includes the binaries for Tomcat, the FlexDeploy WAR, and the base configurations, leaving only a few simple steps to complete the install. The distribution contains the following components.
...
Step 4. Modify Tomcat configuration file (context.xml) for database connectivity depending on your database type.
- Replace the contents of context.xml with the contents the context-<type>.xml if using PostgreSQL or MySQL. The default context.xml file is for Oracle.
- Replace URL and Password with the actual values.
File - <FlexDeploy Home>/apache-tomcat-flexdeploy/conf/context.xml
Tip | ||
---|---|---|
| ||
|
Include Page | ||||
---|---|---|---|---|
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Resource name="jdbc/flexdbDS" auth="Container" type="oracle.ucp.jdbc.PoolDataSource" factory="oracle.ucp.jdbc.PoolDataSourceImpl" connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource" minPoolSize="0" maxPoolSize="100" initialPoolSize="0" autoCommit="false" inactiveConnectionTimeout="300" url="**CONNECT_STRING**" user="fd_admin" password="**FD_ADMIN_PASSWORD**" fastConnectionFailoverEnabled="true" validationQuery="select 1 from dual" testOnBorrow="true" useLocalSessionState="true" defaultAutoCommit="false"/> |
...
- Download the latest Oracle JDBC driver from https://www.oracle.com/database/technologies/appdev/jdbc-ucp-19c-downloads.html. For example, ojdbc8-full.tar.gz.
- Remove ojdbc jar files like ojdbc*.jar or ojdbc*dms.jar from <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
- Copy ojdbc8.jar, ons.jar anducp.jar from download archive to <FlexDeploy Home>/apache-tomcat-flexdeploy/lib.
...
...
If you leave multiple Oracle JDBC drivers in the lib folder, you could encounter the following exception on startup. Remove the old versions of the driver.
java.lang.SecurityException: sealing violation: package oracle.jdbc is sealed
at java.net.URLClassLoader.getAndVerifyPackage(Unknown Source)
at java.net.URLClassLoader.definePackageInternal(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
- UCP is now required for Oracle Database connections. See Implementing UCP connections with Tomcat and Oracle for more info.
...
Step 9. (Linux only) - set the shell scripts executable with this command.
...
File - <FlexDeploy Home>/StartFlexDeploy.sh(you can also use startup.sh or startup.bat scripts). If you want to use Windows service, see Install Windows Service for FlexDeploy Tomcat Server.
Note | ||
---|---|---|
| ||
After starting your server, check the <FlexDeploy Home>/apache-tomcat-flexdeploy/logs/flexdeploy.0.log file for the following error message:
If present, increase the number of processes for the database
|
...