FC4 JDBC Driver Compatibality issue
Hello Everbody,
I have written the following java program. But I am getting "access denied" message eventhough i have given all the access privileges.
=====================================================
import java.sql.*;
class TestDB
{
public static void main(String arg[])
{
try{
Class.forName("org.gjt.mm.mysql.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/jbossportal","portal","portal123");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from test");
while(rs.next())
{
System.out.println(rs.getString(1));
}
}
catch(Exception e){
System.out.println("Error Due to "+e.getMessage());
}
}
}
=====================================================
I have verified that the user can connect to the db via shell
My Configuration:
FC4 with mysql-4.1.11-2 and mysql-connector-java-3.1.4-beta-bin.jar
I am of doubt about the comatibality of the driver. Can anybody help me...
Regards
Kartheek
|