We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › connecting to mysql error
Page Index Toggle Pages: 1
connecting to mysql error (Read 574 times)
connecting to mysql error
May 6th, 2008, 8:37am
 
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 !
}
}


Re: connecting to mysql error
Reply #1 - May 6th, 2008, 9:34am
 
are you using eclipse? "org/aspectj/lang/Signature" seems to be the AspectJ runtime .. that is not related to MySQL library as far as i can tell.

Please try running the example from inside Processing IDE.

F
Re: connecting to mysql error
Reply #2 - May 6th, 2008, 9:35am
 
I am running it inside Processing IDE

I did the following as given in the site

(1) download (version 2008-02-03), unzip and put this library into the libraries folder of processing.
(2) download the 3.1 driver from mysql.com.
unpack and put "mysql-connector-java-3.1.14-bin.jar" next to "mysql.jar" in
<sketches>/libraries/mysql/library/
(3) start processing, create a new sketch and import the library.
Re: connecting to mysql error
Reply #3 - May 6th, 2008, 2:36pm
 
yach, this is odd .. what system are you on? which processing version do you use?

F
Re: connecting to mysql error
Reply #4 - May 6th, 2008, 3:34pm
 
I am using windows XP
Processing version 0135
MySQL version 5.0


Do I have to set java paths or changes system variables?
Page Index Toggle Pages: 1