Do you have rights to read that .jar? In your code try to open it as file. Also check if this file is valid jar
archive that contains com/mysql/jdbc/Driver.class
.
While I use PostgreSQL on Windows I can check it with:
import zipfile
def test_jar(jar_file, class_name):
zf = zipfile.ZipFile(jar_file, 'r')
cn = class_name.replace('.', '/') + '.class'
zi = zf.getinfo(cn)
print('%s: %s [b] -> %s [b]' % (zi.filename, zi.file_size, zi.compress_size))
test_jar('c:/jars/postgresql-8.3-603.jdbc4.jar', 'org.postgresql.Driver')
Michał Niklas
2010-02-04 07:21:04