THAiSi
October 17th, 2007, 02:54 AM
Hi I just bought a new computer and installed 7.10 on it.
I'm working on a web application in Java using Tomcat and MySQL. I installed everything using the repositories.
On 7.04 (my old PC) everything was working fine. Only now my Java code cannot connect to the database. The database is running fine, and I can access it using phpMyAdmin.
But when I connect to the database from my jsp page I get the following exception.
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)
STACKTRACE:
java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
at com.mysql.jdbc.StandardSocketFactory.unwrapExcepti onToProperClassAndThrowIt(StandardSocketFactory.ja va:407)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:268)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2744)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager .java:525)
at java.sql.DriverManager.getConnection(DriverManager .java:193)
I know 7.10 has this appArmor stuff etc but I don't know if that is affecting this because I have no idea what appArmor does.
any pointers of what may go wrong in the connection?
I'm working on a web application in Java using Tomcat and MySQL. I installed everything using the repositories.
On 7.04 (my old PC) everything was working fine. Only now my Java code cannot connect to the database. The database is running fine, and I can access it using phpMyAdmin.
But when I connect to the database from my jsp page I get the following exception.
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)
STACKTRACE:
java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
at com.mysql.jdbc.StandardSocketFactory.unwrapExcepti onToProperClassAndThrowIt(StandardSocketFactory.ja va:407)
at com.mysql.jdbc.StandardSocketFactory.connect(Stand ardSocketFactory.java:268)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.j ava:2744)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonReg isteringDriver.java:285)
at java.sql.DriverManager.getConnection(DriverManager .java:525)
at java.sql.DriverManager.getConnection(DriverManager .java:193)
I know 7.10 has this appArmor stuff etc but I don't know if that is affecting this because I have no idea what appArmor does.
any pointers of what may go wrong in the connection?