Re: registerDriver()
Posted by: Mark Matthews
Date: May 10, 2005 12:59PM

Sean Breslin wrote:
> I tried changing it to an applet, embedding it
> into an html page, and uploading that to my
> webspace at the same domain that I set the
> database up on, and I get a similar looking, but
> longer error.
>
> My connection string:
> "jdbc:mysql://localhost:3306/dbname?user=user&
> password=pass"
>
> The port being 3306 is an assumption. I don't
> actually know how to find out what port the DB is
> listening on, but in most tutorials I find 3306
> seems to be a standard.
>
> Here's the error I get now:
>
> Communications link failure due to underlying
> exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: java.security.AccessControlException:
> access denied (java.net.SocketPermission
> 127.0.0.1:3306 connect,resolve)

That's because for security reasons, applets (unless digitally signed) only allow connections to be made back to the exact same host (including exact IP address) that the applet was downloaded from.

You're in for a world of similar issues if you're going to be trying to deploy applets that need to talk over the network on any protocol other than HTTP.

Maybe if you posted what you're trying to accomplish, we could give you some ideas on how to make it work?

-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
May 09, 2005 07:17PM
May 09, 2005 07:43PM
May 09, 2005 07:56PM
May 09, 2005 08:07PM
May 09, 2005 08:51PM
May 09, 2005 09:04PM
May 10, 2005 11:17AM
May 10, 2005 12:34PM
Re: registerDriver()
May 10, 2005 12:59PM
May 10, 2005 01:19PM
May 10, 2005 01:30PM
May 10, 2005 01:44PM
May 10, 2005 01:52PM
May 10, 2005 02:05PM
May 10, 2005 02:22PM


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.