BUG #12823: jdbc4.jar caues java.lang.ClassCastException

From: Daniel(dot)Warren(at)gdc4s(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12823: jdbc4.jar caues java.lang.ClassCastException
Date: 2015-03-03 17:45:06
Message-ID: 20150303174506.2546.11348@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12823
Logged by: Daniel Warren
Email address: Daniel(dot)Warren(at)gdc4s(dot)com
PostgreSQL version: 9.2.0
Operating system: Linux
Description:

Our SSLSocketFactory. createSocket() creates
org.mozilla.jss.ssl.SSLSocket.

I had been using the postgresql-9.1-903.jdbc4.jar with no problems.

When I upgraded to postgresql 9.3 with the postgresql-9.3-1102-jdbc4.jar I
started getting the exception
java.lang.ClassCastException: org.mozilla.jss.ssl.SSLSocket cannot be cast
to javax.net.ssl.SSLSocket
at
org.postgresql.ssl.jdbc4.AbstractJdbc4MakeSSL.convert(AbstractJdbc4MakeSSL.java:117)

It looks in postgresql 9.2 AbstractJdbc4MakeSSL.convert

Socket newConnection = factory.createSocket

was changed to

SSLSocket newConnection = (SSLSocket)factory

which causes the java.lang.ClassCastException.

Browse pgsql-bugs by date

  From Date Subject
Next Message analeonpalacio 2015-03-03 18:53:36 BUG #12824: Error during uninstall
Previous Message Ha Quan Le 2015-03-03 17:03:21 Re: BUG #12821: Cannot install xlogdump