Create ATP connection in JDeveloper

October 9, 2019 | 3 minute read
Derek Kam
Consulting Solutions Architect
Text Size 100%:

Introduction

At the time this blog was published, DB Adapter is not certified/supported with ATP database. The instruction in this blog is for demonstration purpose only

When you are developing an application using JDeveloper with Oracle ATP (Autonomous Transaction Processing ) Database, you will need to create a connection to ATP instance that you have created.  You can use the connection to create a DB connection using DB Adapter in SOA Suite Quickstart JDeveloper. In this blog, this article describes how to configure an ATP connection in JDeveloper.

Configuration

Before you create a connection in JDeveloper, you will need to create an ATP instance and download the client credentials (Wallet) by following the instruction in this link: https://docs.cloud.oracle.com/iaas/Content/Database/Tasks/adbconnecting.htm#ConnectingtoanAutonomousDatabase

Once the client credentials zip file have been downloaded, unzip it to a folder, you will notice the folder contains the following files:

  • truststore.jks

  • tnsnames.ora

  • sqlnet.ora

  • ojdbc.properties

  • keystore.jks

  • ewallet.p12

  • cwallet.sso

There are 2 ways to connect, either by using Oracle Wallet or Java KeyStore, the method you choose to use  will depend on the tool you are using, as well as the connectivity feature supported by the tool.  In SQL Developer, you can use Oracle Wallet.  In this example, we will be using Java KeyStore:

Before you configure the database connection in JDeveloper, you need to create the "network/admin" folder in your unzipped wallet folder, then copy the tnsnames.ora to this folder.

You can choose one of the 2 options below to configure your JDeveloper to connect to the ATP database.

1. Modify the jdev.conf, add the following in the jdev.conf file

AddVMOption -Doracle.net.tns_admin=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/network/admin

AddVMOption -Djavax.net.ssl.trustStore=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/truststore.jks

AddVMOption -Djavax.net.ssl.trustStorePassword=<YOUR ATP WALLET PASSWORD>

AddVMOption -Djavax.net.ssl.keyStore=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/keystore.jks    

AddVMOption -Djavax.net.ssl.keyStorePassword=<YOUR ATP WALLET PASSWORD>   

AddVMOption -Doracle.net.ssl_server_dn_match=true    

After configuring your jdev.conf in option 1, you can launch the JDeveloper to configure a new database connection.

2. Add the following in as the JDBC Parameters when you create a database connection in JDeveloper.

oracle.net.tns_admin=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/network/admin

javax.net.ssl.trustStore=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/truststore.jks

javax.net.ssl.trustStorePassword=<YOUR ATP WALLET PASSWORD>

javax.net.ssl.keyStore=<PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/keystore.jks

javax.net.ssl.keyStorePassword=<YOUR ATP WALLET PASSWORD>   

oracle.net.ssl_server_dn_match=true    

In the database connection creation screen, enter the username and password of the ATP Admin user, then choose “Enter Custom JDBC URL” and enter the URL in this format:

Jdbc:oracle:thin:@<TNS Alias>

The <TNS Alias> can be found in the tnsnames.ora file in the client credential folder above.

If you choose to use option 2 above, you can click on the JDBC Parameters button to enter the name and value listed above.

To connect to the SOACS, you need to follow the steps outlined in this support document (How to configure Jdeveloper to deploy to SOACS? (Doc ID 2583653.1)) to export the default SOACS trust and demo identity SSL certificates, and import them into the trust store you downloaded from ATP.  

For example:

keytool -importcert -alias SOACSRootCA -file TrustedCertificate -keystore <PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/truststore.jks -storepass <ATP keystore password> 

keytool -importcert -alias SOACSIdentity -file Certificate -keystore <PATH TO YOUR UNZIP CLIENT CREDENTIALS ZIP FILE>/truststore.jks -storepass <ATP keystore password> 

Derek Kam

Consulting Solutions Architect

Derek Kam is a Consulting Solutions Architect in the A-Team at Oracle Corporation. He works closely with customers and partners, worldwide, providing guidance on architecture, best practices, troubleshooting and how best to use Oracle Cloud Services and products to solve customer business needs. Derek is a multi-skilled IT professional with more than 26 years of experience, possessing a wide range of experience and expertise in the Oracle Fusion Middleware and Oracle Clouds (PaaS and IaaS) technical and architecture design, development, software testing and quality assurance, and project management. Prior to joining Oracle in 2012, Derek has worked in consulting, financial and retail industries.


Previous Post

Connect from on-premise to Object Storage via FastConnect

Catalin Andrei | 3 min read

Next Post


FastConnect with Oracle Provider - Lumen eLynk Cloud Connect

Javier Ramirez | 8 min read