MTS / COM+ distributed transactions
How much support for Microsoft's MTS / COM+ distributed
transactions is contained within the ODBC driver for Oracle that
is distributed with Oracle9i for Windows? Does the ODBC driver
support the Oracle Services for MTS that comes with the 9i
client?
Wally
sthlm08 wrote:
We rewrote the system so that, instead of creating a distributed transaction at the start of every (modifying) server call, we started a local database transaction that spanned the entire server call. Since the isolation level of the distributed transaction was Serializable, we decided to use the same for the local transaction. Unfortunately, this lead to a lot of ORA-08177 errors whenever we stored data that was bigger than 4kb into a CLOB or a BLOB column.
If this is occurring whenever you stored data that was bigger than 4kb into a CLOB or a BLOB column, have you considered increasing the INITTRANS for that table?
Similar Messages
-
Unable to enlist in a distributed transaction (Windows7, Oracle 11G R1)
Hi,
I have a .Net application running on Windows 7 x64 using VisualStudio2008 and Oracle 11G R1 32bit client
In it I call a webservice calling another webservice, this requires to use oramts that interfaces with Microsoft DTC. However I'm getting the following error when calling the service method:
"Unable to enlist in a distributed transaction"
I have checked the following:
- Ora MTS is installed
- DTC is running, the security settings allow AX transactions (in fact I just allowed everything)
- Network services have the permission to access oracle dlls
- The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI contains the following: "OracleXaLib"="xa80.dll" "OracleSqlLib"="SQLLib80.dll" "OracleOciLib"="oci.dll" (not sure if this is right)
What is it I'm doing wrong ? Does this version of Oracle work correctly on W7 ?
By the way it works fine on Windows XP !
I've spend quite some time trying to find a resolution..
Thanks!I think I answered my own question
It seems that MSDTC is not supported by Oracle 11G R1 on Windows x64 !
All Oracle Database components are supported on Windows x64 with the following exceptions:
•Oracle Services for Microsoft Transaction Server are not supported on Windows Vista. As a result, all Oracle Windows data access drivers on Windows Vista that use Oracle Services for Microsoft Transaction Server to enlist in Microsoft Distributed Transaction Coordinator (MSDTC) coordinated transactions cannot participate in those coordinated transactions. These data access drivers include Oracle Data Provider for .NET, Oracle Provider for OLE DB, Oracle Objects for OLE, and ODBC. Check OracleMetaLink for up to date information on Oracle Services for Microsoft Transaction Server certification with Windows Vista.
http://download.oracle.com/docs/cd/B28359_01/install.111/b32006/reqs.htm#CHDCEFIJ
Edited by: 845528 on 18 mars 2011 05:05 -
Settings for implementing Distributed Transaction
Hi ,
Can some one guide me as to what are the settings that need to be done on the Oracle client & server machine for implementing Distributed Transaction .
I have ODP.Net client 11 & Oracle Database Server 10g.
I read that I require Oracle Services for MTS to be installed on my system .
When I check the services installed on my machine ,I found OracleMTSRecoveryService (so i assume Oracle Services for MTS is installed on my system) .
I just can't figure out what part of settings I'm missing out ...
Please guide .
Many Thanks
GirijaHello TeamIn,
Please check if you are in the 32/64 bit situation in think KB:
https://support.microsoft.com/en-us/kb/910907?wa=wsignin1.0 which is mentioned also in the link provided by David and you could confirm if there is 32/64 bit different version service on the
azure forum.
>>I am using Sql Server Express 2012 installed in an azure VM and App in Azure App services
I am not sure how the Windows Azure SQL Database is defined, you could confirm it on the azure forum if your database is already a Windows Azure SQL Database and if so, according to this
blog, it shows that the Windows Azure SQL Database does not support distributed transactions, which are transactions that multiple transaction managers (multiple resources).
Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
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 -
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?
ThanksStill 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 -
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
>>
>>
>
-
All I want to know is if Distributed Transaction Coordinator services of the application role are required by SQL Server 2012 for clustering and support of SharePoint 2013.
I have been planning and deploying my companies first Windows Server 2012/SQL Server 2012 Always On cluster and Always On Availability Groups Multi-Subnet cluster and instances for SharePoint 2013, and I will be brutally honest, the documentation on either
the MSDN and TechNet leave alot to be desired. Continually finding links in the documentation will take me from a Windows 2012 reference to a page talking about Windows Server 2008 or R2, The differences of which there are so many when it comes to configurations,
settings, roles, services when working with SQL Server 2012. I have been confused, frustrated, screaming mad, with all the misdirection in this documentation. The documentation takes me windows 2008 R2 which is different than 2012!
Tired and trying to pick myself up off the floor!
Greg
GmanIn general, DTC is not required for SQL 2012. But, since you are asking specifically about SharePoint, it would be better to ask in a SharePoint forum. They would be more likely to know those situations where FTC might be needed by SharePoint.
.:|:.:|:. tim -
Distributed transactions and 2-phase commit in a SAP Netweaver environment
Hello,
I am a Java architect., I don't know very much the SAP technologies. I tried to found on forums or technical papers if SAP does support distributed transactions and two-phase commit, it's not clear. I found something on SAP WAS but my project is using a SAP PI 7.0 and I cannot find anything on the subject.
My goal is to include a SAP server (via PI 7.0) in a distributed transaction handled by a J2EE ESB (Oracle, ex-BEA Aqualogic) based on XA capabilities.
Does anyone have experience or feedback on this topic ?
Thanks.Hi,
Do you know this white paper ?
[Distributed Transaction and 2 phase commit|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3732d690-0201-0010-a993-b92aab79701f]
Regards,
Olivier -
ORA-02074: cannot ROLLBACK in a distributed transaction
I have a stored procedure that successfully creates a portal user when I run it with SQLPLUS.
However when I call the same procedure through ODP.Net, I get the following error.
"ORA-20001: ORA-02074: cannot ROLLBACK in a distributed transaction\nORA-06512: at \"PORTAL30.WWSEC_API\", line 1915\nORA-02074: cannot SET SAVEPOINT in a distributed transaction\nORA-06512: at \"PORTAL30.PRO_CREATE_WEB_USER\", line 28\nORA-06512: at line 1"
The portal version is 3.0.9.8.2 The stored proc is in the portal30 schema and I am connecting as portal30 user.
Any help is greatly appreciated...
Thanks.
The following is the code for the stored procedure:-
CREATE OR REPLACE PROCEDURE PORTAL30.PRO_CREATE_WEB_USER (
puser IN varchar2,
puser_last_name IN varchar2,
puser_first_name IN varchar2,
puser_group IN varchar2,
password IN varchar2
) AS
l_group_id number;
l_id number;
e_code number;
begin
l_id := wwsec_api.add_portal_user(p_User_Name => puser,p_Last_Name => puser_last_name,p_First_Name => puser_first_name,p_Portal_User => 'Y');
wwsec_api.activate_portal_user(puser);
portal30_sso.WWSSO_API_USER_ADMIN.CREATE_USER(P_USERNAME=> puser,P_PASSWORD=>password,p_error_code=> e_code);
wwsec_api.add_user_to_list(p_person_id => l_id,p_to_group_id => wwsec_api.group_id (p_name => puser_group),p_is_owner => wwsec_api.NOT_OWNER);
wwsec_api.set_defaultgroup(p_groupid => wwsec_api.group_id (p_name => puser_group),p_username => puser);
commit;
exception
when others then
raise_application_error(-20001,substr(sqlerrm,1,200));
end;
The foll is the code I am using to call the stored proc.
private void createUser()
string retval ;
OracleConnection oraconn = new OracleConnection(Data Source=testdb;User ID=portal30;Password=portal30" );
OracleCommand cmd = new OracleCommand("PRO_CREATE_WEB_USER", oraconn);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter a_uid = new OracleParameter("puser" ,OracleDbType.Varchar2,20);
a_uid.Direction = ParameterDirection.Input ;
a_uid.Value = (txtUserId.Text).Trim() ;
cmd.Parameters.Add(a_uid);
OracleParameter a_last_name = new OracleParameter("puser_last_name" ,OracleDbType.Varchar2,20);
a_last_name.Direction = ParameterDirection.Input ;
if (( txtLName.Text).Trim() != "" )
a_last_name.Value = (txtLName.Text).Trim() ;
else
a_last_name.Value = " ";
cmd.Parameters.Add(a_last_name);
OracleParameter a_first_name = new OracleParameter("puser_first_name" ,OracleDbType.Varchar2,20);
a_first_name.Direction = ParameterDirection.Input ;
if ((txtFName.Text).Trim() != "")
a_first_name.Value = (txtFName.Text).Trim() ;
else
a_first_name.Value = " ";
cmd.Parameters.Add(a_first_name);
OracleParameter a_type = new OracleParameter("puser_group" ,OracleDbType.Varchar2,20);
a_type.Direction = ParameterDirection.Input ;
a_type.Value = (lstUserType.SelectedValue).Trim() ;
cmd.Parameters.Add(a_type);
OracleParameter a_passwd = new OracleParameter("password" ,OracleDbType.Varchar2,20);
a_passwd.Direction = ParameterDirection.Input ;
a_passwd.Value = (txtPassword.Text).Trim() ;
cmd.Parameters.Add(a_passwd);
try
oraconn.Open();
cmd.ExecuteNonQuery();
lblMsg.ForeColor = System.Drawing.Color.FromName("blue");
lblMsg.Text = "User Created.";
catch(OracleException e)
{ retval = e.Message ;
lblMsg.ForeColor = System.Drawing.Color.FromName("red");
lblMsg.Text = "Error Creating user" ;
finally
oraconn.Close();Also note that remote procedure/function calls (e.g. from ODP.NET), do not support distributed transactions (i.e. a SAVEPOINT/ROLLBACK block within the PL/SQL procedure/function) before database version Oracle 9i.
So if you are using say Oracle 817 you must use the "OracleTransaction" object in ODP.NET instead.
See:
http://www.dotnet247.com/247reference/msgs/39/197274.aspx -
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)
>
>
-
How to implement Distributed Transaction
Hi,
We are using Jsp/Struts/Bc4j application model. JHeadstart 9.0.5.1.
We have the Distributed transaction issue. There are 2 BC4J Application Modules (AM1 and AM2), each with its own DB connection, Entity and View Objects. In a special case, when record is inserted via AM1, there have to be record created in the DB, via AM2.
What is the recommended approach to do that? We can't define AM2 as submodule of AM1, because, when instantiated (in the corresponding doDML method on the entity in AM1), it will try to use the connection of AM1, which is wrong. When (which event), and how to instantiate AM2 (ensure write connection), get corresponding View Object, create the other record, and commit everything in one transaction? Btw, we can not use DB link.
Regards,
VladimirHi Vladimir,
It seems to me that this is a generic BC4J issue, independent of JHeadstart. You could post it at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html.
My suggestion (though I'm not sure it would work) would be to explicitly instantiate AM2 at the time you need it within AM1, with code like this:
String amDef = "test.AM2";
String config = "AM2Local";
ApplicationModule am =
Configuration.createRootApplicationModule(amDef,config);
ViewObject vo = am.findViewObject("TestView");
// Work with your appmodule and view object here
Configuration.releaseRootApplicationModule(am,true);By the way, in JDeveloper 10g you can get this piece of code by typing bc4jclient followed directly by Ctrl+Enter.
Hope this helps,
Sandra Muller
JHeadstart Team
Oracle Consulting -
We setup a server core single node cluster (W2012 R2). The MS DTC is running, and the Distributed Transaction Coordinator firewall rules are enabled. I can connect to the firewall rules and compmgmt.msc remotely for this server. When
I attempt to connect to the Component Services Management console with this server, the MS DTC object is not displayed. Only the COM+ applications are displayed. We've setup other server core instances with out clustering and DTC is displayed.Hi Steve,
We just finished the local test and found this behavior is by design. It’s expected that we can’t see the DTC remotely from component services for a cluster node.
In my lab, 2012R2 node3 is a single node cluster and has DTC role. -
I am running SQL Agent that executes an SSIS process from sql server1. The SSIS process executes its SQL/tables/sp’s against another sql server2.
I get an error after adding data flow tasks with transaction supported within a sequence with transaction required. The error, “The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D024 "The transaction
manager has disabled its support for remote/network transactions"
Prior to adding this sequence everything was working from sql agent, and there were other sequences with oledb destinations.
Everything works when running within SSIS Package.
I see this article on similar issue,
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0bfa2569-8849-4884-8f68-8edf98a9b4fe/problem-to-execute-a-package-and-tasks-with-a-certain-transactionoption-property-i-need-help?forum=sqlintegrationservices
“I had similar issue and solved by setting the following on both the machines. Allow Remote Clients, Allow Remote Administration,
Allow Inbound Clients, Allow Outbound Clients, and TIP are enabled in Component Services/My Computer/Properties/MSDTC/Security Configuration.”
I don’t want to remove transaction required for the “Remove Duplicates from Staging” sequence.
Anyone seen this?
Greg HansonDTC was running on remote computer. The problem was it was no longer accepting transactions from remote servers. This was in SSIS so I had to turn to "Transaction Supported" for all Data Flow Transactions.
Greg Hanson -
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) -
ORA-01591: lock held by in-doubt distributed transaction
I am using oracle wcf adapter to connect to oracle to insert.
I am getting the ORA-01591: lock held by in-doubt distributed transaction.
Any ideas as to what could be the resolution. I have followed the below mentioned steps. but that's not a permanent solution.
Please advice.
The resolution described below is not acceptable and never should have been used. Although it does avoid the error, it's not okay to turn off AmbientTransaction when performing inserts
and/or updates. A different solution needs to be found.<o:p></o:p>
http://msdn.microsoft.com/en-US/library/dd788352(v=BTS.10).aspx <o:p></o:p>
"Not performing operations in a transactional context is advisable only for operations that do not make changes to the database. For operations that update data in the database, we recommend
setting the binding property to true otherwise you might either experience message loss or duplicate messages depending on whether you are performing inbound or outbound operations."<o:p></o:p>
********************************************<o:p></o:p>
This can be resolved by adjusting the configuration settings on the Oracle adapter, accessible via the Send Port properties. The properties and the values that should be used are shown below:<o:p></o:p>
** Binding tab:
incrPoolSize: 1
maxPoolSize: 10
useAmbientTransaction: False<o:p></o:p>
** Messages tab:
Isolation Level: ReadCommitted<o:p></o:p>
Also, you'll need to get a DBA to rollback the hanging "in-doubt" transactions, which will be viewable via the sql below. Otherwise, if you try processing the same data again, you'll
still get the same error.<o:p></o:p>
SELECT LOCAL_TRAN_ID, GLOBAL_TRAN_ID, STATE, MIXED, HOST, COMMIT# FROM DBA_2PC_PENDING;<o:p></o:p>
The transactions can be rolled back with sql, using this syntax:<o:p></o:p>
ROLLBACK FORCE '<LOCAL_TRAN_ID>';
<o:p></o:p>
Thank you and have great day! Vivek Kulkarni MCAD.netHi Vivek,
This error is encountered by many DBA's and cause problem by locking the distributed transaction process, and not letting the query go through, because the Two - Phase Commit Mechanism got an error somewhere.
he DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point.
Here are some codes to help you through the process:
This one brings in-doubt transactions:
select * from DBA_2PC_PENDING where state='prepared'
This one prepares the rollback script for the transactions:
select 'rollback force '''||local_tran_id||''';' from DBA_2PC_PENDING where state='prepared'
All this is well described in below link
ORA-01591: lock held by in-doubt distributed transaction
ORA-01591: lock held by in-doubt distributed transaction string tips
On BizTalk Side you need to make ambient transaction to false as Oracle does not go ahead with DTC Transaction with Biz Talk
Thanks
Abhishek
Maybe you are looking for
-
I'm trying to install Adobe Photoshop CS3 on a new ASUS ASM11BB001O computer equipped with 64-bit Windows 7. I use a "bundle" approach, first loading Photoshop 6, then upgrading with CS upgrade and then CS3 upgrade. The installation goes smoothly u
-
RE: Putting a song into my iweb page, following Mike Wong's instructions with considerable and valuable help along the way from James Tseng. I have spent all day working at this and failing countless times. I finally got to the point where I was supp
-
Ive had my unlimited data plan since i joined AT&T back in 2008 when i bought the iPhone 3G...ive been able to keep it for my current iPhone 4 and now ill be upgrading to iPhone 5 and was wondering if anyone else with an unlimited data plans suffers
-
HD Video from Sanyo HD-1 Wont play
Hello, Thanks for looking. I have a PowerMac G5 2.0 x2 with 1.5 Gig's of memory. I recently purchased a Sanyo HD-1. Which records 720p Video. It records the video to 2gig SD card. I copyed the video to my hard drive But my Mac cant play it !! The vid
-
Finding warehouse number with storage location
Hi all, How can I find the warehouse number given the material, plant and the storage location? Thanks in advance.