Below is my configuration within my POM.xml for my connection pool and datasource.
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<property name="poolName" value="springPool"/>
<property name="connectionTestQuery" value="SELECT 1" />
<property name="dataSourceClassName" value="com.ibm.as400.access.AS400JDBCDataSource" />
<property name="minimumIdle" value="1"/>
<property name="maximumPoolSize" value="10"/>
<property name="connectionTimeout" value="5000"/>
<property name="dataSourceProperties">
<props>
<prop key="serverName">jdbc:as400://xxx.xxx.com;naming=system;prompt=false</prop>
<prop key="user">xxxxx</prop>
<prop key="password">xxxxx</prop>
</props>
</property>
</bean>
I'm receiving an UnknownHostException at the end of my stack trace, but here's what I'm seeing at the beginning of my stack trace:
Jul 23, 2019 9:46:15 AM com.zaxxer.hikari.HikariDataSource getConnection
INFO: springPool - Starting...
Jul 23, 2019 9:46:16 AM com.zaxxer.hikari.pool.HikariPool
throwPoolInitializationException
SEVERE: springPool - Exception during pool initialization.
java.sql.SQLException: The application requester cannot establish the
connection. (jdbc:as400://xxx.xxx.com;naming=system;prompt=false)
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:565)
at
Setting the server name as follows:
<prop key="serverName">xxx.xxx.com</prop>
Allowed my connection to complete. My Connection Pool is now started up and I can hit the AS400 Server.