Distributed transactions/jdbc problem WL60

Hi
          Our company has aworking application running on WLS5.1sp9.
          Im in the process of migrating it to WL6.0sp2.
          Our domain has 2 clusters each running 2 servers:
          1) servlet engines (handling http requests from clients, running servlets
          and jsp's)
          2) ejb containers (runnigour entities and session beans, working with Oracle
          8i database using connection pool and TxDataSource)
          The scenario:
          - a client request invokes a servlet on one of the servlet engines.
          - the servlet opens a jndi context to one of the ejb containers
          - the servlet open a transaction on a UserTransaction stub on that ejb.
          - then the servlet calls an entity bean using a home interface looked up
          using the same context.
          - the entity bean uses DataSource lookup in its own servers jndi to rerieve
          a connection.
          and then i get the following exception:
          java.sql.SQLException: No default driver for database type:
          jdbc:weblogic:jts
          at
          weblogic.jdbcbase.t3.Driver.seeIfWeNeedToInferDriverNameAndUrlFrom(Driver.ja
          va:456)
          at weblogic.jdbcbase.t3.Driver.getAllPropsFrom(Driver.java:255)
          at weblogic.jdbcbase.t3.Driver.connect(Driver.java:75)
          at weblogic.jdbcbase.jts.Driver.createRemoteConnection(Driver.java:199)
          at weblogic.jdbcbase.jts.Driver.connect(Driver.java:134)
          at
          weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
          :44)
          at com.unisfair.util.DBHelper.getConnection(DBHelper.java:43)
          the transaction toString() gives:
          transaction=(IdHash=7541556,Name = [EJB
          UserBeanImpl.generateSessionSuffix()],Xid=2:b53da78d3c1badbb,Status=Active,n
          umRepliesOwedMe=0,numRepliesOwedOthers=1,seconds since begin=0,seconds
          left=30,activeThread=Thread[ExecuteThread: '8' for queue: 'default',5,Thread
          Group for Queue:
          'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=new,assig
          ned=none),SCInfo[ejb2]=(state=active),SCInfo[servlet2]=(state=active),SCInfo
          [ejb1]=(state=active),properties=({weblogic.transaction.name=[EJB
          UserBeanImpl.generateSessionSuffix()], weblogic.jdbc=t3://10.0.0.31:7007}))
          However the error happens on the other ejb server 10.0.0.33:7007
          It seems that the jts driver tries to get a remote connection on the server
          that coordinates the transaction but uses the deprecated t3 driver.
          I hope someone can help us since this problem is a good enough reason for us
          not moving on to WL6.0 we also looked at WL6.1 Beta and theres nothing new
          about it either.
          thanks
          Dror Last
          Senior Software Engineer
          Unisfair Inc.
          12 Yad Haruzim St. Tel Aviv 67778 Israel
          Tel: +972-3-5373738 Ext. 243
          Fax: +972-3-5373731
          GSM: +972-55-723710
          mailto:[email protected]
          http://www.unisfair.com/
          

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
it mentioned that it supports "distributed transactions".
As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
The two branches of the transaction are coordinated using 2-phase commit.
For samples look under
$ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
null

Similar Messages

  • Distributed transaction (JDBC+JMS), durable MDB, NullPointException in weblogic

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

              I am cross posting to transaction & jms, sorry if this is a mistake...
              We have a setup where JMS messages are published to a topic. The posting is transacted
              (XA) and is a consequence of a CMP update so JMS and JDBC (Oracle OCI) cooperate
              to commit, or not.
              Most of the time, transactions issue just a few JMS messages but at least once
              a day, we issue hundred of thousands of such messages (max has been about 600000
              but typically 300000).
              Our setup is four instances of Weblogic 6.1SP3 (two clustered, two not), the topic
              is on one of them (all 3 other servers connect to that instance to publish) and
              we have a couple MDBs deployed only on the instance that has the JMSServer and
              they all listen to the local topic. The transactionnal settings of these MDBs
              is CMT and XA (because the beans will write to the DB). Furthermore, these MDB
              have been setup to be durable. One of these is just a logger MDB with 20 instances
              max.
              It worked fine for a couple weeks but we have been running into problems for the
              past two days. All of a sudden, the server no longer responds to weblogic.ADMIN
              PING. The server log indicates the following error repetitively (MB of logs just
              of this)
              ####<13 nov. 03 23:15:41 CET> <Alert> <JMS> <XXXXXXX> <send1> <ExecuteThread:
              '32' for queue: 'default'> <> <> <040060> <JMSServer "OutputServerSend1", unhandled
              exception during rollback, java.lang.NullPointerException.>
              java.lang.NullPointerException
              at weblogic.jms.backend.BEDurableTopicMessageInfo.rollbackReceiveTran(BEDurableTopicMessageInfo.java:352)
              at weblogic.jms.backend.BEXATranEntrySubscribe.startRollback(BEXATranEntrySubscribe.java:145)
              at weblogic.jms.backend.BEXATranEntry.execute(BEXATranEntry.java:127)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              The logger MDB seems to have started processing the JMS messages. This means that
              the transaction that included the JMS message publishing must have commited. Unfortunatly,
              there are only 20 log lines before the server restart, so the server must have
              hanged although it did commit the messages processed by the logger since the log
              messages are apparently not repeated. I have no idea why. I think this is coherant
              with the fact that exception above seems to relate to subscribers.
              When we restart the server, the topic gets purged and seem to be processed (we
              have not found a way to verify that each message has been processed but it's looking
              good)
              Any ideas ?
              Thanks
              Philippe
              

  • Problem: [Microsoft][ODBC SQL Server Driver][SQL Server]The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.

    Hi Gurus,
    I have this problem in my MS SQL Server 2012 that is running in SQL Server 2008 R2 Enterprise 64 bit.. Not sure why... Here is the full details of the error:
    Microsoft OLE DB Provider for ODBC Drivers 80040E14
    [Microsoft][ODBC SQL Server Driver][SQL Server]The Microsoft Distributed Transaction Coordinator (MS DTC) has cancelled the distributed transaction.
    /Libraries/DBA/DBA.asa, line 717
    Line 717 is this:
    rs.open destTableName,,,,adCmdTable
    Full details of the code:
        'Field object used to iterate through each field of the rs
        dim rs, fld
        'call dbInitRS(rs)
        set rs = server.createobject("adodb.recordset")
        'On Error Resume Next
        'Open rs
        set rs.activeConnection = myConnection
        rs.cursorType = adOpenKeyset
        rs.lockType = adLockOptimistic
        'rs.open destTableName
        rs.open destTableName,,,,adCmdTable
        'if err.number <> 0 then
        '    goto HandleError
        'end if
        rs.addNew
    Any ideas how to solve this problem?
    Thanks

    Still does not work. I have allow MSDSTC in my firewall list.
    Hi dudskie,
    Have you try to use DTCTester or DTCPing to verify MSDTC functionality over the network? Please refer to the following article:
    Troubleshooting Problems with MSDTC:
    http://msdn.microsoft.com/en-us/library/aa561924.aspx
    Use the DTCTester utility to verify transaction support between two computers if SQL Server is installed on one of the computers. The DTCTester utility uses ODBC to verify transaction support against a SQL Server database. For more information about
    DTCTester see How to Use DTCTester Tool.
    Use DTCPing to verify transaction support between two computers if SQL Server is not installed on either computer. The DTCPing tool must be run on both the client and server computer and is a good alternative to the DTCTester utility when SQL Server
    is not installed on either computer. For more information about DTCPing, see
    How to troubleshoot MS DTC firewall issues.
    If you have any feedback on our support, please click
    here.
    Hope this helps.
    Regards,
    Elvis Long
    TechNet Community Support

  • Problem with ORA-02046: distributed transaction already begun

    I can use db link from the source machine but not the vice versa, throws ORA-02046. I restarted Oracle, rebooted the
    machine, yet ORA-02046 persists. No entries in dba_2pc_pending in any (target, db-linking) machines. Can anybody suggest how
    can I resolve this issue? It is eating out our production time.
    Thanks in advance,

    I had already checked the link, Thanks.
    I bounced Oracle in the suspicious (one that was doubted to have started the distributed transaction) machine, then it resolved the issue.
    Thanks

  • EJB 3.0 and JTA (Distributed transactions)

    hi, first of all sorry for my english.
    then :)
    i'm working with JBoss Aplication Server an Oracle DataBase using EJB 3.0
    i have no problem before ... but now i want work with multiple database and i wand to manage transactions ... how i understand JTA (Java Transaction Api) is a technology for it.
    i think that i need two datasource file for example oracle-xa-ds.xml and postgres-ds.xml
    <datasources>
      <xa-datasource>
        <jndi-name>XAOracleDS</jndi-name>
        <track-connection-by-tx/>
        <isSameRM-override-value>false</isSameRM-override-value>    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
        <xa-datasource-property name="URL">jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo</xa-datasource-property>
        <xa-datasource-property name="User">paata</xa-datasource-property>
        <xa-datasource-property name="Password">1982226</xa-datasource-property>   <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
        <no-tx-separate-pools/>
          <metadata>
             <type-mapping>Oracle9i</type-mapping>
          </metadata>
      </xa-datasource>
      <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
             name="jboss.jca:service=OracleXAExceptionFormatter">
        <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
      </mbean>
    </datasources>
    <datasources>
      <local-tx-datasource>
        <jndi-name>PostgresDS</jndi-name>
       <connection-url>jdbc:postgresql://localhost:5432/Test</connection-url>
        <driver-class>org.postgresql.Driver</driver-class>
        <user-name>postgres</user-name>
        <password>1982226</password>
            <new-connection-sql>select 1</new-connection-sql>
          <metadata>
             <type-mapping>PostgreSQL 7.2</type-mapping>
          </metadata>
      </local-tx-datasource>
    </datasources>and i dont know what should i do in my persistance.xml file ..... when i was working with single database my persistance.xml file was working
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
         version="1.0">     
         <persistence-unit name="Oracle" transaction-type="JTA">
              <jta-data-source>java:/XAOracleDS</jta-data-source>
              <class>com.magti.businesslayer.ejb3entity.Group</class>
              <class>com.magti.businesslayer.ejb3entity.Student</class>
              <properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
                   <property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver"/>
                   <property name="hibernate.connection.url" value="jdbc:oracle:thin:@192.9.200.177:1521:devnbtwo"/>
                   <property name="hibernate.connection.username" value="paata"/>
                   <property name="hibernate.connection.password" value="1982226"/>
                   <property name="hibernate.default_schema" value="PAATA"/>
              </properties>
         </persistence-unit>     
    </persistence>but then i added anothe unit for second database and i get error
         <persistence-unit name="PostgreSql" transaction-type="JTA">
              <jta-data-source>java:/PostgresDS</jta-data-source>
              <class>com.magti.businesslayer.ejb3entity.Group</class>
              <class>com.magti.businesslayer.ejb3entity.Student</class>
              <properties>
                   <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
                   <property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
                   <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/Test"/>
                   <property name="hibernate.connection.username" value="postgres"/>
                   <property name="hibernate.connection.password" value="1982226"/>
                   <property name="hibernate.default_schema" value="postgres"/>
              </properties>
         </persistence-unit>     i don't know how i resolve it .
    i can't find any simple exaplme about distributed transactions on net ...
    can anybody help me ....
    thanks.

    Check this one:
    http://www.webagesolutions.com/knowledgebase/javakb/jkb005/index.html

  • Does Oracle 8.1.5 with weblogic 6.1 sp2 suppports Distributed Transactions ---A really night Mare

              Which version of jdbc thin driver should i use to achieve distributed transaction
              with oracle 8.1.5 in weblogic 6.1 sp2
              right now if iam using the driver classes provided in weblogic.jar iam gettig the
              following Exception
              AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
              java.sql.SQLException: XA error: XAER_RMERR : A resource manager error has occured
              in the transaction branch start(
              ) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
              'OracleXAPool': null
              at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
              at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
              at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
              at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
              at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
              at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
              at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown Source)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
              at java.lang.reflect.Method.invoke(Native Method)
              at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
              at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
              at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
              at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
              Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
              at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
              at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
              at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
              at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
              at $Proxy126.create(Unknown Source)
              at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
              at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
              at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
              Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Regards
              Ranga Rao
              

              Oracle Server 8.1.5 does not provide support for 2PC.
              Full XA support is provided from version 8.1.7.
              Sergi
              "Lawrence" <[email protected]> wrote:
              >
              >Ranga,
              >Please use classes12.zip for this.If you still find problem, please let
              >me know.
              >Thanks
              >Lawrence
              >
              >"Ranga Rao" <[email protected]> wrote:
              >>
              >>
              >>Which version of jdbc thin driver should i use to achieve distributed transaction
              >>with oracle 8.1.5 in weblogic 6.1 sp2
              >>
              >>right now if iam using the driver classes provided in weblogic.jar iam
              >gettig
              >>the
              >>following Exception
              >>
              >>////////////////////////////////////////////////////////////////////////////////////////////
              >>AccountBean.ejbCreate( id = accountId, initial balance = $ 3000.0)
              >>java.sql.SQLException: XA error: XAER_RMERR : A resource manager error
              >has
              >>occured
              >>in the transaction branch start(
              >>) failed on resource 'OracleXAPool' Unexpected error during start for XAResource
              >>'OracleXAPool': null
              >> at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1044)
              >> at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1010)
              >> at weblogic.jdbc.jta.Connection.getXAConn(Connection.java:148)
              >> at weblogic.jdbc.jta.Connection.prepareStatement(Connection.java:226)
              >> at weblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.java:135)
              >> at weblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:76)
              >> at examples.ejb.basic.beanManaged.AccountBean.ejbCreate(Unknown
              >>Source)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_Impl.ejbCreate(AccountBean_g1748h_Impl.java:172)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at weblogic.ejb20.manager.DBManager.create(DBManager.java:492)
              >> at weblogic.ejb20.manager.DBManager.remoteCreate(DBManager.java:462)
              >> at weblogic.ejb20.internal.EntityEJBHome.create(EntityEJBHome.java:190)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl.create(AccountBean_g1748h_HomeImpl.java:76)
              >> at examples.ejb.basic.beanManaged.AccountBean_g1748h_HomeImpl_WLSkel.invoke(Unknown
              >>Source)
              >> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              >> at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
              >> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              >> at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
              >> at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
              >> at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
              >> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
              >> at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)
              >> at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
              >> at $Proxy126.create(Unknown Source)
              >> at examples.wtc.atmi.simpapp.ToupperBean.putMessage(ToupperBean.java:194)
              >> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl.putMessage(ToupperBean_8roqg7_EOImpl.java:284)
              >> at examples.wtc.atmi.simpapp.ToupperBean_8roqg7_EOImpl_WLSkel.invoke(Unknown
              >>Source)
              >> at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
              >> at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
              >> at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>/////////////////////////////////////////////////////////////////////////////////
              >>
              >>Regards
              >>Ranga Rao
              >>
              >>
              >
              

  • "in-doubt distributed transaction" (WLS 8.1 SP2/Oracle 9.2.0.4)

              I've developed an MDB that reads a message from a queue, performs database updates
              against up to 2 databases, and sends an outgoing JMS message when all is complete.
              The MDB uses container-managed transactions to ensure that all DB updates and
              JMS messages are committed or rolled back together. I have had a lot of problems
              related to transactions failing, becoming "in-doubt" in the database and locking
              database resources indefinitely.
              My environment is configured as follows:
              WebLogic 8.1.2 Server
              Oracle 9.2.0.4 database with RAC
              XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              OCI Driver
              I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              and have tried all of the solutions suggested in that paper. The only solution
              that worked consistently without causing the in-doubt transactions was to change
              my connection pools to point directly to a single node of the RAC cluster, not
              to the shared instance. However, even with this configuration, I have seen these
              errors occur when certain database failures occur.
              A side-effect of this problem is that the associated WebLogic connection pools
              begin to "forget" connections. The pool thinks that all of the connections are
              in use (even though I am always calling Statement.close() and Connection.close()),
              and the connection pool cannot be reset manually. The only way to clear the connection
              pool is to bounce WebLogic.
              The only posts I have found related to this error were regarding Oracle 8.1.7
              and WebLogic 6.1. Any help would be greatly appreciated.
              Exceptions:
              <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              [Reason=javax.transaction.xa.XAException
              : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              left=60,XAServerResourceInfo[JMS_my
              JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              javax.tran
              saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              XAER_NOTA : The XID is not valid
              at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              --------------- nested within: ------------------
              weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              not valid - with nested exception:
              [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              with error XAER_NOTA : The XID is not valid]
              at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              ) - Failed to update profiling status for holding 10014 [] (-2)
              java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              lock
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              - Failed to retrieve profiling results for holding 10060 [] (-2)
              java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              189.47.12
              at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              

    Hi. There is a serious bug in the Oracle DBMS (all versions) where in-doubt
              transactions have their data locked in the DBMS by page rather than by row,
              so it will indefinitely prevent access to all data on the page, including
              logically uninvolved data. Oracle understands the problem but currently
              says they will never fix it (it would take too much work). They offer the
              alternative that you configure your table data to ensure that no more than
              one datarow resides on a page.
              Joe
              Matt Smith wrote:
              > I've developed an MDB that reads a message from a queue, performs database updates
              > against up to 2 databases, and sends an outgoing JMS message when all is complete.
              > The MDB uses container-managed transactions to ensure that all DB updates and
              > JMS messages are committed or rolled back together. I have had a lot of problems
              > related to transactions failing, becoming "in-doubt" in the database and locking
              > database resources indefinitely.
              >
              > My environment is configured as follows:
              > WebLogic 8.1.2 Server
              > Oracle 9.2.0.4 database with RAC
              > XA Connection Pool with WebLogic Type 2 Oracle Driver OR Oracle 9.2.0.4
              > OCI Driver
              >
              > I have read the BEA/HP white paper regarding Weblogic 8.1 with Oracle 9i RAC (http://dev2dev.bea.com/products/wlserver81/whitepapers/wls_bea_hp.jsp)
              > and have tried all of the solutions suggested in that paper. The only solution
              > that worked consistently without causing the in-doubt transactions was to change
              > my connection pools to point directly to a single node of the RAC cluster, not
              > to the shared instance. However, even with this configuration, I have seen these
              > errors occur when certain database failures occur.
              >
              > A side-effect of this problem is that the associated WebLogic connection pools
              > begin to "forget" connections. The pool thinks that all of the connections are
              > in use (even though I am always calling Statement.close() and Connection.close()),
              > and the connection pool cannot be reset manually. The only way to clear the connection
              > pool is to bounce WebLogic.
              >
              > The only posts I have found related to this error were regarding Oracle 8.1.7
              > and WebLogic 6.1. Any help would be greatly appreciated.
              >
              > Exceptions:
              > -----------------
              > <Mar 23, 2004 2:59:36 PM EST> <Error> <EJB> <BEA-010026> <Exception occurred during
              > commit of transaction Xid=BEA1-0526A28664707F28EDB9(6412513),Status=Rolled back.
              > [Reason=javax.transaction.xa.XAException
              > : prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID
              > is not valid],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=2,seconds
              > left=60,XAServerResourceInfo[JMS_my
              > JmsStore]=(ServerResourceInfo[JMS_myJmsStore]=(state=rolledback,assigned=myserver),xar=JMS_myJmsStore),XAServerResourceInfo[ProfilingPool]=(ServerResourceInfo[ProfilingPool]=(state=rolledback,ass
              > igned=myserver),xar=ProfilingPool),SCInfo[mydomain+myserver]=(state=rolledback),local
              > properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+10.41.0.61:7001+m
              > ydomain+t3+, XAResources={JMS_myJmsStore, JMS_FileStore, ProfilingPool, SearchManagementPool,
              > AnnouncementsTxPool},NonXAResources={})],CoordinatorURL=myserver+10.41.0.61:7001+mydomain+t3+):
              > javax.tran
              > saction.xa.XAException: prepare failed for XAResource 'ProfilingPool' with error
              > XAER_NOTA : The XID is not valid
              > at weblogic.jdbc.oci.xa.XA.createException(XA.java:386)
              > at weblogic.jdbc.oci.xa.XADataSource.internalPrepare(XADataSource.java:905)
              > at weblogic.jdbc.oci.xa.XADataSource.prepare(XADataSource.java:885)
              > at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:846)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1167)
              > at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:401)
              > at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > --------------- nested within: ------------------
              > weblogic.transaction.RollbackException: Could not prepare resource 'ProfilingPool
              > prepare failed for XAResource 'ProfilingPool' with error XAER_NOTA : The XID is
              > not valid - with nested exception:
              > [javax.transaction.xa.XAException: prepare failed for XAResource 'ProfilingPool'
              > with error XAER_NOTA : The XID is not valid]
              > at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
              > at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
              > at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:00:45,406 ERROR IS003989 [ExecuteThread: '17' for queue: 'ProfileCompleteListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:350
              > ) - Failed to update profiling status for holding 10014 [] (-2)
              > java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for
              > lock
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeUpdate(PreparedStatement.java:226)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeUpdate(PreparedStatement.java:81)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:94)
              > at my.package.search.business.ProfiledHoldingDAO.setProfilingStatus(ProfiledHoldingDAO.java:345)
              > at my.package.search.business.ProfilingManager.disseminateAndAcknowledge(ProfilingManager.java:254)
              > at my.package.search.business.ProfileCompleteListenerBean.onMessage(ProfileCompleteListenerBean.java:128)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              > ...
              > 2004-03-23 15:01:43,093 ERROR IS003989 [ExecuteThread: '18' for queue: 'HoldingStatusListenerBean.ExecuteQueue']
              > my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:265)
              > - Failed to retrieve profiling results for holding 10060 [] (-2)
              > java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              > 189.47.12
              > at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:282)
              > at weblogic.jdbc.oci.PreparedStatement.executeQuery(PreparedStatement.java:152)
              > at weblogic.jdbc.oci.xa.PreparedStatement.executeQuery(PreparedStatement.java:48)
              > at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:80)
              > at my.package.search.business.ProfiledHoldingDAO.getProfilingStatus(ProfiledHoldingDAO.java:256)
              > at my.package.search.business.ProfiledHoldingDAO.storeHoldingMetadata(ProfiledHoldingDAO.java:489)
              > at my.package.search.business.ProfiledHoldingDAO.storeNewHolding(ProfiledHoldingDAO.java:406)
              > at my.package.search.business.ProfilingManager.profileHolding(ProfilingManager.java:128)
              > at my.package.search.business.HoldingStatusListenerBean.onMessage(HoldingStatusListenerBean.java:121)
              > at weblogic.ejb20.internal.MDListener.execute(MDListener.java:382)
              > at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
              > at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
              > at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
              > at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
              >
              >
              

  • ORA-02049: timeout: distributed transaction waiting for lock

    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet Sahai
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

    guneet sahai wrote:
    Hi,
    My name is Guneet and I'm working on an application running on BEA Weblogic Server 9.2 running on a Red Hat Linux box using Oracle 10g as the database. My problem is that recently our code started getting the following exception while updating a database table.
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-02049: timeout: distributed transaction waiting for lock
    Application Details
    * Using Stateless Session EJB
    * Only one Business method in this EJB with transaction attribute set to "required"
    * This method executes two select queries & one update query
    * We are using JDBC to access the database.
    * We have configured a Data Source & are using it to get a database connection.
    * Weblogic's Oracle Driver is being used.
    More details
    * The application has been running well since a month.
    * Two days ago,the update query failed with the above error.
    * At that time, a single client was accessing the system.
    * Once this problem occurs, it starts appearing frequently.
    * Eventually a request to get a connection from the Data Source times out & the exception copied at the end is thrown
    * At this stage the application gets stuck and all requests trying to get a connection end up with this exception.
    * Fortunately, Restarting the Weblogic Server gets us out of this problem and transactions resume normally.
    Now my questions are
    # Why is this error happening & what does it mean?
    # It looks like the second exception (unable to get a connection from ds) is an after effect of the first problem (ORA-02049) once it appears for a couple of times. Can somebody validate this?
    # Though I don't understand JTA well but I don't think this application needs distributed transactions so, I'm thinking of modifying the driver type to non-XA oracle driver. Any advise/pointers/comments on this front is welcome !!!!!!!!
    Thanks
    Guneet SahaiHi Guneet. If you want to debug the JTA issue, I suggest opening an official
    support case. They will lead you through producing the JTA debug information.
    However, I believe you are correct that the transaction you describe is
    completely doable with a simple local transaction, so if you were to alter
    your pool to use the non-XA driver, it would probably be faster, simpler,
    and just work.
    Let me know...
    Joe
    >
    Exception Trace
    Dec 27, 2006 4:47:50 PM | com.gisil.themis.db | SEVERE | Unable to load merchant DEL = 911168900164. Reason - java.sql.SQLException: Unexpected exception while enlisting XAConnection java.sql.SQLException: XA error: XAResource.XAER_RMERR start() failed on resource 'themis-ds': XAER_RMERR : A resource manager error has occured in the transaction branch
    javax.transaction.xa.XAException: Unexpected error during start for XAResource 'themis-ds': Transaction timed out after 29 seconds
    BEA1-252DE51AC930078CA638
    at weblogic.jdbc.wrapper.XA.createException(XA.java:103)
    at weblogic.jdbc.jta.DataSource.start(DataSource.java:753)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1182)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1115)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:274)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:497)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:429)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1408)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1413)
    at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1332)
    at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:440)
    at weblogic.jdbc.jta.DataSource.connect(DataSource.java:396)
    at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:359)
    at com.gisil.themis.db.impl1.DbManagerImpl.isPinValid(DbManagerImpl.java:872)
    at com.gisil.themis.ejb.ThemisBean.isPinValid(ThemisBean.java:185)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl.isPinValid(Themis_aqqc4k_EOImpl.java:207)
    at com.gisil.themis.ejb.Themis_aqqc4k_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
    at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
    at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
    at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
    at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

  • Too many distributed transactions

    I am programming an application with JDeveloper 10g and ADF Framework. It is a application that only queries data (no modifications). I created ViewObjects based on sql queries and an application module.
    The problem is that is I execute that application for some time, I get the following error:
    java.sql.SQLException: ORA-02042: too many distributed transactions
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:888)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2346)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:665)
    As it is a query only program, i do not need transactions. How can fix this?
    Thanks in advance

    Hi,
    this is information from metalink:
    The ORA-2042 indicates that you should increase the parameter
    distributed_transactions.
    The ORA-2063 indicates that this must be done at the remote
    database.
    Explanation
    If the distributed transaction table is full on either side of
    the database link you get the error ORA-2042:
    ORA-02042: "too many distributed transactions"
    Cause: the distributed transaction table is full,
    because too many distributed transactions are active.
    Action: increase the INIT.ORA "distributed_transactions" or
    run fewer transactions.
    If you are sure you don't have too many concurrent
    distributed transactions, this indicates an internal
    error and support should be notified.
    Instance shutdown/restart would be a workaround.
    When the error is generated at the remote database it is
    accompanied with an ORA-2063. In this case the parameter
    distributed_transactions must be increased at the remote
    database.
    If there is no ORA-2063 the parameter distributed_transactions
    must be increased at the local database.

  • Can oracle temporary tables be used with distributed transactions?

    Hello,
    Does anybody know if temporary tables are supported with distributed transactions?
    We use a temporary table to store query results and see no problems when the JDBC driver (Type 2 or Type 4) is used with local transactions. The temporary tables are set for transaction-level data persistence (delete rows on commit).
    When we switch to JDBC/XA driver we occasionally get ORA-14450 error (java.sql.SQLException: ORA-14450: attempt to access a transactional temp table already in use).
    Many thanks...

    I have been able to use temporary tables on remote databases, so I don't think that it is forbidden. Of course, I'm not using JDBC so that might be a problem.
    The other thing that occurs to me is that you are doing something other than DML with the table e.g. trying to drop it. If that is the case you should re-read the documentation and remind yourself of the purpose of temporary tables.
    Cheers, APC

  • Distributed transaction error in WL 7.1

    Hi,
    I'm trying to set-up distributed transactions for weblogic. We have a requirement
    to go against 2 different databases within a single transaction.
    My config.xml looks like:
    <JDBCConnectionPool CapacityIncrement="1"
    DriverName="oracle.jdbc.xa.client.OracleXADataSource"
    InitialCapacity="1" MaxCapacity="2" Name="PAWSPool"
    Properties="user=STARTESTDATA;url=jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR;password=STARTESTDATA;dll=ocijdbc9;protocol=thin"
    RefreshMinutes="5" ShrinkingEnabled="true"
    SupportsLocalTransaction="true" Targets="sps_space"
         TestConnectionsOnReserve="true" TestTableName="DUAL"
    URL="jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR"/>
    <JDBCTxDataSource JNDIName="jdbc/paws"
    Name="PAWSDataSource" PoolName="PAWSPool" Targets="sps_space"/>
    and the pseduo code that produces the problem looks like this:
    UserTransction.begin(); //assume valid lookup in jndi occurred already
    Connection con = dataSource.getConnection(); //datsource obtained from jndi lookup
    PreparedStatement ps = con.prepareStatement("sql string");
    the error
    HELP!!!!!

    what is the error ? if you could cut and paste the log / stdout that shows
    the error that could be useful.
    Also did youmean to say you are using WLS7.0SP1?
    sree
    "John Byrnes" <[email protected]> wrote in message
    news:3f1af184$[email protected]..
    >
    Hi,
    I'm trying to set-up distributed transactions for weblogic. We have arequirement
    to go against 2 different databases within a single transaction.
    My config.xml looks like:
    <JDBCConnectionPool CapacityIncrement="1"
    DriverName="oracle.jdbc.xa.client.OracleXADataSource"
    InitialCapacity="1" MaxCapacity="2" Name="PAWSPool"
    Properties="user=STARTESTDATA;url=jdbc:oracle:thin:@s0489dev.dev.schwab.com:
    1521:ACSTAR;password=STARTESTDATA;dll=ocijdbc9;protocol=thin"
    RefreshMinutes="5" ShrinkingEnabled="true"
    SupportsLocalTransaction="true" Targets="sps_space"
    TestConnectionsOnReserve="true" TestTableName="DUAL"
    URL="jdbc:oracle:thin:@s0489dev.dev.schwab.com:1521:ACSTAR"/>
    <JDBCTxDataSource JNDIName="jdbc/paws"
    Name="PAWSDataSource" PoolName="PAWSPool" Targets="sps_space"/>
    and the pseduo code that produces the problem looks like this:
    UserTransction.begin(); //assume valid lookup in jndi occurred already
    Connection con = dataSource.getConnection(); //datsource obtained fromjndi lookup
    PreparedStatement ps = con.prepareStatement("sql string");
    the error
    HELP!!!!!

  • Distributed transactions with container-managed MDBs

              I have built a framework that employs a high rate of code reuse while abstracting
              the complexities of inter-application communication. This allows application
              developers to focus on solving their business needs and not worry about "the plumbing"
              between the applications.
              At this point, the framework is using container-managed MDBs for Topic destinations.
              MDBs were chosen because of their concurrent nature for processing JMS messages.
              Now that I have this framework up and running, I am trying to add distributed
              transaction support and am having trouble understanding what I need to do. Here
              is how the framework works:
              The MDB will recieve a message, unmarshall it into a business object, and then
              route that object to the appropriate business class where it is then processed
              accordingly. In most cases, the processing of this message object will require
              database interaction. If any error should occur while processing the message,
              all XAResources within the transaction should rollback and ultimately, the JMS
              message will be redelivered later.
              Here is what I'm trying to find out:
              1. When control is passed to an application and it gets a DB connection, will
              that DB resource be dynamically enlisted with the transaction?
              2. Must the DB connection come from the WLS DB pool to be enlisted with the transaction?
              I ask this because the current standard at this company is to use a home-grown
              DB connection pool for getting DB connections. This is due to the fact that not
              all applications here run in a WLS environment and they wanted a standard way
              of retrieving a DB connection across applications. They also sited problems with
              WLS 4.5.1 connection pool.
              3. The documentation states that only one database may be involved in a transaction.
              If a connection to another database is required, but not needed in the current
              transaction, will WLS ignore enlisting the 2nd DB resource, or throw an exception?
              4. Where can I find <B>detailed</B> information about this subject? Everything
              that I have read so far has barely scratched the surface for this specific topic.
              Thanks,
              Bob.
              

              Hi Bob,
              If you are using WLS's XA connection pool, then the XAResource associated with
              the XA connections are enlisted with the transaction transparently for you. Enlistments
              actually occur not at getConnection, but on demand when the JDBC objects are actually
              used.
              If you are not using WLS connection pools, then you would need to enlist the XAResource
              associated with the XA connections yourself. You can obtain the transaction associated
              with the current thread by calling weblogic.transaction.TxHelper.getTransaction(),
              and then call enlistResource on the transaction.
              Weblogic has provisions that allow one (and only one) non-XA connection pool to
              participate in a distributed transaction. In this case, you will get a SQLException
              when you try to obtain a connection from a second connection pool in the same
              distributed transaction. However, if you are using real XA connection pools,
              there is no limitation and any number of XA connection pools can participate in
              the same distributed transaction.
              We will try to incorporate more info in our online docs in the future.
              -- Priscilla Fung, BEA Systems, Inc.
              "Bob Peroutka" <[email protected]> wrote:
              >
              >I have built a framework that employs a high rate of code reuse while
              >abstracting
              >the complexities of inter-application communication. This allows application
              >developers to focus on solving their business needs and not worry about
              >"the plumbing"
              >between the applications.
              >
              >At this point, the framework is using container-managed MDBs for Topic
              >destinations.
              > MDBs were chosen because of their concurrent nature for processing JMS
              >messages.
              >
              >Now that I have this framework up and running, I am trying to add distributed
              >transaction support and am having trouble understanding what I need to
              >do. Here
              >is how the framework works:
              >
              >The MDB will recieve a message, unmarshall it into a business object,
              >and then
              >route that object to the appropriate business class where it is then
              >processed
              >accordingly. In most cases, the processing of this message object will
              >require
              >database interaction. If any error should occur while processing the
              >message,
              >all XAResources within the transaction should rollback and ultimately,
              >the JMS
              >message will be redelivered later.
              >
              >Here is what I'm trying to find out:
              >
              >1. When control is passed to an application and it gets a DB connection,
              >will
              >that DB resource be dynamically enlisted with the transaction?
              >
              >2. Must the DB connection come from the WLS DB pool to be enlisted with
              >the transaction?
              >
              >I ask this because the current standard at this company is to use a home-grown
              >DB connection pool for getting DB connections. This is due to the fact
              >that not
              >all applications here run in a WLS environment and they wanted a standard
              >way
              >of retrieving a DB connection across applications. They also sited problems
              >with
              >WLS 4.5.1 connection pool.
              >
              >3. The documentation states that only one database may be involved in
              >a transaction.
              > If a connection to another database is required, but not needed in the
              >current
              >transaction, will WLS ignore enlisting the 2nd DB resource, or throw
              >an exception?
              >
              >4. Where can I find <B>detailed</B> information about this subject?
              > Everything
              >that I have read so far has barely scratched the surface for this specific
              >topic.
              >
              >Thanks,
              >
              >Bob.
              

  • Simulated distributed transactions in WLS5.1

    Hello
              I can´t use WLS 6.0 I must use WLS 5.1. So I can´t to use distributed
              transactions.
              So that, my problem is this situation:
              Client code: in WL Personalization Server
              method
              UserTransaction.begin
              class1.create
              class2.updateDatabaseOracle1
              this.comit();
              Exception
              this.rollback();
              method commit
              class1.commit();
              class2.commit();
              UserTransaction.commit
              methdo rollback
              class1.rollback;
              class2.rollback;
              UserTransaction.rollback
              class1 in WL Personalization Server
              create
              EJBCreate
              commit
              EJB.putData
              rollback
              EJB.remove
              EJB in WL5.1
              I get this Error:
              "Connection has already been created in this tx context for pool
              named pool1. Illegal attempt to create connection from another
              pool: pool2"
              Can I modify the type of transaction in the EJB that solve this error??
              if the request is false How can I simulated it?
              I can lose the transanction because my class (class1) implements a
              rollback and commit methods that save it.
              Please Help
              Miguel Lopez Montero
              Soluziona Servicios Internet,Spain
              

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC_TX ():
    In the readme file of Oracle JDBC drivers 8.1.6.0.1 (http://technet.oracle.com/software/tech/java/sqlj_jdbc/files/Readme_01.txt)
    it mentioned that it supports "distributed transactions".
    As I understand, JDBC transaction is connection based and uses Oracle internal transaction manager. In order to do "distributed transactions", I must have at least two connections open at the same time each to its own database instance. How does the two connections coordinate the transactions? I thought in order to support "distributed transactions", one has to build a higher layer to encapsulate the two connections and therefore coordinate the distributed transactions. Any examples will be welcome.<HR></BLOCKQUOTE>
    The two branches of the transaction are coordinated using 2-phase commit.
    For samples look under
    $ORACLE_HOME/jdbc/demo/samples/oci8/jdbc20-samples/
    null

  • Lock held by in-doubt distributed transaction

              I'm having an intermittent problem in our server where a distributed transaction
              between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA driver) doesn't
              complete and subsequent attempts to access the rows in question result in:
              java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction
              4.33.52658
              Has anybody else seen anything like this?
              

              Rao,
              The BEA patch is CR095835_610SP4. Apparently there is a corresponding patch for
              SP3 as well. When configuring the jdbc connection pool set XaSetTransactionTimeout
              = true and
              XaTransactionTimeout = yourTimeoutValueInSeconds. This will instruct the Transaction
              manager to set the timeout value on Oracle's XAResource during the two-phase commit
              process. I believe Oracle refers to the timeout value as SesTm.
              Cheers,
              Tony
              "Rao Boppana" <[email protected]> wrote:
              >
              >We are currently facing the same problem. Could you let us know more
              >details about
              >the patch BEA put out to fix this? Is there a patch #/bug #? We are currently
              >running SP4, Oracle 9.2.3 using 9.2.0.1 drivers. We really cannot set
              >our JTA
              >timeout to less than 1 minute and hence we are left with option2. Any
              >help would
              >be greatly appreciated.
              >
              >
              >"Tony Necakov" <[email protected]> wrote:
              >>
              >>Jane,
              >>Thanks for the reply. After talking to Oracle support, we believe we've
              >>discovered
              >>the cause of the problem. Apparently, setting the JTA transaction timeout
              >>does
              >>not affect the default timeout from Oracle's point of view. Consequently,
              >> XA
              >>transactions exceeding 1 minute (Oracle's default) were being marked
              >>by Oracle
              >>as in-doubt. Subsequent commits or rollback from the transaction manager
              >>were
              >>being ignored. The solution is to either knock the JTA timeout value
              >>to something
              >>below Oracle's default or install a BEA patch which allows the transaction
              >>manager
              >>to set the timeout on the Oracle resource manager.
              >>
              >>"Jane Sampson" <[email protected]> wrote:
              >>>Hi Tony,
              >>>
              >>>Yes, I believe there were some problems with 8.1.7. I believe it requires
              >>>an Oracle patch AND a JDriver patch (if you are using the WebLogic
              >JDriver).
              >>>Open a case with support for details.
              >>>
              >>>Thanks,
              >>>
              >>>Jane
              >>>BEA Support
              >>>
              >>>
              >>>"Tony Necakov" <[email protected]> wrote in message
              >>>news:[email protected]...
              >>>>
              >>>> We're seeing the same intermittent problem with Oracle 8.1.7.2 and
              >>>8.1.7.4. The
              >>>> problem occurs with WLS 6.1 service pack 3 and service pack 4.
              >>>>
              >>>> "Jane Sampson" <[email protected]> wrote:
              >>>> >Hi Tim,
              >>>> >
              >>>> >There is an issue has been reported for Oracle 9.2.0.1 Database/Oracle
              >>>> >9.2.0.1 Thin Driver and exhibits this behavior and is being address
              >>>by
              >>>> >both
              >>>> >BEA and Oracle. I would suggest you open a case with Customer Support
              >>>> >and
              >>>> >mention CR090816. It could be the same problem.
              >>>> >
              >>>> >Thanks,
              >>>> >
              >>>> >Jane
              >>>> >BEA Support
              >>>> >
              >>>> >"Tim Dawson" <[email protected]> wrote in message
              >>>> >news:[email protected]...
              >>>> >>
              >>>> >> I'm having an intermittent problem in our server where a distributed
              >>>> >transaction
              >>>> >> between WebLogic JMS (6.1 sp3) and Oracle (using the 9.1.2 XA
              >driver)
              >>>> >doesn't
              >>>> >> complete and subsequent attempts to access the rows in question
              >>>result
              >>>> >in:
              >>>> >>
              >>>> >> java.sql.SQLException: ORA-01591: lock held by in-doubt distributed
              >>>> >transaction
              >>>> >> 4.33.52658
              >>>> >>
              >>>> >> Has anybody else seen anything like this?
              >>>> >
              >>>> >
              >>>>
              >>>
              >>>
              >>
              >
              

  • Ora-01591 Lock held in by In-doubt distributed transaction - help required

    In my web application i am getting an error @ a particular page. I am using JTA user transaction to mark the transaction boundaries. On commit i am confronting the error "lock held in by In-Doubt transaction. I queried pending_trans$,dba_2pc_pending and force commit the transaction.Also i purged the transaction using Purge_Lost_db_entity. Still after doing all these i am facing the same problem with a new transaction no.
    I did all the below steps:
    I did follow the below steps:
    SELECT * FROM PENDING_TRANS$
    SELECT
    LOCAL_TRAN_ID, GLOBAL_TRAN_ID, STATE, MIXED, HOST, COMMIT#
    FROM
    DBA_2PC_PENDING
    WHERE
    LOCAL _TRAN_ID = '??.';
    SELECT LOCAL_TRAN_ID, IN_OUT, DATABASE, INTERFACE
    FROM DBA_2PC_NEIGHBORS;
    COMMIT FORCE 'local transactionID', 'SCN';
    DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY (local transactionID); OR
    DBMS_TRANSACTION.PURGE_MIXED (local transactionID);
    SELECT s.inst_id,
    s.sid,
    s.serial#,
    p.spid,
    s.username,
    s.program
    FROM gv$session s
    JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
    WHERE s.type != 'BACKGROUND'
    and s.program='JDBC Thin Client'
    ALTER SYSTEM KILL SESSION '102,10' IMMEDIATE;
    Database shutdown and restart doesnt work..
    Please anyone help..

    tis is the result of the query v$version
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    "CORE 10.2.0.3.0 Production"
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    I use websphere6.1 and oracle 10.2.0.3. using JTA UserTransaction to define boundaries. I am facing tis issue from last week only before it was working fine. I did the commit force as mentioned before to manually unlock transaction.From then i am getting this error. Could u pls help. I m having pressure from onsite, i dont know what is causing the error in one particular flow. I have included the error logs below.
    [7/14/10 19:15:54:328 IST] 00000023 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are:
    The XA Error is : -3
    The XA Error message is : A resource manager error has occured in the transaction branch.
    The Oracle Error code is : 17410
    The Oracle Error message is: Internal XA Error
    The cause is : null.
    [7/14/10 19:15:54:343 IST] 00000023 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMERR (-3). Exception is: <null>
    [7/14/10 19:15:54:359 IST] 00000023 XATransaction E J2CA0027E: An exception occurred while invoking commit on an XA Resource Adapter from dataSource jdbc/ScorecardDataSource, within transaction ID {XidImpl: formatId(57415344), gtrid_length(36), bqual_length(54), data(00000129d13434870000000100000008f0685880e9e9a1514500185d37d88f31da70140400000129d13434870000000100000008f0685880e9e9a1514500185d37d88f31da701404000000010000000000000000000000000001)}: oracle.jdbc.xa.OracleXAException
    [7/14/10 19:15:54:531 IST] 00000023 MCWrapper E J2CA0081E: Method cleanup failed while trying to execute method cleanup on ManagedConnection WSRdbManagedConnectionImpl@3e0a3e0a from resource jdbc/ScorecardDataSource. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: No more data to read from socket. with SQL State : null SQL Code : 17410
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    [7/14/10 19:15:54:593 IST] 00000023 MCWrapper E J2CA0081E: Method destroy failed while trying to execute method destroy on ManagedConnection WSRdbManagedConnectionImpl@3e0a3e0a from resource No longer available. Caught exception: java.lang.NullPointerException
    [7/14/10 19:16:08:093 IST] 00000023 SystemErr R Caused by: java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction 9.34.890
    Pls help

Maybe you are looking for