[armedbear-devel] Connection to database via JDBC and classpath

Francisco Vides Fernández fvides at igaleno.com
Thu May 17 21:04:01 UTC 2012


Hello everyone

I intend to use ABCL in one of my projects. I've started to connectiing
to a postgresq database via jdbc. I've tried something like:

-------8<-------
(add-to-classpath
 (merge-pathnames
#p".m2/repository/postgresql/postgresql/8.4-702.jdbc4/postgresql-8.4-702.jdbc4.jar"

          (user-homedir-pathname)))

(jstatic "forName" "java.lang.Class"  "org.postgresql.Driver")
-------8<-------

But it always returns
-------8<-------
Java exception 'java.lang.ClassNotFoundException: org.postgresql.Driver'.
   [Condition of type JAVA-EXCEPTION]
-------8<-------
The jar file exists, and has the proper class inside. I've read the
manual, and googled a bit, but still get the same error. I'm using
Ubuntu Linux,  with OpenJDK 1.6.0_24, and the latest and greatest ABCL
downloaded as a binary from ABCL website. Can someone point me what I'm
doing wrong?

Many thanks for this great project!!


-- 
+-----------------
| Francisco Vides Fernández <fvides at neoclinic.es>
| Director Ejecutivo
| Teléfono fijo:   952 60 29 59
| Fax:             952 60 29 59
| Neoclinic http://www.neoclinic.es/
+------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20120517/8231ce90/attachment.html>


More information about the armedbear-devel mailing list