467,076 Members | 1,000 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,076 developers. It's quick & easy.

cannot connect to mySQL database using an applet

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
  • viewed: 3708
Share:
6 Replies
"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
"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
"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
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
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
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.

Similar topics

2 posts views Thread by Krista | last post: by
20 posts views Thread by Mr Dygi | last post: by
5 posts views Thread by apchar | last post: by
4 posts views Thread by bettina@coaster.ch | last post: by
reply views Thread by bunnytail | last post: by
8 posts views Thread by baustin75@gmail.com | last post: by
5 posts views Thread by smatta@acm.org | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.