Forum Stats

  • 3,816,531 Users
  • 2,259,202 Discussions
  • 7,893,505 Comments

Discussions

ORA-29975: Cannot register a query in the middle of an active transaction exceptiona ADF

Laus
Laus Member Posts: 292
edited Oct 28, 2015 3:19AM in JDeveloper and ADF

Hello,

I am using JDeveloper 12.1.3. 64-bit.

I have a single entity object validator on EO FirstEO that is method based:

public boolean validateSomeThingCheckRule() {

        boolean flag=false;

        RowSet rowSet = this.getMyVO1();/*an accessor to ViewObject MyVO*/

        rowSet.setRangeSize(-1);

        rowSet.executeQuery();/

        Row myRow = rowSet.first();

        if(myRow!= null){

            ...do something

            if(something>0){

                flag=true;

            }

            else{

                flag=false;

            }

        }   

        return flag;

    }

The validator works ok.

I also have Application Module with AMImpl java class, where I override before commit operation:

@Override

    public void beforeCommit(TransactionEvent transactionEvent) {

        MyViewObjectImpl firstViewObjectImpl=getFirstVO1();/*Raturns FirstVO that is based on FirstEO */

        MyViewRowImpl firstViewRowImpl=(MyViewRowImpl) firstViewObjectImpl.getCurrentRow();

        RowSet myRowSet=(RowSet)firstViewRowImpl.getAttribute("MyVO1");/*an accessor to ViewObject MyVO, like in EO validator, they both access same view object MyVO*/

        Row myRow = myRowSet.getRowSet().first(); /*Here I have:ORA-29975: Cannot register a query in the middle of an active transaction exceptiona*/

        /*do something...*/

        super.beforeCommit(transactionEvent);

    }

Can anyone explain me why, and help me with solution. Many thx.

Tagged:

Best Answer

Answers

This discussion has been closed.