Signing the applet will allow the applet to make the connection.  The user
of the applet will have to accept and install the certificate use to sign
the applet.


----- Original Message -----
From: "Carfield Yim" <[EMAIL PROTECTED]>
To: "Paulo Mora de Freitas" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 8:35 AM
Subject: Re: mm.mysql.jdbc-1.2c and applets


> Applet don't allow bulid new socket connection, which will do when you
> make a connection from applet to database.
> The solution is writing a servlet to let applet call it.
>
> On Wed, 17 Jan 2001, Paulo Mora de Freitas wrote:
>
> >
> >  Dear All,
> >
> >  Could someone help me to access my mysql database from an applet with
> > mm.mysql.jdbc-1.2c?
> >
> >  The problem is that when trying to access a mysql database from an
> > applet using Netscape it get an AppletSecurityException (described at
> > end of this message). But the mm.mysql.jdbc-1.2c documentation says that
> > "it allows Java developers to make connections to MySQL servers from
> > both Java applications and applets", so I don't understand what is
> > wrong. The same piece of code works nice if running as an application.
> >
> >  Cheers, Paulo Mora de Freitas.
> >
> > Nestacape error message:
> >
> > netscape.security.AppletSecurityException: security.Couldn't connect to
> > 'aldebaran.in2p3.fr' with origin from 'local-classpath-classes'.
> >   at
> > netscape.security.AppletSecurity.checkConnect(AppletSecurity.java:776)
> >   at java.lang.SecurityManager.checkConnect(SecurityManager.java:718)
> >   at java.net.InetAddress.getAllByName0(InetAddress.java:457)
> >   at java.net.InetAddress.getByName(InetAddress.java:367)
> >   at java.net.Socket.<init>(Socket.java:123)
> > * at org.gjt.mm.mysql.MysqlIO.<init>(MysqlIO.java:114)
> >   at org.gjt.mm.mysql.Connection.<init>(Connection.java:229)
> >   at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
> >   at java.sql.DriverManager.getConnection(DriverManager.java:90)
> >   at java.sql.DriverManager.getConnection(DriverManager.java:146)
> >   at SimpleApplet.paint(SimpleApplet.java:50)
> >   at java.awt.Component.dispatchEventImpl(Component.java:1734)
> >   at java.awt.Container.dispatchEventImpl(Container.java:946)
> >   at java.awt.Component.dispatchEvent(Component.java:1715)
> >   at
> >
java.awt.EventDispatchThread$EventPump.dispatchEvents(EventDispatchThread.ja
va:83)
> >   at java.awt.EventDispatchThread.run(EventDispatchThread.java:135)
> >   at
> >
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(DerivedAppl
etFrame.java:911)
> > SQLException: Cannot connect to MySQL server on aldebaran.in2p3.fr:3306.
> > Is there a MySQL server running on the machine/port you are trying to
> > connect to? (netscape.security.AppletSecurityException)
> > SQLState:     08S01
> > VendorError:  0
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to