I am trying to connect to MySQL database through processing.
I followed the example provided in the site
But when I try to connect it gives the following error
java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at de.bezier.sql.SQL.connect(SQL.java:82)
I am trying to connect to mysql in my local computer
I have mysql running and i can connect to it in command prompt
Code:
import de.bezier.sql.*;
import de.bezier.mysql.*;
MySQL msql;
void setup()
{
size( 100, 100 );
// this example assumes that you are running the
// mysql server locally (on "localhost").
//
// replace --username--, --password-- with your mysql-account.
//
String user = "root";
String pass = "root";
// name of the database to use
//
String database = "blogwall";
// name of the table that will be created
//
String table = "keywords";
// connect to database of server "localhost"
//
msql = new MySQL( "localhost", database, user, pass, this );
if ( msql.connect() )
{
println("connected");
}
else
{
// connection failed !
}
}