not able to use SSL with XA datasource

From: "kumar, Anand (kumar)" <kumara(at)avaya(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: not able to use SSL with XA datasource
Date: 2008-08-19 05:41:37
Message-ID: CA47D1D13890F84E872476D063EABCB395E8D6@301081ANEX2.global.avaya.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I am using XA datasource and trying to connect to Postgresql database
over SSL. Application server being used is Jboss eap 4.3. I am getting
error like:

Caused by: org.jboss.resource.JBossResourceException: Could not find
accessor on XADataSource: ; - nested throwable:
(java.lang.NoSuchMethodException:
org.postgresql.xa.PGXADataSource.setSsl(java.lang.String))
at
org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataS
ource(XAManagedConnectionFactory.java:284)
at
org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createMana
gedConnection(XAManagedConnectionFactory.java:136)
... 84 more
Caused by: java.lang.NoSuchMethodException:
org.postgresql.xa.PGXADataSource.setSsl(java.lang.String)
at java.lang.Class.getMethod(Class.java:1581)
at
org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataS
ource(XAManagedConnectionFactory.java:254)
... 85 more
2008-08-18 16:27:17,091 WARN [org.hibernate.cfg.SettingsFactory] Could
not obtain connection metadata
org.jboss.util.NestedSQLException: Could not create connection; - nested
throwable: (org.jboss.resource.JBossResourceException: Could not find
accessor on XADataSource: ; - nested throwable:
(java.lang.NoSuchMethodException:
org.postgresql.xa.PGXADataSource.setSsl(java.lang.String))); - nested
throwable: (org.jboss.resource.JBossResourceException: Could not create
connection; - nested throwable:
(org.jboss.resource.JBossResourceException: Could not find accessor on
XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException:
org.postgresql.xa.PGXADataSource.setSsl(java.lang.String))))
at
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperD
ataSource.java:94)



Details of postgresql:
Version: 8.2
jdbc jar used: postgresql-8.2-506.jdbc3


I have configured the certificates on database server side and have made
necessary changes in postgresql.conf and pg_hba.conf. Server was
restarted after making changes. Server certs were imported in client
keystore and application server pointed to use this keystore on startup.
Below is the content of datasource file used:

<xa-datasource>
<jndi-name>Res1</jndi-name>

<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-cla
ss>
<xa-datasource-property
name="ServerName">148.147.162.57</xa-datasource-property>
<xa-datasource-property
name="PortNumber">5432</xa-datasource-property>
<xa-datasource-property
name="DatabaseName">postgres</xa-datasource-property>
<xa-datasource-property name="Ssl">true</xa-datasource-property>
<xa-datasource-property
name="User">postgres</xa-datasource-property>
<xa-datasource-property
name="Password">postgres</xa-datasource-property>
<track-connection-by-tx/>
</xa-datasource>

Kindly help.

Regards,
Anand.

Browse pgsql-admin by date

  From Date Subject
Next Message c k 2008-08-19 18:01:12 cache lookup failed
Previous Message Goutham Naval 2008-08-18 23:37:30 Problem with reinstall of PostgreSQL 8.3