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!!!!!

Similar Messages

  • Can not commit distributed transaction

    Hi
    We get error "can not commit distributed transaction" during
    commit the transaction in which we have create NEW entities.
    Update-transactions on existing enitites work correct.
    Our problem is probably due to seauences for object IDs: we are using oracle native sequences:
    <sequence name="SeqErrRecObj" strategy="nontransactional" factory-class="native(Sequence=BUYING.SEQ_ERRRECOBJ)"/>
    As soon we use strategy="nontransactional" in managed environment,
    we get "can not commit distributed transaction" error by creating new instance.
    Switching to strategy="transactional" seems to eleminate this problem.
    I did not found any hint in about this in documentation.
    Can some one confirm our assumption that using nontransactional oracle sequences in manageg (WebLogic 9.2) environment
    is responsible for "can not commit distributed transaction" error and "strategy=transactional" is the right solution.
    Probably we are completely wrong and tehre is some other explanation for this error ?
    kind regards
    Andre Teshler

    Hi Andre,
    It sounds like you have not configured a non-transactional datasource. See section "4.2.1. Managed and XA DataSources" in the <kodo>/docs/jdo/pdf/manual.pdf. Connection is for the managed datasource and Connection2 for the non-transactional.
    David Ezzio

  • ORA-02042: too many distributed transactions

    1. I have been working on a portal application for several weeks.
    2. Portal is installed in 1 instance and my data is in another instance.
    3. I've had no ora-02042 problems in the devt environment set up that way.
    4. I've recently migrated the application/pages to a test environment set up that way.
    5. I've been working in the test environment for several days with no problems.
    6. For some portlets on some pages I'm now getting:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    Failed to parse query
    Error:ORA-02042: too many distributed transactions
    Error:ORA-02042: too many distributed transactions
    ORA-02063: preceding line from
    LINK_TO_TEST (WWV-11230) Failed to parse as PACID_SCHEMA -
    select user_action.userid, action.name,
    user_action.created_date,
    user_action.created_by, action.action_id,
    'del' del_link from user_action , action
    where user_action.action_id =
    action.action_id and user_action.userid
    LIKE UPPER(:userid) order by USERID
    ASC, NAME ASC, CREATED_DATE
    ASC (WWV-08300)
    <HR></BLOCKQUOTE>
    7. I cannot find anything about this error in the db log files for either instance.
    8. I've increased distributed transactions to 200 in the portal db and bounced
    it. Still get the error.
    9. No records in dba_2pc_pending or dba_2pc_neighbors in the portal instance.
    10. I get the error in various reports and form LOVs at different times. Pages with a lot of portlets seem to be more prone to the error.
    Here is a typical LOV error:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    COMBOBOX LOV ERROR:
    LOV: "ASIMM_1022.TITLE_LOV"
    Parse Message: Parse as pre-set global: "PACID_SCHEMA".
    Find Message: LOV is of type DYNAMIC (LOV based on SQL query).
    Query: "select code display_column, code return_column from codes where table_id = 'OFFICER_TITLE' order by code"
    wwv_parse.parse_as_user: ORA-02042: too many distributed transactions ORA-02063: preceding line from LINK_TO_TEST wwv_parse.parse_as_user: Failed to parse as PACID_SCHEMA - select code display_column, code return_column from codes where table_id = 'OFFICER_TITLE' order by code wwv_security.check_comp_privilege: Insufficient privileges. wwpre_utl.get_path_id: The preference path does not exist: ORACLE.WEBVIEW.PARAMETERS.217_USER_INPUT_ASIMM_5423428
    <HR></BLOCKQUOTE>
    Why are these select statements being interpreted as distributed transactions? Note:1032658.6 suggests I "USE SET TRANSACTION READ ONLY". Is this necessary? If so how?
    What puzzles me is that this set up has been working fine for several days. I don't know of any changes to my environment apart from me increasing distributed transactions.
    null

    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.

  • Errors in DB alert log for distributed transactions

    Hi,
    I am receiving the following type of errors regularly in one of our development databases:
    Errors in file e:\oracle\product\diag\rdbms\agdev10g\agdev10g\trace\agdev10g_reco_16356.trc:
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    ORA-02062: distributed recovery received DBID d672931d, expected 2d7b9dec
    ORA-12154: TNS:could not resolve the connect identifier specified
    ORA-12500: TNS:listener failed to start a dedicated server process
    ORA-12154: TNS:could not resolve the connect identifier specified
    From researching on the net it looks like it may have something to do with distributed transactions and database links however I'm not sure how to proceed to diagnose the problem and find out where the issue is. Can anyone help?
    Thanks
    Adam
    Edited by: Adam J. Sawyer on 27/05/2010 16:57

    SQL*Net typically involves two systems so post following details for both systems
    Post Operating System (OS) name & version for DB server system.
    Post results of
    SELECT * from v$version
    or post Oracle version to 4 decimal places
    oerr ora 12514
    12514, 00000, "TNS:listener does not currently know of service requested in connect descriptor"
    // *Cause:  The listener received a request to establish a connection to a
    // database or other service. The connect descriptor received by the listener
    // specified a service name for a service (usually a database service)
    // that either has not yet dynamically registered with the listener or has
    // not been statically configured for the listener.  This may be a temporary
    // condition such as after the listener has started, but before the database
    // instance has registered with the listener.
    // *Action:
    //  - Wait a moment and try to connect a second time.
    //  - Check which services are currently known by the listener by executing:
    //    lsnrctl services <listener name>
    //  - Check that the SERVICE_NAME parameter in the connect descriptor of the
    //    net service name used specifies a service known by the listener.
    //  - If an easy connect naming connect identifier was used, check that
    //    the service name specified is a service known by the listener.
    //  - Check for an event in the listener.log file.
    bcm@bcm-laptop:~$ oerr ora 2062
    02062, 00000, "distributed recovery received DBID %s, expected %s"
    // *Cause: a database link at a coordinator no longer points to the expected
    //         database.  Link may have been redefined, or a different DB mounted.
    // *Action: restore link definition or remote database.
    bcm@bcm-laptop:~$ oerr ora 12154
    12154, 00000, "TNS:could not resolve the connect identifier specified"
    // *Cause:  A connection to a database or other service was requested using
    // a connect identifier, and the connect identifier specified could not
    // be resolved into a connect descriptor using one of the naming methods
    // configured. For example, if the type of connect identifier used was a
    // net service name then the net service name could not be found in a
    // naming method repository, or the repository could not be
    // located or reached.
    // *Action:
    //   - If you are using local naming (TNSNAMES.ORA file):
    //      - Make sure that "TNSNAMES" is listed as one of the values of the
    //        NAMES.DIRECTORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA)
    //      - Verify that a TNSNAMES.ORA file exists and is in the proper
    //        directory and is accessible.
    //      - Check that the net service name used as the connect identifier
    //        exists in the TNSNAMES.ORA file.
    //      - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA
    //        file.  Look for unmatched parentheses or stray characters. Errors
    //        in a TNSNAMES.ORA file may make it unusable.
    //   - If you are using directory naming:
    //      - Verify that "LDAP" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Verify that the LDAP directory server is up and that it is
    //        accessible.
    //      - Verify that the net service name or database name used as the
    //        connect identifier is configured in the directory.
    //      - Verify that the default context being used is correct by
    //        specifying a fully qualified net service name or a full LDAP DN
    //        as the connect identifier
    //   - If you are using easy connect naming:
    //      - Verify that "EZCONNECT" is listed as one of the values of the
    //        NAMES.DIRETORY_PATH parameter in the Oracle Net profile
    //        (SQLNET.ORA).
    //      - Make sure the host, port and service name specified
    //        are correct.
    //      - Try enclosing the connect identifier in quote marks.
    //   See the Oracle Net Services Administrators Guide or the Oracle
    //   operating system specific guide for more information on naming.
    bcm@bcm-laptop:~$ oerr ora 12500
    12500, 00000, "TNS:listener failed to start a dedicated server process"
    // *Cause:  The process of starting up a dedicated server process failed.
    // The executable could not be found or the environment may be set up
    // incorrectly.
    // *Action: Turn on tracing at the ADMIN level and reexecute the operation.
    // Verify that the ORACLE Server executable is present and has execute
    // permissions enabled. Ensure that the ORACLE environment is specified
    // correctly in LISTENER.ORA. The Oracle Protocol Adapter that is being
    // called may not be installed on the local hard drive.  Please check that
    // the correct Protocol Adapter are successfully linked.
    // If error persists, contact Oracle Customer Support.What explicit SQL or command trigger these errors?

  • Get error from SQL AGENT: The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D024

    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 Hanson

    DTC 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

  • ERROR:ORA-01591: lock held by in-doubt distributed transaction (URGENT)

    hi
    i m having this error when trying to access one table in oracle 10g database
    ORA-01591: lock held by in-doubt distributed transaction 3.30.4119
    i restarted the server but of no use. can anyone help?

    ORA-01591: lock held by in-doubt distributed transaction string
    Cause: Trying to access resource that is locked by a dead two-phase commit transaction that is in prepared state.
    Action: DBA should query the pending_trans$ and related tables, and attempt to repair network connection(s) to coordinator and commit point. If timely repair is not possible, DBA should contact DBA at commit point if known or end user for correct outcome, or use heuristic default if given to issue a heuristic commit or abort command to finalize the local portion of the distributed transaction.
    go through
    drop locked table
    plz. to through below i hope it will help u.
    Re: ORA-1591 error
    Message was edited by:
    user52

  • ORA-01591: lock held by in-doubt distributed transaction string  error

    Hi Gurus,
    I am getting the error
    ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
    Procedure basically inserts 2 tables and update 1 table.
    The order of execution is given below.
    However I get the error as table _a locked.
    Can you please help me how to handle this ?
    Begin
    Insert into table_a values (values1, value2); -- (our DB)
    Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
    update table C ; -- (our DB)
    commit; -- when I debugged I get exception with the sql error above in this commit.
    End;

    Tina wrote:
    Hi Gurus,
    I am getting the error
    ORA-01591: lock held by in-doubt distributed transaction string error while running once procedure.
    Procedure basically inserts 2 tables and update 1 table.
    The order of execution is given below.
    However I get the error as table _a locked.
    Can you please help me how to handle this ?
    Begin
    Insert into table_a values (values1, value2); -- (our DB)
    Insert into table_b@remote_DB values (value1, value2); --( REMOTE DB)
    update table C ; -- (our DB)
    commit; -- when I debugged I get exception with the sql error above in this commit.
    End;
    01591, 00000, "lock held by in-doubt distributed transaction %s"
    // *Cause:  Trying to access resource that is locked by a dead two-phase commit
    //          transaction that is in prepared state.
    // *Action: DBA should query the pending_trans$ and related tables, and attempt
    //          to repair network connection(s) to coordinator and commit point.
    //          If timely repair is not possible, DBA should contact DBA at commit
    //          point if known or end user for correct outcome, or use heuristic
    //          default if given to issue a heuristic commit or abort command to
    //          finalize the local portion of the distributed transaction.

  • Linked Server : SQL 2012 to 2000 error - Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.

    Hi all,
      If any one has worked around this error and can help ?
    Msg 8522, Level 16, State 3, Line 1
    Microsoft Distributed Transaction Coordinator (MS DTC) has stopped this transaction.
      I am trying to connect from sql 2012 to 2000 server. Established linked server using native client 10. I am able to see catalogs and database and table. Just when I am trying to query i am getting above error. 
    any help is really appreciated. 
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    Hi Logicinisde,
    What the new error message do you get after using the workarounds in this
    blog? Please post it for analysis.
    Besides, as SQL Server 2012 has stopped connecting to SQL Server 2000 via linked servers, personally I recommend you upgrade SQL Server 2000 to a higher version to make your queries or ETLs efficient.
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • Error connecting SQL Azure - Network access for Distributed Transaction Manager (MSDTC) has been disabled

    Sometimes I have an error connecting SQL Azure. The error occurs in an asp.net application and in a windows service running on VM in Azure. Error details:
    System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.Transactions.TransactionManagerCommunicationException: Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network
    access in the security configuration for MSDTC using the Component Services Administrative tool. ---> System.Runtime.InteropServices.COMException: The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT:
    0x8004D024)
       at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel,
    ITransactionShim& transactionShim)
       at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
       --- End of inner exception stack trace ---
       at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException)
       at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
       at System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx)
       at System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx)
       at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
       at System.Transactions.Transaction.Promote()
       at System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction)
       at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)
       at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
       at System.Data.ProviderBase.DbConnectionPool.PrepareConnection(DbConnection owningObject, DbConnectionInternal obj, Transaction transaction)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal&
    connection)
       at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       --- End of inner exception stack trace ---
       at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
       at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection()
       at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClassb.<GetResults>b__9()
       at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
       at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Entity.Core.Objects.DataClasses.EntityReference`1.Load(MergeOption mergeOption)
       at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.DeferredLoad()
       at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject)
       at System.Data.Entity.Core.Objects.Internal.LazyLoadBehavior.<>c__DisplayClass7`2.<GetInterceptorDelegate>b__2(TProxy proxy, TItem item)

    Hello,
    I am not an expert in MSDTC but as we know,SQL Azure Database does not support
    distributed transactions. This means that SQL Azure doesn’t allow Microsoft Distributed Transaction Coordinator (MS DTC) to delegate distributed transaction handling.
    One common cause of MSDTC getting involved in Entity Framework applications is the fact that we close and reopen the same connection as needed (i.e. for each query that is executed).To avoid the stack from opening and closing the connection multiple times,
    you can simply open the connection explicitly and run the queries in the same connectio.
    The following thread is about a similar issue, please refer to:
    http://answers.flyppdevportal.com/categories/azure/sqlazure.aspx?ID=d705a8cf-cba4-494c-96f6-96a136bd29e3
    What's more, you can also try the workaround that involves setting the Enlist option of the SQL Azure connection to false. For the detail explanation, please refer to:Entity
    FrameWork and SQL Azure
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • 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

  • 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

  • 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
              >>
              >>
              >
              

  • ORA-00164 Autonomous and Distributed Transactions in Oracle 8i - Forms6i

    Hi, in Forms6i I'm using Autonomous transactions (insert and update), and I want to use also a database link to make a query in a remote database (Distributed transaction). Even when this request are done in different PL/SQL within Forms6i, I get the error message ORA-00164 Distributed transactions disallowed within autonomous transactions. Is there a way to avoid this error message?
    Thanx

    Hello,
    I had a similar Problem, when I tried to log errormessages while selecting by db-link.
    I use pipes now to send the errormessages. The pipe is read at regular intervals and then I can Insert without using autonomous transactions.
    I hope, this will help you
    Marcus

  • Distributed transaction using linked server not working in SQL Server 2008 64 bit

    Hi. I have had an issue trying to get distributed transactions to work in SQL Server 2008 using a linked server. The error message I get is
    OLE DB provider "SQLNCLI10" for linked server "pod1" returned message "No transaction is active.".
    Msg 7391, Level 16, State 2, Line 3
    The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "pod1" was unable to begin a distributed transaction.
    My Environment:
    Windows Server 2008 Enterprise 64 bit, SQL Server 2008 Enterprise 64 bit
    Problem occurs with multiple different builds of SQL Server 2008 - I have been able to reproduce the problem with 10.0.1600.0, 10.0.1779.0 (CU 2), as well as 10.0.2531 (SP1)
    I am aware that other people have had this issue and have reviewed all existing posts. I have verified that the MSDTC is configured correctly on both machines. I have also used DTCTester to verify that DTC is working correctly on all machines in question.
    None of the mentioned resolutions has solved this problem for me.
    I am not seeing this problem occur on my 32 bit test machines - it is only occurring if at least one of the two machines is 64 bit.

    Hi All,
    I realise that this topic may be a little bit out-of-date but if someone gets here from some search engine trying to find a solution for DTC problems, this MAY be useful.
    So... I recently had the same issue, tried all the approaches described in KB and other articles, but it didn't help. Because my task to solve this was not of the highest priority I forgot about it for some time.
    Today I was troubleshooting some other issue and, by accident discovered source of that first problem:
    In the EventViewer I found Error entry logged by MSDTC saying:
    "The local MS DTC detected that the MS DTC on vm-server1 (other machine name that also runs DTC - my comment) has the same unique identity as the local MS DTC. This means that the two MS DTC will not be able to communicate
    with each other. This problem typically occurs if one of the systems were cloned using unsupported cloning tools. MS DTC requires that the systems be cloned using supported cloning tools such as SYSPREP. Running 'msdtc -uninstall' and then 'msdtc -install'
    from the command prompt will fix the problem. Note: Running 'msdtc -uninstall' will result in the system losing all MS DTC configuration information."
    So I followed suggestion and run:
    msdtc -uninstall
    msdtc -install
    This solved my problems with DTC. Hope it will help someone.
    Piotr

  • 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

Maybe you are looking for

  • Issue in PDF printing using FOP

    We have configured Print server as per http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html section #5 However when we try to print pdf, it says "Page Cannot be found" In the print server oc4j log, here

  • Trouble connecting my iPad 3 to itunes.

    I have had my iPad (3) for a year and a half.  I set it up without ever physically connecting it to my pc.  I dont use iCloud.  So today I have tried to connecting it my pc to back it up via itunes.  But itunes wants to set it up as a new iPad or res

  • XIAdapter/PARSING/ADAPTER.SOAP_EXCEPTION - soap fault

    Hi Experts, I am trying to create a scenario SOAP to SOAP through AAE. There is no mapping involved. Sender is a 3rd Party application and receiver is SAP BusinessObjects [BI]. Following error is coming when posting the message from SOAPUI or through

  • Wrong thumbnails in album page

    Hi, iWeb '08 does something weird whenever one of my photo albums has multiple pages. I have an album with about 150 pictures where I limit the number of pictures per page to about 30. This creates a nice pagination link in the upper right corner all

  • Bridge CS5 Win Batch Rename sets milliseconds to 000

    Am using BridgeCS5 (Windows7) to Batch Rename (either during download from Lexar Card Reader using Bridge, or during download from Canon 7D with Cable via Bridge- or to batch rename files already in a folder within Bridge) when I use YYYYMMDD_HHMMSS_