# How to resolve the "Failed to initialize pool: ONS configuration failed" error

If you try to connect a Java application to the Oracle database, you may receive the following error message:

{% code overflow="wrap" %}

```
"Could not establish connection to the database. Error com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: ONS configuration failed"
```

{% endcode %}

## **Identifying the cause of the error**

This error is caused by incorrect settings of the Oracle Notification Service (ONS). This service notifies the application of database changes, but inadequate configuration can break connectivity and cause this issue.

## **Fixing the error**

To resolve this error, disable the ONS function by adding a specific parameter to the configuration of your connector. Follow the steps below:

1. Open the configuration of a database connector (normally the [**DB**](/documentation/connectors-and-triggers/connectors/structured-data/db-v2.md) connector is used in these cases).
2. Find the parameter that contains the configuration of the Oracle database.
3. Add the following line to disable ONS: `"oracle.jdbc.fanEnabled" : false`

<figure><img src="/files/yblBrRlDVcpvw7MTeM4E" alt=""><figcaption><p>Example of configuration.</p></figcaption></figure>

4. Save the connector and test the execution.

If the configuration is correct, the database connection should now be successful.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digibee.com/documentation/troubleshooting/integration-issues/failed-to-initialize-pool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
