Bug#820942: libpostgresql-jdbc-java: NonValidatingFactory missing from JDBC3 driver
Jacob L. Anawalt
janawalt at geckosoftware.com
Wed Apr 13 20:32:50 UTC 2016
Package: libpostgresql-jdbc-java
Version: 9.2-1002-1
Severity: normal
Greetings to the Debian Java Developers,
I recently upgraded a system from Debian 7.0/Wheezy to 8.0/Jessie. The system
hosts an Apache Tomcat instance with a web app (Web ARchive) that talks to a
local network PostgreSQL database using SSL without validation using the
NonValidatingFactory.
After upgrading the database connection would fail with this root cause in the
stack trace:
... 37 more
Caused by: java.lang.ClassNotFoundException: org.postgresql.ssl.NonValidatingFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
org.postgresql.ssl.jdbc3.AbstractJdbc3MakeSSL.convert(AbstractJdbc3MakeSSL.java:44)
... 49 more
It seems that the JDBC3 driver was built without the NonValidatingFactory class.
This is a known issue upstream and will likely be built or may have already been
built against an update that fixes it, but for now this affects Debian 8 users
of libpostgresql-jdbc-java 9.2-1002-1
https://github.com/pgjdbc/pgjdbc/issues/92
Changing my Tomcat lib symlinks to force it to look to the JDBC4 library allows
the non validating SSL connections to work again.
host:tomcat/lib# ln -sf -T ../../java/postgresql-jdbc4.jar postgresql.jar
Thanks,
- Jacob
-- System Information:
Debian Release: 8.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 3.16.0-4-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
libpostgresql-jdbc-java depends on no packages.
libpostgresql-jdbc-java recommends no packages.
Versions of packages libpostgresql-jdbc-java suggests:
pn postgresql <none>
-- no debconf information
More information about the pkg-java-maintainers
mailing list