File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Exception in thread "main" java.lang.NoClassDefFoundError: ListMovies (wrong name" Watch "Exception in thread "main" java.lang.NoClassDefFoundError: ListMovies (wrong name" New topic
Author

Exception in thread "main" java.lang.NoClassDefFoundError: ListMovies (wrong name

mike smithtwo
Greenhorn

Joined: Sep 20, 2010
Posts: 1
I get the no class def error when i try connect to Mysql with java program. I can access the Mysql database from commnad line.

environment variable CLASSPATH: .;C:\mysql\mysql-connector-java-5.1.13-bin.jar

The code is below:
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"mike smithtwo",
Please check your Private Messages for an important administrative matter.

And welcome to the ranch ! When you want to post some source, please UseCodeTags. This will make your source more readable. I'll add them for you this time.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The class called ListMovies is not found in your classpath. This has nothing to do with your JDBC connection. Where is this class ?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception in thread "main" java.lang.NoClassDefFoundError: ListMovies (wrong name
 
Similar Threads
Query about Connection interface
Reducing the amounts of connections
is exist any multi record catalogue? or better to use DB? or array?
java jdbc
No suitable driver found for jdbc:oracle:thin:@localhost:1521:Indu