• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help on mysql

 
Abhishek Dharwadkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I am using MySQL as a database and am trying to run a sample program to fetch and display data from a table...
I am getting the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at com.sitepoint.ToDoList.<init>(ToDoList.java:12)
at com.sitepoint.ToDoTest.main(ToDoTest.java:6)

Is this a classpath problem. I am using eclipse ide to run the project. Also i am using the following driver: mysql-connector-java-3.1.13-bin-g.jar

Here is the driver and connection string i am using:
"com.mysql.jdbc.Driver", "jdbc:IJDB://localhost/TODO?user=db2admin&password=db2admin"

Please help me resolve.

Also when i try to run it from command i get the following:
The java class could not be loaded. java.lang.UnsupportedClassVersionError:

Thanks & Regards,
Abhi.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34870
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abhi,
It sounds like there are two issues here.

java.lang.NoClassDefFoundError: org/aspectj/lang/Signature

This is telling you that some class uses AspectJ. This is an Aspect Oriented Programming framework. You need in your classpath in addition to the mysql jar.

The java class could not be loaded. java.lang.UnsupportedClassVersionError:

This may be telling you that you are using a jar file that was compiled against a version of java greater than the one you are running against.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34870
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since these are both classpath issues and not specific to JDBC, I'm going to move this post to our Java in General forum.
 
Abhishek Dharwadkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks,
I found the mistake. I was using the wrong jar file. When i used the correct one it worked.

Thanks a lot you guys,
Abhi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic