help one jdbc# Database - 数据库
a*s
1 楼
My code is her:
con = DriverManager.getConnection(url,"root","");
System.out.println("Got Connection");
Statement stmt = con.createStatement();
When I run it,
it print out got connection,
but throws an exception:
Exception occurred during event dispatching:
java.lang.InstantiationError: org/gjt/mm/mysql/Statement
at org.gjt.mm.mysql.Connection.createStatement(Compiled Code);
So apparently, the Connection con may be an invalid object.
Could someone help me on this?
con = DriverManager.getConnection(url,"root","");
System.out.println("Got Connection");
Statement stmt = con.createStatement();
When I run it,
it print out got connection,
but throws an exception:
Exception occurred during event dispatching:
java.lang.InstantiationError: org/gjt/mm/mysql/Statement
at org.gjt.mm.mysql.Connection.createStatement(Compiled Code);
So apparently, the Connection con may be an invalid object.
Could someone help me on this?