Solved

Java Programming question

Posted on 1997-09-08
1
244 Views
Last Modified: 2011-10-03
Hi
I was trying to run the demo applet JdbcApplet.java for jdbc thin driver using the JDK appletviewer from sun.

The applet came up with the "connection refused" exception on the following line of code:
conn = DriverManager.getConnection (connect_string);

the connect_string had been earlier defined as

static final String connect_string =
                  "jdbc:oracle:thin:myuserid/mypassword@myhost:1525:corvus1";

1525 is the port listed in /etc/services for orasrv
corvus1 is the sid as per our administrator sqlplus.
I was running the applet on a Win95 PC from a DOS window and trying to connect to an Oracle8 database on an AIX box.
Do I need to grant some specific permissions ?

0
Comment
Question by:monal090797
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
EricKaplan earned 50 total points
ID: 1226662
The proper error should be a security exception as applets are allowed to access the host which they ere loaded from and only it.

In any case (even if you run it frm the AIX host), make sure you have loaded the oracle driver (you can debug the client and do a step into driver manager code and see how it iterates over the loaded drivers).

-Eric.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question