2 Replies Latest reply on Jan 29, 2004 12:41 AM by shweta1000

    sql server xa-datasource giving accessor error

    shweta1000 Newbie

       

      "shweta1000" wrote:
      I have configured a xa-datasource for sql server like
      <xa-datasource>
      <jndi-name>JTS.SITE00.METADATA</jndi-name>
      <xa-datasource-class>com.inet.tds.XDataSource</xa-datasource-class>
      <xa-datasource-property name="unicode">false</xa-datasource-property>
      <xa-datasource-property name="sql7">true</xa-datasource-property>
      <xa-datasource-property name="url">jdbc:inetdae7:2216-FF-ATHENA:1433</xa-datasource-property>
      <application-managed-security/>

      <user-name>wpweb00</user-name>
      <password>wpwebbie</password>

      <xa-datasource-property name="selectMethod">cursor</xa-datasource-property>
      <xa-datasource-property name="DatabaseName">oasiswp00</xa-datasource-property>
      <xa-datasource-property name="ServerName">2216-FF-ATHENA</xa-datasource-property>
      <attribute name="ManagedConnectionFactoryClass">org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory</attribute>

      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <check-valid-connection-sql>select count(*) from sysusers</check-valid-connection-sql>
      </xa-datasource>
      i am able to lookup the datasource but it is giving error on ds.getConnection().
      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))
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:145)
      It works fine for local-tx-datasource.
      I am using opta2000.jar.


        • 1. Re: sql server xa-datasource giving accessor error
          helicojava Newbie

           

          "helicoJava" wrote:
          Hi,
          I use the same JDBC driver.
          I had the same problem and it seems that following sript should solves it:

          <datasources>
          <xa-datasource>
          <jndi-name>JTS.SITE00.METADATA</jndi-name>
          <connection-url>jdbc:inetdae7:2216-FF-ATHENA:1433</connection-url>
          <xa-datasource-class>com.inet.tds.DTCDataSource</xa-datasource-class>
          <xa-datasource-property name="DatabaseName">oasiswp00</xa-datasource-property>
          <xa-datasource-property name="Mode">70</xa-datasource-property>
          <xa-datasource-property name="ServerName">2216-FF-ATHENA</xa-datasource-property>
          <application-managed-security/>
          <!-- not sure if these should be here-->
          <user-name>sa</user-name>
          <password>nms</password>
          </xa-datasource>
          </datasources>

          Vitaly.
          vitaly_l@arelnet.com


          • 2. Re: sql server xa-datasource giving accessor error
            shweta1000 Newbie

             

            "shweta1000" wrote:
            Thanks Vitaly.
            I found the reason for the trouble. The metyhod getXADataSource in class org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory tries to call set method for each of the xa-datasource-property tag. Opta2000 driver does not provide some of the set methods. And hence the error. I corrected the code and it works fine.