# Exception under jdk1.1.4 not under jdk1.1.2

WH.Burbach@chw.nl
Wed, 5 Nov 97 16:24:03 CET

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: NM Phase 2.0: "Regarding signed applet"
- Previous message: Info Desk: "Advertisement: Web Site Hosting"

    From: WH.Burbach@chw.nl

    Date: Wed, 5 Nov 97 16:24:03 CET

    To: <java-security@web2.javasoft.com>

    Subject: Exception under jdk1.1.4 not under jdk1.1.2

Dear Sirs,When I run the applet listed below under jdk1.1.2 it works fine,if
i try it under jdk1.1.4 i get an exception. The applet is packedin a signed
java archive. What could it be i am doing wrong?Yours sincerely,Willem
Burbachburbach@chw.nlC:\fnord\www\root\JdbcTry>appletviewer
http://145.44.17.99/JdbcTry.html> outException occurred during event
dispatching:sun.applet.AppletSecurityException: checkconnect.networkhost1
atsun.applet.AppletSecurity.checkConnect(AppletSecurity.java:564)
atsun.applet.AppletSecurity.checkConnect(AppletSecurity.java:606)
atsun.applet.AppletSecurity.checkConnect(AppletSecurity.java:506) at
java.net.Socket.<init>(Socket.java:218) at
java.net.Socket.<init>(Socket.java:97)
atCOM.imaginary.sql.msql.MsqlConnection.connect(MsqlConnection.java:270)
atCOM.imaginary.sql.msql.MsqlConnection.<init>(MsqlConnection.java:46)
atCOM.imaginary.sql.msql.MsqlDriver.connect(MsqlDriver.java:169)
at java.sql.DriverManager.getConnection(DriverManager.java:91) at
java.sql.DriverManager.getConnection(DriverManager.java:134) at
JdbcTry.doDB(JdbcTry.java:46) at
JdbcTry$1.actionPerformed(JdbcTry.java:25) at
java.awt.Button.processActionEvent(Button.java:254) at
java.awt.Button.processEvent(Button.java:227) at
java.awt.Component.dispatchEventImpl(Component.java:1764) at
java.awt.Component.dispatchEvent(Component.java:1704) at
java.awt.EventDispatchThread.run(EventDispatchThread.java:63)//--------------
--------------------- The applet // W. Burbach - juni 1997 // JDBC driver
tester.import java.awt.*;import java.util.*;import java.sql.*;import
java.awt.event.*;import java.net.URL;public class JdbcTry extends
java.applet.Applet { private TextArea ta; private Button start; private
Button quit; public void init() { resize(400,400); start = new
Button("Start"); quit = new Button("Quit"); ta = new TextArea("Applet
started", 20, 50); ta.setEditable(false); add(ta);
start.addActionListener(new ActionListener() { public void
actionPerformed(ActionEvent e) { doDB(); } }); add(start);
quit.addActionListener(new ActionListener() { public void
actionPerformed(ActionEvent e) { System.exit(0); }}); add(quit); }
public void doDB() { int x = 12, y = 12; ResultSet rset = null;
Connection con = null; Statement statement = null; try {
ta.append("Trying to register the driver...\n");
Class.forName("COM.imaginary.sql.msql.MsqlDriver"); ta.append("Creating
URL...\n"); String url = "jdbc:msql://145.44.64.7:1112/tis";
ta.append("Trying to connect to the database...\n"); con =
DriverManager.getConnection (url, "bambi", ""); ta.append("Try to create
a query...\n"); statement = con.createStatement(); ta.append("Try
to execute query...\n"); rset = statement.executeQuery("SELECT * FROM
student " ); y += 12; while(rset.next()) {
ta.append(rset.getInt(1) + " " + rset.getString(2) + " " +
rset.getString(3) + " " +
rset.getString(4) + " " + rset.getString(5) +
"\n"); } ta.append("Release database...\n");
statement.close(); ta.append("Close connection...\n"); con.close();
} catch (SQLException exception) { ta.append("SQLException " +
exception.toString()); } catch (ClassNotFoundException exception) {
ta.append("ClassNotFoundException " + exception.toString()); }
ta.append("Done\n"); }}

- Next message: NM Phase 2.0: "Regarding signed applet"
- Previous message: Info Desk: "Advertisement: Web Site Hosting"