Applet trying to connect to Oracle DB

Hello!

I am trying to access an Oracle 8i database from an Applet. The problem is that the following exception is reported in IE 5.5

and the Applet is not run.

exception: com.ms.security.SecurityEceptionEx[oracle/net/nt/TcpNTAdpater.connect]:cannot access "pc38"

(where my database is being hosted on the intranet at a NT workstation called pc38). The applet does not seem to be able to connect to the datase due to security reason).

In Netscape no exception is shown in the Java Console but the Applet is not run anyway.

What do I have to do for the Applet to be able to connect to the database. The code for the Applet and the HTML file have been appended to this message.

Thanx in advance

Saad

/*********************************Applet*******************************/

String serviceName="ora816";

String hostName="pc38";

String userName="ipweb355";

String password="ipweb355";

String port="1521";

Connection conn=null;

try

{

java.sql.DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());

String url = "jdbc:oracle:thin:@"+this.hostName+":"+this.port+":"+this.serviceName;

System.out.println("url = "+url+ " UserName = "+this.userName+ " password = "+this.password+" port = "+this.port );

conn = java.sql.DriverManager.getConnection(url, this.userName, this.password);

}

public void paint(Graphics g){

g.drawString("HI there",20,20);

try{

Connection con = conn;

Statement stmt = con.createStatement();

ResultSet rs = stmt.executeQuery("Select COUNT(*) AS NUM_ROWS from TABLE_ONE");

rs.next();

String temp = rs.getString("NUM_ROWS");

g.drawString(temp,100,20);

}

catch(SQLException e){

g.drawString(e.getMessage(),20,20);

}

/*********************************************************************/

/********************HTML*********************************************/

<HTML>

<HEAD>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">

<TITLE>

HTML Test Page

</TITLE>

</HEAD>

<BODY>

testApplet will appear below in a Java enabled browser.

<APPLET

CODEBASE = "D:\IPWeb\Swings\TreeApplet\src"

ARCHIVE = "classes111.zip"

CODE= "testApplet.class"

NAME= "TestApplet"

WIDTH= 400

HEIGHT= 300

HSPACE= 0

VSPACE= 0

ALIGN= middle

>

</APPLET>

</BODY>

</HTML>

<!--the classes111.zip is being send in the Archive file so that the java.lang.ClassNotFound Exception is not reported-->

/*********************************************************************/

[3285 byte] By [saad_tawwab] at [2007-9-26 4:19:20]
# 1
I ran into the same problem . If any one know how to solve this problem , please let me know . Thank you very much in advance.
vinhminh2002 at 2007-6-29 17:21:52 > top of Java-index,Security,Signed Applets...
# 2
I Assume that you connect to database without using socket.if that so, you have to install Oracle Client on the client side, and configuring Listener to the server on Net8 Configuration Assistant
Baim at 2007-6-29 17:21:52 > top of Java-index,Security,Signed Applets...
# 3
I Assume that you connect to database without using socket.if that so, you have to install Oracle Client on the client side, and configuring Listener to the server on Net8 Configuration Assistant
Baim at 2007-6-29 17:21:52 > top of Java-index,Security,Signed Applets...
# 4
I think you are using an old oracle JDBC driver. Try classes12.zip instead of classes111.zip; i think thats then one u need for ORACLE 8i
stuartianmac at 2007-6-29 17:21:52 > top of Java-index,Security,Signed Applets...