This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes Problem with connecting a java application from with netbeans to a database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with connecting a java application from with netbeans to a database" Watch "Problem with connecting a java application from with netbeans to a database" New topic
Author

Problem with connecting a java application from with netbeans to a database

Olakunle Oladipo Oni
Greenhorn

Joined: Aug 28, 2008
Posts: 18
A beautiful day to someone out there. Please i'll appreciate someone to give an assistance on how i'm to resolve a problem involving connecting a desktop java application to a database. I had no problem connecting from the application
when it's loaded using the java command line utility. I was able to carry out the necessary processes like insert, delete, update and retrieve from the desktop java application if i loaded using the command line. I transferred the application to my netbeans editor, ran it and it loaded successfully as well. But i sense a logic error somewhere because when i tried inserting data using the destop java application form i kept recieving the message 'No suitable Driver found'. I checked the 'services' window in netbeans, i discovered that a mysql connector/J driver is already bundled with the IDE (Precisely in C:\Program Files\NetBeans 6.5\ide10\modules\ext\mysql-connector-java-5.1.6-bin.jar) because i saw it the drivers node i believe it is added and registered with the IDE already. The version of the connector/J driver i used previously that the program was assessing successfully is mysql-connector-java-5.1.19-bin.jar and i had it in drive C. I had the classpath system variable path for the driver (BOTH THAT FOR THE NETBEANS INSTALLATION PATH and that of the version i used successfully earlier) in place. I kept having the same response of not seeing the suitable driver from within the netbeans IDE. I'LL appreciate if someone can help to point out where the problem is and how to resolve it.

Olakunle Oni
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38441
    
  23
Sounds like a classpath problem.
What is the classpath you use for the command line version of your app, and which connector does it find?
What is the classpath which NetBeans is using?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with connecting a java application from with netbeans to a database