Database-connect within a JAR 
Author Message
 Database-connect within a JAR

Hello all,

I have a probem with connecting to an database in the case, that
my applet-class is packed in a JAR-archive. The same source-code,
not in a JAR-file, is running with no problems. But as I am putting
it into a JAR-archive, I am getting a message in the Netscape Java
Console, which look like this:

Netscape Communications Corporation -- Java 1.1.5
Type '?' for options.
Symantec Java! ByteCode Compiler Version 210.065
Copyright (C) 1996-97 Symantec Corporation
Hallo_2 security.Couldn't connect to 'NTSV03' with origin from ''.
  at java.lang.Throwable.<init>(Compiled Code)
  at java.lang.Exception.<init>(Compiled Code)
  at java.lang.RuntimeException.<init>(Compiled Code)
  at java.lang.SecurityException.<init>(Compiled Code)
  at<init>(Compiled Code)
  at<init>(Compiled Code)
  at Code)
  at Code)
  at Code)
  at java.lang.SecurityManager.checkConnect(Compiled Code)
  at Code)
  at Code)
  at<init>(Compiled Code)
  at oracle.sqlnet.SQLnet.Connect(Compiled Code)
  at oracle.sqlnet.SQLnet.Connect(Compiled Code)
  at oracle.sqlnet.SQLnet.Connect(Compiled Code)
  at oracle.jdbc.ttc7.TTC7Protocol.connect(Compiled Code)
  at oracle.jdbc.ttc7.TTC7Protocol.logon(Compiled Code)
  at oracle.jdbc.driver.OracleConnection.<init>(Compiled Code)
  at oracle.jdbc.driver.OracleDriver.connect(Compiled Code)
  at java.sql.DriverManager.getConnection(Compiled Code)
* at java.sql.DriverManager.getConnection(Compiled Code)
  at Haupt_applet.init(Compiled Code)
  at netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled Code)
  at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
  at Code)
  at netscape.applet.DerivedAppletFrame$ Code)

The source-code of the applet look like this:

import java.applet.*;
import java.sql.*;
import java.awt.*;

public class Haupt_applet extends Applet {

        public void init()
            Connection con_to;
                Connection con_from;

                setBackground(new Color(12632256));

        //      StDtVerwaltung StDtVerw = new StDtVerwaltung();

                try {


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






        //          StDtVerw.Datenbank_anlegen(con_to);



                    catch ( e) {

                    catch (java.lang.Exception ex) {



As you are able to see, I am using der Capability-class from Netscape, to get the
UniversalConnect-Privilege, which let me connect to the database server. But only, if I am not
putting my Applet in a JAR-archive!! And this is the problem.

I would be very glad, if you could help me please or if you could show me some place in WWW, where
I get help on this.

Waiting for your answer,



Dirk Uebber                         phone: +49 7031 873 534
Sindelfingen                        fax  : +49 7031 873 535


Mon, 18 Dec 2000 03:00:00 GMT
 [ 1 post ] 

 Relevant Pages 

1. Connect to Oracle database from within VB

2. Using user's oracle credentials to connect to database within BMP

3. Database applet and signed jar

4. Can't connect to SQLServer using a dataSource within a Session bean

5. Possible to connect to ODBC within TSQL?

6. connecting to linked server from within trigger

7. connecting within a workgroup

8. Error connecting to SQL Server 7.0 from within a class

9. Connecting from within VCPP in debug mode

10. Connect remote db within PL/SQL

11. Connect/Disconnect db within procedure

Powered by phpBB® Forum Software