Jython on Linux: driver [org.postgresql.Driver] not found
I have a Jython script properly running on a Windows 7 machine with PostgreSQL 9. Trying to run the same script on RHE5 Linux with PostgreSQL 8.2 yields the error
zxJDBC.DatabaseError: driver [org.postgresql.Driver] not found
I trie开发者_如何转开发d running the script like so:
CLASSPATH=$CLASSPATH:/path/to/postgresql.jar /path/to/jython /path/to/script.py
I also tried setting PYTHONPATH and JYTHONPATH similarly, all yielding the same error.
What am I doing wrong?
I think I resolved this. The issue was that I used the wrong driver version. Even though psql --version
says 8.2 and even though that's the jar version I downloaded, using the 7.4 version of the driver resolved the issue.
精彩评论