I have a java application which will be deployed to Oracle Java Cloud Service. I have created a table in Oracle Database cloud service and have created a data source in Java cloud service. My datasource is up and running. Now pro-grammatically I am trying to connect to DB as shown below.
OracleConnection conn=null;
javax.sql.DataSource ds=null;
Hashtable env = new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
env.put(Context.PROVIDER_URL, "https://<host>:7002");
try{
Context context=new InitialContext( env );
//you will need to have create a Data Source with JNDI name testDS
ds=(javax.sql.DataSource) context.lookup ("jdbc/testDS");
conn=(OracleConnection) ds.getConnection();
java.util.Properties prop = new java.util.Properties();
System.out.println("Connection object details : "+conn);
conn.close();
}catch(Exception ex){
//handle the exception
System.out.println("Exception "+ ex);
}
And I am getting below mentioned issue
Exception javax.naming.CommunicationException: https://<host>:7002: [RJVM:000575]Destination <host>, 7002 unreachable.; nested exception is:
javax.net.ssl.SSLHandshakeException: General SSLEngine problem; [RJVM:000576]No available router to destination.; nested exception is:
java.rmi.ConnectException: [RJVM:000576]No available router to destination. [Root exception is java.net.ConnectException: https://<host>:7002: [RJVM:000575]Destination <host>, 7002 unreachable.; nested exception is:
javax.net.ssl.SSLHandshakeException: General SSLEngine problem; [RJVM:000576]No available router to destination.; nested exception is:
java.rmi.ConnectException: [RJVM:000576]No available router to destination.]
Could any one please suggest me the solution for above issue?