Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AppletSecurityException

0 views
Skip to first unread message

K. Smith

unread,
Feb 4, 1999, 3:00:00 AM2/4/99
to
Hello,

I was under the understanding that I don't need a certificate to use a
type 3 driver for a client to access a server db. I installed the
RmiJdbc driver in order to run Access on a server and let clients get
data from the database (I know Access isn't the best db but for now we
want to get it working). When I run my applet in appletviewer,
everything is fine, but when I run it in Netscape, I get the below
errors. I would appreciate any insight on this that you can give me.
Thanks!

(Also, I was under the impressino from the website that I downloaded the
drivers from, that the user does not need the driver, only the server. I
asked someone to test my applet from his machine, and it complained
that it didnt have the driver)

Kristi
------


netscape.security.AppletSecurityException: security.Couldn't connect to
'default' with origin from 'local-classpath-classes'.

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 netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurity.checkConnect(Compiled Code)

at java.lang.SecurityManager.checkConnect(Compiled Code)

at sun.rmi.transport.tcp.TCPEndpoint.<init>(Compiled Code)

at sun.rmi.registry.RegistryHandler.registryStub(Compiled Code)

at java.rmi.registry.LocateRegistry.getRegistry(Compiled Code)

* at RmiJdbc.RJConnection.<init>(Compiled Code)

at RmiJdbc.RJDriver.connect(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at CurePage1.openConnection(Compiled Code)

at CurePage1.init(Compiled Code)

at
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
Code)

at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
Code)

at java.awt.EventDispatchThread.run(Compiled Code)

at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

netscape.security.AppletSecurityException: security.Couldn't connect to
'default' with origin from 'local-classpath-classes'.

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 netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurity.checkConnect(Compiled Code)

at java.lang.SecurityManager.checkConnect(Compiled Code)

at sun.rmi.transport.tcp.TCPEndpoint.<init>(Compiled Code)

at sun.rmi.registry.RegistryHandler.registryStub(Compiled Code)

at java.rmi.registry.LocateRegistry.getRegistry(Compiled Code)

* at RmiJdbc.RJConnection.<init>(Compiled Code)

at RmiJdbc.RJDriver.connect(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at CurePage1.openConnection(Compiled Code)

at CurePage1.init(Compiled Code)

at
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
Code)

at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
Code)

at java.awt.EventDispatchThread.run(Compiled Code)

at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

netscape.security.AppletSecurityException: security.Couldn't connect to
'default' with origin from 'local-classpath-classes'.

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 netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurityException.<init>(Compiled Code)

at netscape.security.AppletSecurity.checkConnect(Compiled Code)

at java.lang.SecurityManager.checkConnect(Compiled Code)

at sun.rmi.transport.tcp.TCPEndpoint.<init>(Compiled Code)

at sun.rmi.registry.RegistryHandler.registryStub(Compiled Code)

at java.rmi.registry.LocateRegistry.getRegistry(Compiled Code)

* at RmiJdbc.RJConnection.<init>(Compiled Code)

at RmiJdbc.RJDriver.connect(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

at CurePage1.openConnection(Compiled Code)

at CurePage1.init(Compiled Code)

at
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
Code)

at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
Code)

at java.awt.EventDispatchThread.run(Compiled Code)

at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

java.sql.SQLException: security.Couldn't connect to 'default' with
origin from 'local-classpath-classes'. occurred in OpenConnection while
trying to create connection with //default

java.sql.SQLException: security.Couldn't connect to 'default' with
origin from 'local-classpath-classes'.

at java.lang.Throwable.<init>(Compiled Code)

at java.lang.Exception.<init>(Compiled Code)

at java.sql.SQLException.<init>(Compiled Code)

at RmiJdbc.RJDriver.connect(Compiled Code)

at java.sql.DriverManager.getConnection(Compiled Code)

* at java.sql.DriverManager.getConnection(Compiled Code)

at CurePage1.openConnection(Compiled Code)

at CurePage1.init(Compiled Code)

at
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
Code)

at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
Code)

at java.awt.EventDispatchThread.run(Compiled Code)

at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

con was null

java.lang.NullPointerException occurred in exec. Command was : Select *
from ReferringPhysicians;

Error during filling in choiceBox: null

Martin Vonwald

unread,
Feb 7, 1999, 3:00:00 AM2/7/99
to
> I was under the understanding that I don't need a certificate to use a
> type 3 driver for a client to access a server db. I installed the
> RmiJdbc driver in order to run Access on a server and let clients get
> data from the database (I know Access isn't the best db but for now we
> want to get it working). When I run my applet in appletviewer,
> everything is fine, but when I run it in Netscape, I get the below
> errors. I would appreciate any insight on this that you can give me.
> Thanks!

The problem isn't the database driver, it is RMI. An applet is only allowed to
open a connection to its server. As I can see out of the error message you have
started the applet from your local disk. In that case it doesn't have access to
any server. The reason why the applet runs in the appletviewer is that
appletviewer doesn't implement ANY security. If you want to try your applet, you
have to put it on the same webserver as the database runs.

> (Also, I was under the impressino from the website that I downloaded the
> drivers from, that the user does not need the driver, only the server. I
> asked someone to test my applet from his machine, and it complained
> that it didnt have the driver)

You have to put the driver classfiles on the server so the client can download
it when it needs them.

e9425626.vcf

K. Smith

unread,
Feb 8, 1999, 3:00:00 AM2/8/99
to

Martin Vonwald wrote:
>
> > I was under the understanding that I don't need a certificate to use a
> > type 3 driver for a client to access a server db. I installed the
> > RmiJdbc driver in order to run Access on a server and let clients get
> > data from the database (I know Access isn't the best db but for now we
> > want to get it working). When I run my applet in appletviewer,
> > everything is fine, but when I run it in Netscape, I get the below
> > errors. I would appreciate any insight on this that you can give me.
> > Thanks!
>

> The problem isn't the database driver, it is RMI. An applet is only allowed to
> open a connection to its server. As I can see out of the error message you have
> started the applet from your local disk. In that case it doesn't have access to
> any server. The reason why the applet runs in the appletviewer is that
> appletviewer doesn't implement ANY security. If you want to try your applet, you
> have to put it on the same webserver as the database runs.
>

Currently I am testing it from my own machine--i.e. I have it installed
on my
machine and am running it from my machine. So, I am running it from the
same machine that the DB is on. (I can understand this error if I open
the URL as a file, but I am entering it as http://default:8000/etc...

> > (Also, I was under the impression from the website that I downloaded the


> > drivers from, that the user does not need the driver, only the server. I
> > asked someone to test my applet from his machine, and it complained
> > that it didnt have the driver)
>

> You have to put the driver classfiles on the server so the client can download
> it when it needs them.

So, I should be safe adding the jar file to the directory that the
applets are in, correct?


Thanks...

Martin Vonwald

unread,
Feb 9, 1999, 3:00:00 AM2/9/99
to
"K. Smith" schrieb:

> Currently I am testing it from my own machine--i.e. I have it installed
> on my
> machine and am running it from my machine. So, I am running it from the
> same machine that the DB is on. (I can understand this error if I open
> the URL as a file, but I am entering it as http://default:8000/etc...

It doesn't matter that you are running it from the same machine. The problem is your
are trying to access http://default... from an applet which is not loaded from
http://default...

> > > (Also, I was under the impression from the website that I downloaded the


> > > drivers from, that the user does not need the driver, only the server. I
> > > asked someone to test my applet from his machine, and it complained
> > > that it didnt have the driver)
> >

> > You have to put the driver classfiles on the server so the client can download
> > it when it needs them.
>
> So, I should be safe adding the jar file to the directory that the
> applets are in, correct?

If you have jar files you have to specify them in the archive-tag. Only putting it in
the directory won't work.

e9425626.vcf
0 new messages