How do I fix the JDBC Apex error

Establish connections to autonomous databases

You can connect to an autonomous database using a shared Exadata infrastructure from a VCN with a public or private endpoint.

To connect to autonomous databases with a public endpoint the VCN must be configured with one of the following gateways:

Make sure you configure the subnet's route table with a rule that sends the traffic you want to the specific gateway. Also configure the security lists of the subnet to allow the desired traffic.

You can also connect to your database using private IP addresses on your on-premise network by using transit routing with an Oracle Cloud Infrastructure VCN. This allows the traffic to be moved directly from your on-premise network to your autonomous database without going over the internet. For more information about this access method, see Transitrouting: Private Access to Oracle Services.

To connect to autonomous databases with a private endpoint You must configure a security rule within one of the database's network security groups (NSGs) to allow access to the autonomous database endpoint. For more information about network configuration for private endpoints, see Networking Requirements for Private Endpoints.