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.java:83)
>   at java.awt.EventDispatchThread.run(EventDispatchThread.java:135)
>   at
> 
>netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(DerivedAppletFrame.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

Reply via email to