Re: Strange error while connecting to Database
Posted by: Mark Matthews
Date: April 05, 2005 02:55PM

b.winkler wrote:
[snip]
> i get this exception, even when i start the applet
> on the system where the database run's. but when i
> tell the applet there to connect to localhost
> instead of connecting to the ip of the system,
> everything is fine and the applet connects to the
> database without problems. sadly i can't let the
> applet alway's connect to localhost, because most
> users will use the applet from other hosts
> connected to the server.

B,

This has everything to do with the applet security model, which doesn't allow programs to make TCP/IP connections to any machine other than the machine the applet was downloaded from. If you downloaded the applet from 'localhost', the JDBC driver can only connect to 'localhost'. If you downloaded it from the IP of your machine, the JDBC driver can only connect to the IP of your machine. If you need to work around this, you need to investigate signed applets, which is beyond the scope of something I can tell you how to do in a forum such as this (search google for 'java signed applets').

Regards,

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Strange error while connecting to Database
April 05, 2005 02:55PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.