Transaction Problem - Timeout

Folks
I am experiencing a Transaction timeout error on a supposed non-transacted method.
Here's the scoop. The Stateless Session bean MemberManager has the Transaction
Attribute set either as "SUPPORTS" or "REQUIRED". Gets and Finds are set to "SUPPORTS"
The Entity beans MemberBean and PolicyHolderBean have all method transaction
attributes set to SUPPORTS. As you can tell transaction mgt is handled at the
SBlevel.
<container-transaction>
<method>
<ejb-name>MemberManager</ejb-name>
<method-name>getMemberModel</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>MemberBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
<container-transaction>
<method>
<ejb-name>PolicyHolderBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
The call to MemberManager.getMemberModel is thus non-transacted. Yet I recieve
(from time to time) a Transaction timeout on the PolicyHolderBean.findByPrimaryKey.
(FYI there is a 1:1 CMR relationship between Member and PolicyHolder). The stack
trace follows. Any help is appreciated. Why is this being transacted?
####<Sep 23, 2002 2:12:43 PM EDT> <Error> <com.hmcng.service.job.AbstractJob>
<HMCAPPSVR3> <NextGen3> <Thread-111> <> <21104:3b4203690f8f04a5> <000000> <abstractjob.generate.exception.exception:
letterservice.updatejobstatuserror.remoteexception: Message was not sent because
transaction is not active. Name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],Xid=21104:3b4203690f8f04a5(3304037),Status=Rolled
back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed
out after 33 seconds
Name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],Xid=21104:3b4203690f8f04a5(3304037),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
since begin=33,seconds left=30,activeThread=Thread[Thread-111,2,main],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=started,assigned=none),SCInfo[hmc_letters+NextGen3]=(state=active),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],
weblogic.jdbc=t3://172.25.64.69:7901, LOCAL_ENTITY_TX=true}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+,
Resources={})],CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+)],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
since begin=66,seconds left=10,activeThread=Thread[Thread-111,2,main],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=rolledback,assigned=NextGen3),SCInfo[hmc_letters+NextGen3]=(state=rolledback),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],
weblogic.jdbc=t3://172.25.64.69:7901, LOCAL_ENTITY_TX=true}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+,
Resources={})],CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+)>
####<Sep 23, 2002 2:12:43 PM EDT> <Error> <com.hmcng.service.job.AbstractJob>
<HMCAPPSVR3> <NextGen3> <Thread-111> <> <21104:3b4203690f8f04a5> <000000> <abstractjob.generate.exception:
memberservice.getmembermodel.remoteexception: member.unable.to.find.member: Problem
in findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@14b404':
java.sql.SQLException: The transaction is no longer active (status = Rolling Back.
[Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out
after 33 seconds
Name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],Xid=21104:3b4203690f8f04a5(3304037),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
since begin=33,seconds left=30,activeThread=Thread[Thread-111,2,main],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=started,assigned=none),SCInfo[hmc_letters+NextGen3]=(state=active),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],
weblogic.jdbc=t3://172.25.64.69:7901, LOCAL_ENTITY_TX=true}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+,
Resources={})],CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+)]). No further
JDBC access is allowed within this transaction.
java.sql.SQLException: The transaction is no longer active (status = Rolling Back.
[Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out
after 33 seconds
Name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],Xid=21104:3b4203690f8f04a5(3304037),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
since begin=33,seconds left=30,activeThread=Thread[Thread-111,2,main],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=started,assigned=none),SCInfo[hmc_letters+NextGen3]=(state=active),properties=({ISOLATION
LEVEL=2, weblogic.transaction.name=[EJB com.hmcng.member.entity.MemberBean.findByPrimaryKey(java.lang.Integer)],
weblogic.jdbc=t3://172.25.64.69:7901, LOCAL_ENTITY_TX=true}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+,
Resources={})],CoordinatorURL=NextGen3+172.25.64.69:7901+hmc_letters+)]). No further
JDBC access is allowed within this transaction.
at weblogic.jdbc.jts.Connection.checkIfRolledBack(Connection.java:508)

          "Jeremy Meyer" <[email protected]> wrote:
          >I am running WL 6.0 on Win NT 4.0 SP 6
          >
          >I am having a problem with a transaction timing out while doing some stuff
          >with EJBs. They do some calculations that can take a few minutes and thus
          >the transactions must last that long but they are timing out after 30
          >seconds. I went to the console and changed the timeout time to a higher
          >setting. This seemed to work but then when I did the same thing a little
          >while later it timed out after 30 seconds again. I look at the console and
          >it says the timeout time is 180 seconds. Any thoughts on what I am doing
          >wrong/why it is acting this way? Thanks.
          Ugh. This is a known problem. As it turns out, EJB's deployment descriptor defaults
          to 30 seconds if a timeout value is not specified. It then overrides the JTA subsystem's
          default timeout settings.
          The workaround is to always specify a valid transaction timeout in the EJB's DD,
          and not to let it default.
          -Sriram
          

Similar Messages

  • Transaction-config @timeout

    Hi,
    I have problem with <transaction-config timeout="30000"/>.
    In EJB method I call stored procedure, which takes 1 minute to execute.
    And how it works in OC4J:
    EJB method last for minute, stored procedure returns it's results, but becasue 30000 timeout exception is thrown.
    That's stupid, so the only way to fix that is set timeout for eternity?
    If it always last as long as it takes, no matter of time set in @timeout, so what for do I need that timeout exception?
    Funny thing, is that I found similar posts on forum, first was from 2002, one from 2005 and few else. Each without answer...
    Is this really can't-be-fixed bug?
    For clearness, I don't have transaction neither in jdbc nor in stored procedure
    Any thoughts about that issue?
    MN

    Hi Jeff,
    Below is the data-source i have configured. And the transaction is not taking 10 min., at all. This transaction takes a time at the max of a minute r two. Actually, there are two cases. In first case, the number of database statements are less comparitavely to second case. So, during first case execution, it works fine. But for second one, it gives "Transaction Expired" problem.
         <data-source     
              class="oracle.jdbc.pool.OracleConnectionCacheImpl"
              name="GPTPool"
              location="GPTPool"
              pooled-location="jdbc/GPTPool"
              xa-location="jdbc/xa/GPTPool"
              ejb-location="jdbc/GPTPool"
              min-connections="5"
              max-connections="700"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              url="jdbc:oracle:thin:@10.10.11.46:1521:FMS"
              inactivity-timeout="600000"
              wait-timeout="600000"
         />
    Another problem i m facing with ias server is, that it throws Oracle error i.e.,
    java.sql.SQLException: ORA-00020: maximum number of processes (50) exceeded
    when there are more number of database statement executions. Actually, this was not happening with Weblogic Server previously(we have migrated to ias now). In weblogic,the connection pool size given was 10. Even then it worked fine irrespective of the number of database statement executions. But here, the max-connections is 700...I dont understand where the problem is!!! Kindly suggest what else should i configure in data-source.xml inorder to solve this problem.
    Waiting for your feedback,
    Thanx and Regards,
    Achyuth

  • Javax.transaction.SystemException: Timeout during commit processing

              In my Workshop 8.1 SP2 project I have a Custom Java Control whose methods I call
              from my JPF. From that custom control I create a remote connection to a Weblogic
              6.1 Application server. I execute remote methods and get the expected objects
              back with no problem. The problem is that I cannot return that object from my
              custom control back to my jpf. As soon as the method's return statement is executed,
              the process hangs for a considerable period of time and then throws the following
              Exception:
              An error has occurred:
              Exception while commiting Tx : Name=[EJB com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)],Xid=BEA1-0005BF0F3E6E72419698(655489),Status=Unknown,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
              since begin=217,seconds left=42983,XAServerResourceInfo[BMResourceManager]=(ServerResourceInfo[BMResourceManager]=(state=new,assigned=none),xar=null),SCInfo[midway+cgServer]=(state=active),SCInfo[prdsdomain+prdsserver]=(state=active),properties=({weblogic.transaction.name=[EJB
              com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(com.bea.wlw.runtime.core.request.Request)]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=cgServer+172.23.83.174:7001+midway+t3+,
              XAResources={},NonXAResources={})],CoordinatorURL=prdsserver+172.23.4.109:7041+prdsdomain+t3+);
              nested exception is:
              javax.transaction.SystemException: Timeout during commit processing
              Start server side stack trace:
              javax.transaction.SystemException: Timeout during commit processing
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:243)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
              at weblogic.transaction.internal.CoordinatorImpl.commit(CoordinatorImpl.java:68)
              at weblogic.transaction.internal.CoordinatorImpl_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              End server side stack trace
              caused by: : javax.transaction.SystemException: Timeout during commit processing
              Start server side stack trace:
              javax.transaction.SystemException: Timeout during commit processing
              at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:243)
              at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:189)
              at weblogic.transaction.internal.CoordinatorImpl.commit(CoordinatorImpl.java:68)
              at weblogic.transaction.internal.CoordinatorImpl_WLSkel.invoke(Unknown Source)
              at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
              at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:274)
              at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              End server side stack trace
              As soon as I take out RMI calls from my custom control's code, I can return any
              object I want back to my JPF. Here is the what I am thinking is happenning.
              The system that runs on Weblogic 6.1 manages its own transactions and begins a
              new transaction every time a session bean residing on that server is invoked.
              In addition, Weblogic 8.1 starts an internal transaction when the Custom Java
              Control makes a call. Could there be some kind conflict? If yes, is it possible
              to disable transactions from the Java Control?
              Thank you very much
              Alex Mayzlin
              

    Horst,
              "aa aa" <[email protected]> wrote in message news:20701457.1093414960276.JavaMail.root@jserv5...
              > we are getting the same Exception. As nobody replied to your question, it would be interesting, if you found any solution
              yourself?
              >
              > Additional info:
              > We are also getting these error messages from BEA when testing connections in pool before and after the exception:
              >
              > <20.08.2004 19.32 Uhr CEST> <Error> <JDBC> <BEA-001112> <Test "SELECT count(*) FROM invoice" set up for pool "ABCConnection Pool"
              failed with exception: "java.sql.SQLException: ORA-01591: lock held by in-doubt distributed transaction 4.47.141655".>
              Generally it's a good idea to use Oracle's system DUAL table
              for testing connections on reserve. Try to change your ABCConnection
              connection pool configuration to use DUAL as the test table
              instead of "invoice".
              Regards,
              Slava Imeshev
              

  • A Major Transaction Problem!

    "A" is a record which has already been inserted into a table(TBL).
    "insert(Y)" is a method that inserts a given record -Y- into TBL.
    "foo(X)" is a method that takes a record as a parameter and queries it on a view(VIEW). This view is a
    huge select statement that selects from TBL.
    Here is the problem:
    insert(B);
    foo( A ); /* returns true */
    but
    insert(B); /* B does not exist in TBL */
    foo(B); /* returns false and catches an exception that "A" is not found! */
    insert(Y) method is a CMP EJB method but foo(X) uses JDBC to access DBMS.
    so what can cause this transaction problem?
    thanks in advance,
    -selcuk

    Hi,
    Maybe foo is running in a different transaction than insert?
    Some possible causes:
    -you are starting a new transaction for foo, either via the UserTransaction or via REQUIRES_NEW
    -you are using a regular JDBC driver for foo instead of an XADataSource.
    Did you try to set foo's transaction attribute to REQUIRED?
    Best,
    Guy
    http://www.atomikos.com

  • Transaction problems

    If anyone can help point me in the right direction of what I should be looking for in my configuration files for the following transaction problem. It looks like the delete is being committed one entity at a time instead of at the ened of the transaction.
    I'm using OC4J, eclipselink and Spring.
    I have two entities that I am trying to delete. They have a OneToOne relationship which in the underlying database (Oracle) has a deferred foreign key integrity constraint. I believe that this means that if the intities are delted in the same transaction everything should work, but if they are deleted in seperate transactions then the constraint should kick in and disallow the delete. I am using code similar to below to attempt to delete in one transaction. I am using Spring to inject an EntityManager and to control the transaction handling.
    @Transactional(readOnly=true)
    public class ProductServiceImpl implements ProductService{ 
      @PersistenceContext(type = PersistenceContextType.TRANSACTION)
      private EntityManager emp;
      @Transactional(readOnly=false, propagation=Propagation.REQUIRES_NEW)
      public void deleteProduct(Product prod){
          Object managedEntity = em.find(product.getClass(), prod.getId);
          em.remove(managedEntity);
    }Spring configuration xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:jee="http://www.springframework.org/schema/jee"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
      <jee:jndi-lookup id="myEmf" jndi-name="persistence/JPA"/>
      <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
      <bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager">
        <property name="entityManagerFactory" ref="myEmf"/>
      </bean>
      <tx:annotation-driven transaction-manager="txManager"/>
      <bean id="ProductService" class="ProductServiceImpl"/>
    </beans>On calling the delete I get the following error message
    org.springframework.transaction.TransactionSystemException -
        Could not commit JPA transaction; nested exception is
        javax.persistence.RollbackException: Exception [EclipseLink-4002]
            (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080508)):
        org.eclipse.persistence.exceptions.DatabaseException Internal Exception:
        java.sql.SQLException: ORA-02091: transaction rolled back ORA-02292:
        integrity constraint (RVEL_FK) violated - child record found Error Code: 2091 Call:
        DELETE FROM RVEL_REVENUE_ELEMENT WHERE (ID = ?) bind => [6594]
        Query: DeleteObjectQuery(RevenueElement@1eafdce)I have also tried doing all this programatically, using a jndi lookup as follows
    EntityManager em = null;
    try{
      Context ctxt = new InitialContext();
      emf = (EntityManagerFactory)ctxt.lookup("jpaTest/ServerJPA");
      em = emf.createEntityManager();
      EntityTransaction et = em.getTransaction();
      try{
        et.begin();
        em.remove(managedEntity);
        et.commit();
      } finally{
        if(et != null && et.isActive()){
          et.rollback();
    } catch(NamingException nme) {
    } finally{
      if(em != null && em.isOpen()){
        em.close();
    } When debugging the error is thrown on the line
    em.remove(managedEntity);before the transaction commit is called.

    Thanks for the reply.
    The managed entity being deleted in the call to the delete method has one to many relationship with one of the entities in the one to one relationship which then has a reference to the second entity. These references are annotated with cascade ALL.
    A --> B --> C. The error is referring to entity C and its relationship back to B. The error is being thrown before the transaction is being committed.
    After doing a bit more research I believe that it is caused by the lack of the following property in my persistence.xml.
    <property name="eclipselink.target-server" value="OC4J_10_1_3"/>But if I put this property in then I get the errorException creating EntityManagerFactory using PersistenceProvider class org.eclipse.persistence.jpa.PersistenceProvider for persistence unit ServerJPA.

  • Web service problem (Timeout)

    hello
    i hope this is the right category to post my problem
    i want to use the service "customerCRMChangeRequestConfirmation_In"
    but i get this error message: "Error getting response; java.net SocketTimeoutException: Read timed out.
    on my search to fix this problem i found the SAP Note 826419.
    with following advice:
    ===========================================================================================
    Version NW 7.10
    Using NetWeaver Administrator
              o For standard Web service deployable proxy:
                1.  Open SAP NetWeaver Administrator in a browser: http:// "Web Services Administration".
                3.  Choose "Proxy Definitions by Name" and click "GO".
                4.  Select the proxy you want to configure.
                5.  Choose the "Configuration" tab.
                6.  Choose the "Logical Ports" tab.
                7.  Select the logical port you want to configure and choose "Edit".
                8. Choose the "Transport Settings" tab.
                9. Edit the "Max wait-time for HTTP response (in milliseconds)" field.
                10. Click "Save" to save the settings.
    ============================================================================================
    but in my Transport Settings are no "May wait-Time for HTTP response-field"
    what is the problem? i have an SAP CRM IDES System with Netweaver 7.1
    do I need to install an sp?
    I also found this solution for my read time out problem:
    http://wiki.sdn.sap.com/wiki/display/TechTSG/%28WSR%29Problems-P01
    but this solution with "Visual Administrator" is for java stack, right?
    thank you for your help!
    kind regards
    sven möller

    Hi Sven,
    There could be several reasons for this timeout but seeing as this is an IDES System things should generally work fine (it's not always the case though).
    I would suggest increasing the socket timeout on SoapUI & then test the webservice again. If you are unsure of how to do this just Google 'SoapUI Test Case Socket Timeout' or something similar. You first need to create a test suite/case & then you can control the socket timeout on SoapUI.
    Just in case, I would also check that the webservice service is configured correctly by launching transaction code SOAMANAGER from the IDES CRM & searching for this service (look for the change customer service under service providers). Just verify that all endpoint configuration is correct.
    I would also verify if you have the necessary authorizations (for your IDES login user) to change a customer.
    Lastly, I would setup a trace/recording using the ICF Recorder for your IDES login user (Google 'SAP ICF Recorder' for correct usage). Turn on the recorder to trace your incoming request in IDES & trace the outgoing response from IDES.
    You could also try viewing Transaction Codes ST11 & ST22 that trace incoming requests into the IDES Application Server. This may highlight any authorization related issues.
    Best Regards, Trevor

  • A transaction problem in cluster environment,help!

              I need to take a complicated data operation which will have to call sevearl SQL
              sentences to add datas into DB in a circle. In order to minimize the cost of DB
              connection, I use one connection to create 5 statements,which are used to add
              datas repeatedly. You can read the corresponding codes below. These codes run
              very well in stand-alone environment,but problem occurs when changed to cluster
              environment. The console shows that it's timeout because the transaction takes
              too long time. But when it runs in stand-alone environment,it completes in less
              than one second! In both situations I use the same TX data source. I guess when
              changed to cluster environment,the transaction processing becomes very complicated
              and then it leads to dead-lock. Anybody agrees with this, or has any experience
              about it before? Help,thanks a lot!
              conn = getConnection();
              pstmt3 = conn.prepareStatement
              (DBInfo.SQL_RECEIPTPACK_CREATE);
              pstmt4 = conn.prepareStatement
              (DBInfo.SQL_RECEIPT_CREATE);
              pstmt5 = conn.prepareStatement
              (DBInfo.SQL_RECEIPTPACKAUDIT_INSERT_ALL);
              pstmt6 = conn.prepareStatement
              (DBInfo.SQL_RECEIPTAUDIT_INSERT_ALL);
              int count = (endno+1-startno)/quantity;
              for(int i=0;i<count;i++)
              int newstartno = startno +
              i*quantity;
              int newendno = newstartno +
              quantity - 1;
              String newStartNO =
              Formatter.formatNum2Str(newstartno,ConstVar.RECEIPT_NO_LENGTH);
              String newEndNO =
              Formatter.formatNum2Str(newendno,ConstVar.RECEIPT_NO_LENGTH);
              pstmt1 = conn.prepareStatement
              (DBInfo.SQL_RECEIPTPACK_SEQ_NEXT);
              rs1 = pstmt1.executeQuery();
              if(!rs1.next()) return -1;
              int packid = rs1.getInt(1);
              cleanup(pstmt1,null,rs1);
              pstmt3.setInt(1,packid);
              pstmt3.setString(2,newStartNO);
              pstmt3.setString(3,newEndNO);
              pstmt3.setInt(4,quantity);
              pstmt3.setLong(5,expiredt);
              pstmt3.setInt
              (6,ConstVar.ID_UNIT_TREASURY);
              pstmt3.setInt
              (7,Status.STATUS_RECEIPTPACK_REGISTERED);
              pstmt3.setLong(8,proctm);
              pstmt3.setInt(9,procUserid);
              pstmt3.setInt
              (10,ConstVar.ID_UNIT_TREASURY);
              pstmt3.setInt(11,typeid);
              pstmt3.addBatch();
              //audit
              pstmt5.setInt(1,procUserid);
              pstmt5.setInt(2,packid);
              pstmt5.setInt
              (3,OPCode.OP_RCT_RGT_RECEIPTPACK);
              pstmt5.setLong(4,0);
              pstmt5.setLong(5,proctm);
              pstmt5.addBatch();
              for(int
              j=newstartno;j<=newendno;j++)
              String receiptNO =
              Formatter.formatNum2Str(j,ConstVar.RECEIPT_NO_LENGTH);
              pstmt2 =
              conn.prepareStatement(DBInfo.SQL_RECEIPT_SEQ_NEXT);
              rs2 =
              pstmt2.executeQuery();
              if(!rs2.next()) return -
              1;
              int receiptid =
              rs2.getInt(1);
              cleanup
              (pstmt2,null,rs2);
              pstmt4.setInt
              (1,receiptid);
              pstmt4.setString
              (2,receiptNO);
              pstmt4.setInt
              (3,Status.STATUS_RECEIPT_REGISTERED);
              pstmt4.setDouble
              (4,00.0);
              pstmt4.setInt(5,0);
              pstmt4.setDouble
              (6,00.0);
              pstmt4.setDouble
              (7,00.0);
              pstmt4.setDouble
              (8,00.0);
              pstmt4.setInt
              (9,procUserid);
              pstmt4.setLong
              (10,proctm);
              pstmt4.setLong
              (11,expiredt);
              pstmt4.setInt(12,0);
              pstmt4.setInt
              (13,packid);
              pstmt4.setInt
              (14,typeid);
              pstmt4.addBatch();
              //audit
              pstmt6.setInt
              (1,procUserid);
              pstmt6.setInt
              (2,receiptid);
              pstmt6.setInt
              (3,OPCode.OP_RCT_RGT_RECEIPTPACK);
              pstmt6.setLong(4,0);
              pstmt6.setLong
              (5,proctm);
              pstmt6.addBatch();
              pstmt3.executeBatch();
              cleanup(pstmt3,null);
              pstmt5.executeBatch();
              cleanup(pstmt5,null);
              pstmt4.executeBatch();
              cleanup(pstmt4,null);
              pstmt6.executeBatch();
              cleanup(pstmt6,null);
              

    Hello,
    Are you using any kind of Load Balancer, like an F5. I am currently troubleshooting this issue for one of our ADF apps and I originally suspected the F5 was not sending traffic correctly. We have not set the adf-config file for HA and the dev team will fix that. But my concern is that will just hide my F5 issue.
    Thanks,
    -Alan

  • Big transaction problem...

    I have a big application to change, and my problem is in the connction:
    I have to do it transactional so I can rollback all if fails... but the application fails and I don't know why.
    When it should do a update in a table in which another inserts have been done previously -and many operations too in the same ddbb- it crash: there's no exception, the application is like waiting something...
    I have only one static connection with the autocommit setted to false and the sqls are well done.
    help pleaseeee Any idea?

    It sounds like a tranaction is waiting on another. Based on your SQL server the esiest thing to do is to monitor the SQL server for Locked processes. A process will fire and tell you that it's waiting on another process to finish. Checkout the SQL executing in the locked process and try an tie this back to a SQL Statement within code.
    You might find that you are writting into a recordset that's locked somewhere else. This will always timeout as one is waiting on the other :)
    I think that Java 's default is to never time out the system will wait forever and not produce an exception but you can try and change this in your Database Handler class.
         public ResultSet getArray(String sql) throws SQLException {
              Statement stmt = this.con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
              stmt.setQueryTimeout(3);
              try {
              ResultSet rs = stmt.executeQuery(sql);
              return rs;
              } catch(SQLException e) {
                   // Break here and find out whats goin on!
                   system.out.println("SQL Crapped out: " + sql);
              return null;
         }You can then wait for the timeout and catch the SQLException
    Edited by: Gizard on Apr 21, 2009 6:01 AM

  • Stored procedure in a transaction problem

    hello to everybody
    I have an application under weblogic8.1 sp3.
    I have to call an Oracle stored procedure that populate a table and I have to see the new record anly at the end of the ejb service transaction ( a Container transaction ).When the procedure terminate I see the db data before the transaction end.So I have created a XA DataSource and changed the oracle 9.2 thin drivers in oracle 9.2 thin drivers XA.But Now I receive this Oracle Error:
    ORA-02089: COMMIT is not allowed in a subordinate session
    Why?How Can I resolve my problem?Can Anyone Help Me?Thanks...

    giorgio giustiniani wrote:
    hello to everybody
    I have an application under weblogic8.1 sp3.
    I have to call an Oracle stored procedure that populate a table and I have to see the new record anly at the end of the ejb service transaction ( a Container transaction ).When the procedure terminate I see the db data before the transaction end.So I have created a XA DataSource and changed the oracle 9.2 thin drivers in oracle 9.2 thin drivers XA.But Now I receive this Oracle Error:
    ORA-02089: COMMIT is not allowed in a subordinate session
    Why?How Can I resolve my problem?Can Anyone Help Me?Thanks...It sounds like you have transactional syntax embedded in your
    procedure. You can't do that and still include it in an XA
    transaction.
    Joe

  • How to prevent users from creating transactional problems?

    Dear Sirs...
    Using JDeveloper 10.1.2 and ADF UIX technology. If i created a web application that contains many pages. Assume the application contains pages A,B,C,D.
    The end user should access the pages A then B then C then D to get the transaction executed and commited correctly.
    the problem is:
    1- if a user navigates from A to B to C then he press the Back button to A then he commits the transaction, the data would be stored in correctly.
    2- if page C requires some preparations in page B (initalization of session variables) and the user enters page A then he changes the URL to C, then this would cause inproper execution of application and so the data would be stored incorrectly.
    so how can i prevent the user from pressing the back button of the browser (which i do not think is possible) or how can i prevent him from making any errors by inproper page navigation?
    thanks for any help in advance and best regards

    I really don't know if this is the correct way of doing it, but we prevent navigation directly to any page within our application if the HTTP Referer header is null. If it's null, we redirect to a page that says the user should use the navigation buttons provided and not enter the page via bookmarks, history, or direct navigation via a typed in URL.

  • Add a New Field to Selection Screen of VL10 Transactions problem

    Hello,
    i have tried to add a selection field in the VL10G. I have used the docu from Gaurav Jagya (Thanks to Gaurav) an followed the steps. Here you can find the docu: Link: [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e07c282f-e2b4-2c10-e4b3-a314fc17b6a1]
    In the Step 2 , Point 4 i declare the Select option ST_MTART and use it later in Step 5  in the form USEREXIT_SELECT_OPTIONS_TRANSF.
    Step 2.
    4. Write the declaration of new select-option inside include ZV50RSEL_MTART.
    DATA: V_MTART TYPE MARA-MTART.
    SELECT-OPTIONS: ST_MTART for V_MTART.
    Step 5. Transfer values from selection screen to range.
    For this step, again an access key is required to modify include V50R_USEREXIT_TRANSF.
    1. Open include V50R_USEREXIT_TRANSF in change mode. It will ask for an access key. Enter the same and proceed.
    2. Write following line of code inside form USEREXIT_SELECT_OPTIONS_TRANSF:
    CX_SELECT_OPTIONS-MTART = ST_MTART[].
    When i start the VL10G it works fine, but when i start another VL10* transaction i get a dump. Example VL10:
    Runtime Errors         SYNTAX_ERROR
    Date and Time          20.04.2010 13:54:00
    Short text
         Syntax error in program "RVV50R10C ".
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "SAPLV50R_PRE" had to be terminated because it has
         come across a statement that unfortunately cannot be executed.
         The following syntax error occurred in program "RVV50R10C " in include
          "V50R_USEREXIT_TRANSF " in
         line 18:
         "field "ST_MTART unknown. .."
    It dumped, because the form V50R_USEREXIT_TRANSF is used in EVERY VL10* transaction and the select-option is declared ONLY in my Z-include.
    Is the someone out there, who has solved the problem? Is the an error in the docu or am i wrong?
    Thanks!
    Andreas

    Has there been any further information on this issue in this or any other threads. I am encountering the same issue as identified by Andreas.
    Thanks,
    Brian

  • Transaction problem in ejb

    Hi
    I have a problem related to CMP entity beans.
    I am using Oracle 9i and weblogic 6.1
    Here is the description of the problem.
    The transaction attribute of all the beans is set to 'Required'.
    I have a PersonBean (CMP) in Person.jar mapping to Person table along with other
    beans.
    I have a MemberBean(CMP) in Member.jar file mapping to Member table along with
    many other beans.
    There is a one to many relation ship between person and member tables in Oracle
    9i database :
    Id in the person table is the P_Key and Person_Id in Member table is the related
    foreign key.
    No relationship was made between Person and Member beans as there were in two
    different jar files with different deployment descriptors.
    I have a stateless session bean PersonService bean.
    There is a method in PersonService bean called createPerson(String name);
    This method creates Person in the database using Person p = PersonHome.create(),
    long personId = p.getId()..returns the primary key of the person.
    PersonService calls createMember(long personId) now.
    which will try to create a Member record in the database using the personId.
    Now the Member bean fails to create and the transaction is rolled back with a
    foreign_key violation exception.
    because it cannot locate the Person EJB Primary key entry in the underlying table.
    But the EJB cache is still inserted properly with Person EJB (findByPrimaryKey
    works).
    I feel that Member bean is not able to participate in the same transaction of
    the Person bean inspite of keeping the transaction attribute to 'Required'.
    When I keep the transaction of Person bean to 'RequiresNew', then the transation
    of createPerson is getting committed and Member is starting a New transaction
    and it gets created.
    But I donot want like this.
    I want all the beans to be participating in the same transaction.
    According to Oracle / Weblogic documentation the default database isolation mode
    Read_Committed should allow participants in transaction to see uncommitted data
    while participants outside the transaction see only committed data. I have tried
    other dataabase isolation modes (such as Read_Uncommitted, "Serializable") these
    appear to either create other problems or not have an affect.
    Any solution to this problem is highly appreciated.
    Thanks
    Lavanya

    Previously our code was running on Weblogic where
    methodA() -> Transaction Attribute -> Supports
    methodB() -> Transaction Attribute -> Required
    But in JBOSS in order to run the same thing we have to do
    methodA() -> Transaction Attribute -> Required
    methodB() -> Transaction Attribute -> Required
    Any Pointers??

  • Transaction problem with jconn5.2

    jconn5.2 and iASsp2
    I am using Bean Managed Transaction in my application, start the first
    transaction is fine, but once the application going to start another
    transaction, errors occoured:
    "the transaction onwer is not in current thread".

    Hi,
    I've had the very same problem with RAD.
    Try to set the Transaction attribute to SUPPORTS. With SUPPORTS the EJB method will use the same transaction as the caller.
    package hu.bme.ett.raktar.facade;
    import hu.bme.ett.raktar.ejbs.Raktar;
    import hu.bme.ett.raktar.ejbs.controller.RaktarManager;
    import javax.ejb.Stateless;
    import javax.ejb.TransactionAttribute;
    import javax.ejb.TransactionAttributeType;
    @Stateless
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    public class RaktarListazas implements RaktarListazasLocal {
         RaktarManager rm = new RaktarManager();
         * Default constructor.
        public RaktarListazas() {
            // TODO Auto-generated constructor stub
        public Raktar getRaktar(long raktId) {
             return rm.findRaktarByRaktId(raktId);
        public void createRaktar(long raktId) {
             Raktar r = new Raktar();
             r.setRaktId(raktId);
             r.setRaktAzonosito("Y1RAK-01" + raktId);
             r.setMegnevezes("Elso raktaram");
             try {
                   rm.createRaktar(r);
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Cheers,
    Viktor

  • DB Transaction problem in 9.0.2i

    The problem is in Oracle 9iAS version 9.0.2.
    Windows 2000
    Oracle 8.1.7i R3 DB
    When I shutdown (manualy) the server in the midle of some DB transaction, some of data are commited in the database. Everything is OK when the my application throws some Exception in the midle of transactin, no data are commited in the DB (DB rollback the transaction).
    So, the server that is manualy stoped commit started transaction no matter that transaction is not finished yet.
    This problem consist in both EntityEjb updating and JDBC updating DB.
    Thanks in advance
    Dusan Petrovic

    9.0.2.0.1 is certified with XP Pro only (not Home edition), if you check on Metalink.

  • Global transaction problem with JDriver/Oracle and Oracle XA

    We are haveing serious problems with Container Managed Transactions on Bea 6.1
    and Oracle with EJB having set "Required" for all methods. We have tried in vain
    to make it work with JDriver as well as OracleXAClient. Both fail at sometime
    during the execution throwing "Not called in cotext of global transaction" (with
    JDriver) OR "XAER_PROTO : Routine was invoked in an
    inproper context start() failed on resource 'OracleXAPool'" (this one with oracle
    XA).
    1.) Weblogic JDriver-XA:
    DatabaseMetaData metaData = dataSource.getJDBCConnection.getMetaData();
    ResultSet resultSet = metaData.getTables(null, null, tableName.toUpperCase(),
    new String[]{"TABLE"});
    This fails immmediately saying that it was not called from global transaction.
    Interesting thing is that with OracleXA, it doesnt say this exception at this
    check point.
    2) Oracle XA
    Okie, we couldnot read through the CLOB using it so for reading CLOB, we used
    direct jdbc connection and then did away with it. Now all next sql queries were
    executed against oracle pool using XA data source with OracleXAClient. But at
    some point we again ran into the problem "XAER_PROTO : Routine was invoked in
    an
    inproper context start() failed on resource 'OracleXAPool'"
    3 Oracle Thin Driver
    everything always works with it.

    AFAIR this issue was resoved by moving tx opreations out from non-tx
    methods.
    Regards,
    Slava
    "Apurb Kumar" <[email protected]> wrote in message
    news:[email protected]...
    Jawad,
    It would be nice if you can post the full stack trace error message. Didyou try moving to
    the latest service pack (sp2) for WLS6.1.
    Thanks,
    Jawad Mahmood wrote:
    Yes we had correctly set TXDataSource and let it to point to the right
    connection
    pool each time and it worked well with oracle thin driver but not whenwe switched
    the pool to JDriver or OracleXAClient. Note that we could aways confirmthat pool
    was successfully created alongwith we could retrieve connection from itvia TXDatSource,
    things gave problem after we attempted to do what i had mentioned in mylast posting.
    >>
    Also with JBoss 2.4.4 things work pretty well. So couldnt be our codeproblem.
    "Slava Imeshev" <[email protected]> wrote:
    Jawad,
    Did you set up TxDataSource?
    Regards,
    Slava Imeshev
    "Jawad Mahmood" <[email protected]> wrote in message
    news:[email protected]...
    We are haveing serious problems with Container Managed Transactionson
    Bea 6.1
    and Oracle with EJB having set "Required" for all methods. We havetried
    in vain
    to make it work with JDriver as well as OracleXAClient. Both fail atsometime
    during the execution throwing "Not called in cotext of global
    transaction"
    (with
    JDriver) OR "XAER_PROTO : Routine was invoked in an
    inproper context start() failed on resource 'OracleXAPool'" (this onewith
    oracle
    XA).
    1.) Weblogic JDriver-XA:
    DatabaseMetaData _metaData =
    _dataSource.getJDBCConnection.getMetaData();
    ResultSet resultSet = metaData.getTables(null, null,tableName.toUpperCase(),
    new String[]{"TABLE"});
    This fails immmediately saying that it was not called from globaltransaction.
    Interesting thing is that with OracleXA, it doesnt say this exceptionat
    this
    check point.
    2) Oracle XA
    Okie, we couldnot read through the CLOB using it so for reading CLOB,we
    used
    direct jdbc connection and then did away with it. Now all next sqlqueries
    were
    executed against oracle pool using XA data source with
    OracleXAClient.
    But
    at
    some point we again ran into the problem "XAER_PROTO : Routine wasinvoked
    in
    an
    inproper context start() failed on resource 'OracleXAPool'"
    3 Oracle Thin Driver
    everything always works with it.
    Apurb Kumar

Maybe you are looking for