1 Reply Latest reply on Mar 6, 2008 10:38 AM by Chip Holden

    cannot get XA connection using PostgreSQL on JBoss4.0.5

    Shantanu Sen Newbie

      I have deployed a PostgreSQL datasource on JBoss 4.0.5 appserver with the following deployment descriptor ..
      ==
      ....
      <xa-datasource>
      <jndi-name>/test/postgres(XA)</jndi-name>
      <track-connection-by-tx/>
      <isSameRM-override-value>false</isSameRM-override-value>
      <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
      ....
      ====
      When I run my application that is trying to create a connection, I am getting the following error. Is there anything special I need to do for using XA connections with jboss? I have tried using postgresql-8.2-507.jdbc3 and postgresql-8.2-506.jdbc3 but both give the same error.

      ==
      2008-01-15 18:47:54,584 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
      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.setURL(java.lang.String)))
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:164)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:250)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:529)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:301)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
      =====

      Any pointers will be highly appreciated.