4 Replies Latest reply on Oct 18, 2013 11:31 PM by masilamani

    oracle XA datasource error

    vivedha

      Hi all,

      I am using Eclipse indigo 4.2.1, teiid designer 7.8,Teiid runtime 7.7.5 to create REST easy web service with external materialised view.I created a local datasource(ORACLE) for the mat view and executed the VDB.In this SELECT operation is working fine, while

      INSERT INTO fedmatview.sitdr.fedmatview ( select * from fedview.fedtable option nocache) is showing error

       

      Remote org.teiid.core.TeiidProcessingException: farmatview: Transaction is not active: tx=TransactionImple < ac, BasicAction: -748b6731:a6db:5246d5a5:7bb status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -748b6731:a6db:5246d5a5:7bb status: ActionStatus.ABORTED >)

       

      I tried to use XA datasource(ORACLE) to connect to table located in the oracle database.I tried using different XA datasource available in the

      http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.teiid/teiid/8.0.0.Final/jboss-as7/docs/teiid/datasources/oracle/oracle-xa-ds.xml

      But I get errors as network adapter couldn't create connection, URL is incorrect etc.

      help me to find the right XA ORACLE datasource for oracle thin client with SID.

      I have attached the error log..

        • 1. Re: oracle XA datasource error
          rareddy

          What I can check online with other sources the example template given is correct. Can you post your -ds.xml contents here?

          • 2. Re: oracle XA datasource error
            vivedha

            Sorry Ramesh for the late reply.

            The following is the XA oracle data source that I have used

            <datasources>

                <xa-datasource jndi-name="extmatviewDS" pool-name="OracleDS" enabled="true" use-java-context="true" use-ccm="true">

                    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                    <xa-datasource-property name="URL">jdbc:oracle:thin:aaaaaa:11111:bbbbbb</xa-datasource-property>

                    <driver>ojdbc6.jar</driver>

                  

                    <!--

                    <new-connection-sql>select * from dual</new-connection-sql>

                    <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                     -->

                           

                    <xa-pool>

                        <min-pool-size>10</min-pool-size>

                        <max-pool-size>20</max-pool-size>

                        <is-same-rm-override>true</is-same-rm-override>

                        <prefill>false</prefill>

                        <use-strict-min>false</use-strict-min>

                        <flush-strategy>FailingConnectionOnly</flush-strategy>

                        <no-tx-separate-pools/>

                    </xa-pool>

             

                    <security>

                        <user-name>xxxxx</user-name>

                        <password>yyyyyyy</password>

                        <!--

                        <security-domain>mysecurity-realm</security-domain>

                        -->

                    </security>

                   

                    <!--

                    <validation>

                        <check-valid-connection-sql>select * from dual</check-valid-connection-sql>

                    </validation>

                     -->

                </xa-datasource>              

            </datasources>

            • 3. Re: Re: oracle XA datasource error
              shawkins

              I think that your definition looks good.  Is your URL of the format - jdbc:oracle:thin:@<IP of database system>:1521:SID

              • 4. Re: oracle XA datasource error
                masilamani

                The JDBC URL for Oracle data source is incorrect and format is shown below.

                 

                For using servicename:    jdbc:oracle:thin:@<hostname>:<port#>/servicename

                For using SID:                 jdbc:oracle:thin:@<hostname>:<port#>:sid