Problem with connecting a java application from with netbeans to a database
Olakunle Oladipo Oni
posted 3 years ago
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.
posted 3 years ago
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?