By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,784 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,784 IT Pros & Developers. It's quick & easy.

cannot connect to mySQL database using an applet

P: n/a
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if necessary.
Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler

Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if necessary. Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #2

P: n/a
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if necessary. Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #3

P: n/a
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if necessary. Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler


An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.
Jul 19 '05 #4

P: n/a
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if


necessary.
Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #5

P: n/a
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if


necessary.
Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #6

P: n/a
Ryan,
Thank you for your quick response. Please tell me how I can make my
applet signed or where I can find out what this means.

Ryan Stewart wrote:
"Jeff Sandler" <ff*******@dslextreme.com> wrote in message
news:10*************@corp.supernews.com...
I have a database I created in mySQL. I've been entering data every day
into the database using a Java application that I wrote. The database
and the Java program are on the same Win 98 SE machine.
I've been working on another program (an applet) to send and receive
data over the internet. I got the applet to connect with the database
and receive data. All the while I was developing the applet, I would
tell it to find the database at 127.0.0.1 if I wasn't connected to the
internet, or I'd give it the current IP address of my connection if I
was. This seemed to work fine all along.
Now that the program is nearing completion, I uploaded a copy of it to
my personal web space to give it a "real-life" try.

http://dslextreme.com/users/ffej2ffej/SQL4/sql4.html

Unfortunately, now I cannot connect to the database. When I try, it
throws an SQLException. The SQLException.toString() returns:

java.sql.SQLException: Unable to connect to any hosts due to exception:
java.security.AccessControlException: access denied
(java.net.SocketPermission 66.159.205.204:3306 connect, resolve)

Does this mean that Windows on my machine is preventing access to the
database? Does it mean the Java applet isn't looking in the right
place? Is there something else wrong? Please let me know. I'd be
happy to upload the entire applet source code or anything else if


necessary.
Also, I think it's important that I mention that the database is not
operational all the time. It will be someday, but right now I just
start it when I need it. Even if it was, I'm using the only phone line
in this house to get online so it's always for a short time.

Jeff Sandler

An Applet can only connect to the host it is running on unless it is signed.
Hence the security exception.


Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.