While trying to connect to a MySQL Database from Open Office base, you might get the ‘JDBC Driver could not be loaded error’
On Clicking the Test Class Button
It is actually pretty simple to solve.
Download the MySQL Connector jar file from mysql.com and save it to your desktop. You now get the file mysql-connector-java-5.0.8.tar.gz on the desktop
Open up a terminal and try unzipping the file after navigating to the Desktop
sudo tar -xvvzf mysql-connector-java-5.0.8.tar.gz
The tar command unzips the file and creates a directory named mysql-connector-java-5.0.8. Open the folder and you will find the file mysql-connector-java-5.0.8-bin.jar
That is actually the only file we are interested in. Move that file to the external libraries directory for your java runtime environment as below (you may have the modify for your actual runtime version.)
From the Desktop:
sudo mv mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar /usr/lib/jvm/java-1.5.0-sun-1.5.0.14/jre/lib/ext/
The JDBC Connector now works properly

Note: If this doesn’t work, make sure that the correct JVM is selected for Open Office in Tools>Options in any of the Open-Office Applications.



0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.