Trying to Access Website using SSL running JAVA from inside ORACLE DB
Hi,
I am trying to access website using SSL and running JAVA code from inside Oracle 10g DB server using SSL and Java. I have loaded my java code into Oracle data base. My problem is when I am running same code from outside the DB it is running perfectly fine but when the same code is loaded into DB and trying to run from DB under these environment I am using for running my code:-
*******************************
JDK 1.4.2_06
JSSE 1.4
Database :- Oracke 10G
*******************************
I am getting following Exception:-
CALL testssl_http_mar20_New();
java.io.IOException:Unable to tunnel through 123.456.789.123:80. Proxy returns "HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.)
at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275
)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect(DashoA12275)
at
com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer(DashoA12275
)
at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l(DashoA12275)
at com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>(DashoA1
2275)
at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>(DashoA
12275)
at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275
)
at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA12275
)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect(DashoA122
75)
at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream(Da
shoA12275)
at java.net.URL.openStream(URL.java:924)
at SecureURLhttp_Mar20_New.SecureURLhttp_Mar20_New(
source code is below :-
import java.io.*;
import java.net.*;
import java.security.*;
import java.util.*;
publicclass SecureURLhttp
{
publicstaticvoid main(String[] args)throws Exception
{
SecureURLhttp r =new SecureURLhttp();
r.SecureURLhttp();
}
publicstaticvoid SecureURLhttp()throws IOException
{
System.setProperty("java.protocol.handler.pkgs","oracle.aurora.rdbms.url|com.sun.net.ssl.internal.www.protocol");
System.setProperty("https.proxySet","true");
Authenticator.setDefault(new MyAuthenticator());
System.setProperty("https.proxyHost","123.456.789.123");
System.setProperty("https.proxyPort","80");
// URL verisign = new URL("https://login.oracle.com/");
URL verisign =new URL("https://www.verisign.com");
BufferedReader in =new BufferedReader(new InputStreamReader(verisign.openStream()));
String inputLine;
while ((inputLine = in.readLine()) !=null)
System.out.println(inputLine);
in.close();
/* Code Newly Add for checking the system property*/
java.util.Properties props = System.getProperties();
java.util.Enumeration propNames = props.propertyNames();
while (propNames.hasMoreElements ())
{
Object o= propNames.nextElement();
String name = (String ) o;
String val = props.getProperty(name);
System.out.println ( name +" = " + val );
}
}
privatestaticclass MyAuthenticatorextends Authenticator{
protected PasswordAuthentication getPasswordAuthentication(){
returnnew PasswordAuthentication("<USERNAME>",new String("<USER_PASSWORD>").toCharArray());
}
}
}
Please help me out:
Thanks a lot in advance.

