X

Best Practices from Oracle Development's A‑Team

Create ATP connection in JDeveloper

Derek Kam
Consulting Solutions Architect

Introduction

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:

First, you need to 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>

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

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

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

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

AddVMOption -Doracle.net.ssl_server_dn_match=true    

After configuring your jdev.conf, you can launch the JDeveloper to configure a new database connection, 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.

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> 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha

Recent Content