applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

View: New views
5 Messages — Rating Filter:   Alert me  

applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

by AlexeySmirnov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I use lib mysql-connector-java-5.1.0-bin.jar in my applet. My applet signed.
In appletviewer all Ok. But in browser I have the next exeptions:

Last packet sent to the server was 0 ms ago.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:2001)
    at com.mysql.jdbc.Connection.<init>(Connection.java:716)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
    at com.mysql.jdbc.Connection.getInstance(Connection.java:295)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at MySQL_connector.MySQLQueryRequest(MySQL_connector.java)
    at AEpplet2.makeSeriesChange(AEpplet2.java)
    at AEpplet2.createChart(AEpplet2.java)
    at AEpplet2.panelLoad(AEpplet2.java)
    at AEpplet2.loadGraphics(AEpplet2.java)
    at AEpplet2.start(AEpplet2.java)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 10.0.0.5:3306 connect,resolve)
    at com.mysql.jdbc.StandardSocketFactory.unwrapExceptionToProperClassAndThrowIt(StandardSocketFactory.java:287)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:177)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:262)
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:1926)
    ... 19 more

anybody can help me?

Re: applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

by Luca Ferrari :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 12 July 2007 AlexeySmirnov's cat, walking on the keyboard, wrote:
> Caused by: java.net.SocketException: java.security.AccessControlException:
> access denied (java.net.SocketPermission 10.0.0.5:3306 connect,resolve)

I guess this is the problem: your applet does not have permissions to connect
to host 10.0.0.5. You should grant such permission to your applet (quick
thought).

Luca

--
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/java?unsub=lists@...


Re: applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

by AlexeySmirnov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luca Ferrari wrote:
I guess this is the problem: your applet does not have permissions to connect
to host 10.0.0.5. You should grant such permission to your applet (quick
thought).
I'm understand this, but my applet signed!
Or I must change policy file on my computer(I have an applet)...

how to give this permission to my applet?

sorry my bad english))

Re: applet: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

by AlexeySmirnov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Decision: need move the class files of the driver into applet jar file and sign all.

Thanx, Luca

Error: 'window.document.ygames_applet' is null or not an object

by TexasDahlia :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The above error message shows when I try to get on Yahoo Games.
No one has been able to help me and I'm at my wits end. . . .please help.
Thanks