Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

closed statement

Michael ShapiraOct 10 2018 — edited Nov 15 2018

Not sure if it is related to ADF or weblogic or both.

jdeveloper 12.2.1.2. Same version of the weblogic

We always rollback at the end of the transaction. For this we override doPoolMessage function

@Override

public ApplicationPoolSvcMsgContext doPoolMessage(ApplicationPoolSvcMsgContext applicationPoolSvcMsgContext) {

    if (ApplicationPoolSvcMsgContext.MESSAGE\_TYPE\_RELEASING == applicationPoolSvcMsgContext.getMessageType()) {

        int result = 0;

        try (CallableStatement cs =

             getDBTransaction()

             .createCallableStatement("begin ? := tv\_tviot\_common\_pck.chk\_open\_db\_transaction(); end;",

                                      DBTransaction.DEFAULT)) {

            cs.registerOutParameter(1, Types.INTEGER);

            cs.execute();

            result = cs.getInt(1);

        } catch (SQLException e) {

            throw new JboException(e);

        }

        if (result == 1) {

            LOG.severe(this.getClass().getName(), "doPoolMessage", String.format("Detected uncommitted changes during %s application module check-in. User = %s", this.getClass().getName(), ADFContext.getCurrent().getSecurityContext().getUserName()));

            getDBTransaction().executeCommand("ROLLBACK");

            MessageRegistrator.registerErrorMessage(BundleUtils.getStringFromBundle("TRANSACTION\_ERROR"));

        }

    }

    return super.doPoolMessage(applicationPoolSvcMsgContext);

}

But we always get an error

oracle.jbo.SQLStmtException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-27123. Error message parameters are {0=begin ? := tv_tviot_common_pck.chk_open_db_transaction(); end;}
at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:3800)
at oracle.jbo.server.DBTransactionImpl2.createCallableStatement(DBTransactionImpl2.java:387)
at inbal.tviot.common.model.base.TviotCommonApplicationModuleImpl.doPoolMessage(TviotCommonApplicationModuleImpl.java:47)
at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4614)
at oracle.jbo.common.ampool.ApplicationPoolImpl.doManagedCheckin(ApplicationPoolImpl.java:2787)
Truncated. see log file for complete stacktrace

Caused By: java.sql.SQLRecoverableException: Closed Connection
at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:2898)
at oracle.jdbc.driver.PhysicalConnection.prepareCall(PhysicalConnection.java:2801)
at weblogic.jdbc.common.internal.ConnectionEnv.makeStatement(ConnectionEnv.java:2165)
at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:1817)
at weblogic.jdbc.common.internal.ConnectionEnv.getCachedStatement(ConnectionEnv.java:1793)
Truncated. see log file for complete stacktrace

Out connection is

1A.png

2A.png

3A.png

What is the problem???

Comments
Post Details
Added on Oct 10 2018
3 comments
1,016 views