SET TRANSACTION must be first statement of transaction

I am using oracle8i db with sun one 7.0. i use the oracle thin driver to talk to the db. i have bunch of session beans which uses the oracle data source. when i invoke the session bean, i get this ORA-01453 error.
Here is my jdbc properties:
<jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="true" is-connection-validation-required="true" connection-validation-method="table" fail-all-connections="false" datasource-classname="oracle.jdbc.xa.client.OracleXADataSource" name="JSBContainerPool" res-type="javax.sql.XADataSource" validation-table-name="dual" transaction-isolation-level="read-committed">
<property value="jdbc:oracle:thin:@muruga:1521:DEV" name="URL"/>
<property value="muruga" name="User"/>
<property value="muruga" name="Password"/>
</jdbc-connection-pool>
<jdbc-resource enabled="true" pool-name="JSBContainerPool" jndi-name="jdbc/JSBContainerDataSource"/>
Error message:
The exception reported is: "java.sql.SQLException: ORA-01453: SET TRANSACTION
must be first statement of transaction
WARNING: CORE3283: stderr: at oracle.jdbc.dbaccess.DBError.throwSqlExceptio
n(DBError.java:168)
WARNING: CORE3283: stderr: at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.j
ava:208)
WARNING: CORE3283: stderr: at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543
WARNING: CORE3283: stderr: at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Pro
tocol.java:1405)
WARNING: CORE3283: stderr: at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFet
ch(TTC7Protocol.java:822)
WARNING: CORE3283: stderr: at oracle.jdbc.driver.OracleStatement.executeNon
Query(OracleStatement.java:1446)
WARNING: CORE3283: stderr: at oracle.jdbc.driver.OracleStatement.doExecuteO
ther(OracleStatement.java:1371)
WARNING: CORE3283: stderr: at oracle.jdbc.driver.OracleStatement.doExecuteW
ithTimeout(OracleStatement.java:1900)
WARNING: CORE3283: stderr: at oracle.jdbc.driver.OracleStatement.execute(Or
acleStatement.java:737)
WARNING: CORE3283: stderr: at oracle.jdbc.driver.OracleConnection.setTransa
ctionIsolation(OracleConnection.java:1081)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.Jdbc20XaAllocator
$ConnectionWrapper.setTransactionIsolation(Jdbc20XaAllocator.java:196)

In the connection pool setting in Admin server under the section Transaction Isolation deselect the option "Guarantee Isolation Level" .This should solve the problem.
regards
Kris

Similar Messages

  • JdbcRowSetXImp (..): SET TRANSACTION must be first statement of transaction

    Hi.
    Im running JSC created application and getting in the log file this messages:
    [date & time] warning (24167): CORE3238: stderr: JdbcRowSetXImpl (setTransactionIsolation): [Sun][Oracle JDBC Driver][Oracle]ORA-01453: SET TRANSACTION must be the first statement of transaction
    As you may see, Im using JSC JDBC drivers. Im running on Sun One Web Server version 6.1 sp2 on Linux RedHat 3Ent. The application was builded with JSC me with latest patch applied.
    It seems a bug in the JdbcRowSetXImpl.
    Has someone similar problem?
    Regards.

    Hi John.
    This message is present on all log file a few days after the application began in production use, almost a month ago.
    The only change done in the configuration few days after the app was deployed was "Guarantee Isolation Level" in the JDBC connection pool configuration, switched from OFF to ON.
    Yesterday I turn OFF again and have no more messages about SET TRANSACTION...
    I guess that the SET TRANSACTION is issued two times, one by the web server before giving the connection to the app then by the row set impl.
    I will let you known if the messages appears again (I guess not).
    Regards.

  • Again on "call to this must be first statement in constructor"

    Hi, I've spent the last hour reading tons of docs & threads about the "call to this must be first statement in constructor" problem, but I still cannot work it out.
    Here is the code
         public Orologio(String s)
              StringTokenizer exploder=new StringTokenizer(s,":",false);
              this(Integer.parseInt(exploder.nextToken()),Integer.parseInt(exploder.nextToken()));
              }Well, I know this..() must be the first line in the method, but I need to parse my input string before passing the parameters to the Orologio(int,int) constructor!
    Thankyou!

    You could define an initialization method:private void init(int a, int b) {
        ... your initialization code that was in your constructor...
    public Orologio(String s) {
        StringTokenizer exploder=new StringTokenizer(s,":",false);
        init(Integer.parseInt(exploder.nextToken()),Integer.parseInt(exploder.nextToken()));
    public Orlogio(int a, int b) {
        init(a, b);
    }However, make sure it is the responsability of this class to handle String as constructor parameter. Maybe you should force the client to tokenize the string and provide integer values to the constructor (and then get rid of the Orologio(String s) constructor.)

  • Call to super must be first statement

    I'm new to Java and I have a question regarding super(). I'm implementing a design where we have a custom exception which extends Exception. The design calls for null messages to lead to throwing an IllegalArgumentException, but Exception's constructor does not throw an IllegalArgumentException for a null message.
    Here is what I want to do, but not allowed to since super must be the first statement in the constructor:
    public CustomException(String message) {
        if (message == null) {
            throw new IllegalArgumentException("message cannot be null.");
        super(message);
    }I could call super first and then throw an exception if the message is null, but that doesn't seem like a good solution.

    public CustomException(String message) {
        super(nullCheck(message));
    static String nullCheck(String message) {
        if (message == null) {
            throw new IllegalArgumentException("message cannot be null.");
        return message;
    }

  • Call to super must be first statement in constructor

    Why i've receive this message if the code of the constructor is that:
    public void Angulo(String Base){
         super(Base);
    The call to superclass constructor is the first statement on this function.
    Can somebody helpme? Thanks

    Hi,
    This is a regular function and not a constructor. If it is, then it should be
    public Angulo(String Base){
    super(Base);
    Hope this helps,
    Kurt.

  • "call to this must be first statement in constructor"

    Here's the code:
    public class TAGEmail {
        private StringBuilder sTO = new StringBuilder();
        public TAGEmail()
        public void setTO(String sRecipient)
            this( sRecipient, true );
        public void setTO(String sRecipient, boolean bAppend)
            String sRegexPattern = "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$";
            Pattern oPattern = Pattern.compile(sRegexPattern, Pattern.CASE_INSENSITIVE);
            Matcher oMatcher = oPattern.matcher(sRecipient);
            if( ! oMatcher.find() )
                oLogger.addEntry(2,"Email address '" + sRecipient + "' is not a valid e-mail address!");
            if( sTO.equals(null) || bAppend )
                sTO.append( "\"" + sRecipient + "\"" );
            else
                sTO.delete( 0, sTO.length() );
                sTO.append( "\"" + sRecipient + "\"" );
    }The part I don't get is that it's not in a constructor...and it is the first line of the method it's in. Am I missing something?

    Ah. My thought process was just the opposite. If
    the compiler is going to add it anyway, I'll just do
    it now. Symantics, I suppose.Well, the compiler doesn't add it into the source code. It simply interprets the two expressions identically. (It might be possible that something is hiding or shadowing the method so that this. is necessary for disambiguation. I've only seen that with variables though. I don't know if it can ever be an issue with methods. If it happens, I'd say something is poorly named.)

  • Super- first statement in constructor.

    my compiler (Jcreator LE) doesn't seem to recognize that super is the first statement in the constructor, and gives me an error message (the same thing happens using the this keyword).
    public void Student(String str, int day, int mo, int yr, String maj)
    super(str,day,mo,yr);
         major=maj;
         return;
    With that code as the constructor, I get this error message
    C:\Java\JCreator le\MyProjects\Lab 5\Student.java:8: call to super must be first statement in constructor
              super(str,day,mo,yr);
    If anybody has any ideas why this is happening or what I can do to correct it, I would appreciate it.
    Thanks,
    Gareth

    You are trying to call a method.
    Instead you have to use super( ) to controll the construction
    of a parent class part of an object.
    Code is something like this:
    class Student {
      public Student(String str) {
         // initialize this object using str
      public Student(int day) {
        // initialize this object using day
    class FromStudent extends Student {
        public FromStudent(String str) {
           // pass control to Student constructor
           super(str);  // the first constructor here
        public FromStudent(int day) {
           // pass FromStudent to Student constructor
          super(day);  // the first constructor here

  • Any idea why super() and this() needs to be first statement

    Java recommends super() and this() to be the first statement to be used.why this design constraint is imposed?
    This imposes one more restriction
    where super() and this() cannot be used at the same time?
    how this constraint is useful.
    for eg:
    class A
         A(int a)
         System.out.println("A(int)");
         A(int a,int b)
         System.out.println("A(int,int)");
    class B extends A
         B()
              super(1);
              System.out.println("B()");
         B(int i)
              this();
              super(1,1);//compile-error :must be first statement
    the above eg may be a bad design,but are the constraints imposed for this purpose?or anything else?

    To make sure that the constructor is the first thing that runs, and to make sure >the super instance is completely constructed before we do anything with the >child instance.
    Both these go toward having the object be in a consistent, valid state.I accept the point,but considering the code part
    B()
       //super(1);
    System.out.println("B()");
    B(int i)
    super(1,1);
    this();
    }in above super instance will be constructed first followed by this().
    but this() cannot be used as second statement???
    I feel ,this is because this() in turn calls the super constructor again?to restrict this constraint made?is it something like that?

  • The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Hello All,
    I am getting below error can you please help me
    Error:-
    The transaction associated with the current connection has completed but has not been disposed. The transaction must be disposed before the connection can be used to execute SQL statements.

    Perhaps this thread will help you out
    http://stackoverflow.com/questions/11453066/error-the-transaction-associated-with-the-current-connection-has-completed-but
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Statement in Transaction Does Not Roll Back

    I have a group of MySQL statements in a method of a Java application.
    I include an SQL error in the last statement to test the rollback of the transaction.
    All the statements roll back, EXCEPT for the one detailed below.
    The MySQL table:
         CREATE TABLE Counter (
              number INT( 4 ) NOT NULL DEFAULT 0,
              account_id VARCHAR( 12 ) NOT NULL PRIMARY KEY
         ) ENGINE = InnoDB;I have run the staement as a PreparedStatement and a Statement:
    PreparedStatement:
         String updateCounterStr =
              " UPDATE Counter " +
                   " SET number = number + 1 " +
                   " WHERE account_id = ? "
         updateCounter = con.prepareStatement ( updateCounterStr );
              updateCounter.setString( 1, accountID );
              int uc = updateCounter.executeUpdate();     Statement:               
         Statement updateCounterStatement = con.createStatement();
              int updatecounter = updateCounterStatement.executeUpdate(
                   "UPDATE Counter SET number = number + 1 " +
                   "WHERE account_id = \'" + accountID + "\'"
              con.setAutoCommit( true );     //     ------------------------------------ Transaction ENDS
              updateCounterStatement.close();
    //               updateCounter.close();
              ... several more
              con.close();
         } catch(SQLException ex) {
              System.err.println("SQLException: " + ex.getMessage());
              if (con != null) {
                   try {
                        System.err.print("Transaction is being ");
                        System.err.println("rolled back");
                        con.rollback();     //     < ------------------------------------ con.rollback() HERE
                   } catch(SQLException excep) {
                        System.err.print("SQLException: ");
                        System.err.println(excep.getMessage());
    }     //     ---------------------------------------- END the methodIn both cases Counter is incremented, but does NOT roll back.
    The other statements in the transaction do roll back,
    I am using:
    mysql Ver 14.12 Distrib 5.0.18, for apple-darwin8.2.0 (powerpc) using readline 5.0
    on Mac OS X 10.4.x
    I would greatly appreciate a solution to this problem.
    Many thanks in advance

    I think autocommit is true by default. Also, it looks like your'e setting it to true, and then executing more SQL.
    Explicitly set it to false, and DON'T set it back to trueif there's any chance you're going to want to rollback after that.

  • To differentiate in the user-exits what transaction has executed first

    Hi,
    I have a problem,
    For transactions Iw32 y iw34 EXIT_SAPLCOIH_006 user-exit  are called up  when a maintenance order is updated
    from any of two transactions.
    I want to differentiate in the user-exits what transaction has executed first (origin) because sy-tcode in both cases contains  iw32 ' because IW38 transaction calls UP always to the transaction iw32 for update of a maintenance order.
    thank´s
    Regards.

    If that is the case, and the IW32 is begin called from IW38 via some batch input mechanism, then maybe this code will work.  You can wrap your code in this IF statement.  Here we are saying that we only want to do this when the tcode is IW32 and it is not being called in batch input(call transaction) or called by another program.
    if sy-tcode = 'IW32'
      and sy-binpt = space
      and sy-calld = space.
    endif.
    Regard,
    Rich Heilman

  • JTA transaction is not present or the transaction is not in active state

    Hi,
    I am trying to execute an asynchronous bpel process. the bpel process has 5 OSB calls and is taking approximately 100 seconds for completion. The OSB calls in the BPEL are taking 90 seconds for completion. In the end of the BPEL process, after completion I get the following error:
    [2010/07/22 01:56:44] BPEL process instance "1220007" completed
    [2010/07/22 01:56:44] There is a system exception while performing the BPEL instance, the reason is "JTA transaction is not present or the transaction is not in active state. The current JTA transaction is not present or it is not in active state when processing activity or instance "1,220,007". The reason is The execution of this instance "1220007" for process "BPELProcess1" is supposed to be in a jta transaction, but the transaction is not present or in active state, please turn on the application server transaction debug logs to get more information.. Please consult your administrator regarding this error. ". Please check the error log file for more infromation. Please try to use bpel fault handlers to catch the faults in your bpel process. If this is a system exception, please report this to your system administrator. Administrator could perform manual recovery of the instance from last non-idempotent activity or dehydration point.
    We do not want to increase the transaction-timeout properties in the server in the Transaction-manager.xml or in the orion-ejb-jar.xml since we have other projects with synchronous processes running in the same server.
    Can anybody please suggest a workaround to overcome this issue apart from increasing the transaction-timeout?

    Hi 783703,
    As Sridhar suggested for your problem you have to set transaction-time out in j2ee/home/config/transaction-manager.xml.
    If you use Idempotent as false for your partnerlinks, BPEL PM will store the status till that invoke(Proof that this invoke gets executed).
    So better to go for increasing the time instead of going for idempotent as it has some side effects.
    And coming to dehydration ....Ideally performance will be more if there are no much dehydration poitns in our process. But for some scenarios it is better to have dehydration(ex: we can know the status of the process...etc)
    Dehydration store will not get cleared after completion of the process. Here dehydration means ....it will store these dtails in tables(like Cube_instance,cube_scope...etc).
    Regards
    PavanKumar.M

  • ORA-25402: transaction must roll back

    I found this problem.ORA-25402: transaction must roll back
    Please introduce , how resolve problem?
    what view ? I'll able check for this problem.

    If you had a network problem it is unlikely that the client would still be connected and able to issue a rollback. I have seen this message but I cannot remember what the situation is when it occurs. What Oracle wants is for the client to issue an explicit rollback statement.
    There is a bug that produces this error unfortunately the OP did not include their Oracle version. The bug could be in all versions from 8 - 9.2.0.3 but is only confirmed to be in 9.2.0.3 where after Transaction Failover a commit or rollback incorrectly produces this error. According to the note a Select should produce this error. This would need to be a RAC system that uses transaction failover for this to apply: Note:2652886.8 Also TAF problem: Note:2652845.8
    But it seems to me you can get this error on a distributed transaction. Oracle wants the client to issue an explicit rollback so that all parties to the distributed transaction rollback. If the application terminates due to the error then RECO will rollback the transaction. If the application issues the rollback it can then continue with additional (or retry) distributed queries.
    HTH -- Mark D Powell --

  • CALL TRANSACTION AND SKIP FIRST SCREEN to specified tab in TCODE 'IW32'

    Hi,
    I am using CALL TRANSACTION AND SKIP FIRST SCREEN in ALV Grid Report to call IW32 tcode and it goes to tcode skipping the first screen. But it goes to the default header tab in the tab control. Whereas I wish to go to the specified tab 'OPERATIONS'.
    Can any one help me, as to how to resolve this issue ?
    Thanks in advance.

    Sridher,
    I have the similar requirement. but in my case its COSTS tab. Could you please provide the code you have used for this to work?
    I used standard "call transaction with mode 'E' ". This seems to be working but I am not pleased by my effort. Is there any proper way that you might have followed ?
    Greatly appreciated your help.
    Regards,
    Reddy

  • Statement "CALL TRANSACTION" is not allowed in this form.

    Hi
    I have a form in which i want to call a transaction:
      CALL TRANSACTION 'VL32N'  USING bdc_tab
                                                       MODE    'E'
                                                       UPDATE  'S'
                                                       MESSAGES INTO mestab.
    I call this report from within a message and when reaching this statement it fails.
    Now i get this error in ST22:
    POSTING_ILLEGAL_STATEMENT
    Statement "CALL TRANSACTION" is not allowed in this form.
    and afterwards this error:
    DYNPRO_SEND_IN_BACKGROUND
    Screen output without connection to user.
    As i read,it is not allowed to call this kind of statement from within a form and we should use something like:
    RECEIVE RESULTS FROM FUNCTION but i do not know how because i have never before used such call statements.
    thanks

    Hi,
    The bdc table is filled correctly but the CALL TRANSACTION is not alllowed.I think it is because of the call from the Form ENTRY which is called when issuing an message from my transaction.I have read that it is not allowed to have any call transaction,submit or any other statements like these in a function call,and i think that my form ENTRY is seen as a sort of function module.
    Any other opinions?
    With my "call transaction" statement i wanted to open the VL32N Transaction and post a goods receipt.Is there any other way to do this?
    I get this message in the ST22 Transaction:
    This program is triggered in the update task. There, the   
    following ABAP/4 statements are not allowed:                                                                               
    -  CALL SCREEN                                             
    -  CALL DIALOG                                             
    -  CALL TRANSACTION                                        
    -  SUBMIT                                                  
    But i do not know what is ment by update task.All i use are some "export to memory"  statements and this is all.
    Any ideas?
    thanks.
    Edited by: seba seba on Jul 28, 2009 11:22 AM

Maybe you are looking for