3 Replies Latest reply: Jul 5, 2013 7:18 AM by 933169 RSS

    Error while using Nested AM

    Tripuresh
      Hi,

      I am using jdev 11.1.1.6.2.
      I have 2 AMs in my project called as ComplianceAssocAM and MextUiAM. I have nested MextUiAM inside ComplianceAssocAM using:
       <AppModuleUsage
          Name="MextUiAMAssoc1"
          FullName="oracle.sysman.core.mext.uimodel.applicationModule.MextUiAM"
          SharedScope="0"/>
           In ComplianceAssocAMImpl the code added is:
       public MextUiAMImpl initializeMextUiAMInstance() {
              MextUiAMImpl mextUiAmImpl = (MextUiAMImpl) getMextUiAMAssoc1();
              mextUiAmImpl.clearVOCaches(null, true);
              return mextUiAmImpl;
          } 
      
         /**
          * Container's getter for MextUiAM1.
          * @return MextUiAM1
          */
         public ApplicationModuleImpl getMextUiAMAssoc1()
         {
             return (ApplicationModuleImpl) findApplicationModule("MextUiAMAssoc1");
         }
           MextUiAM has a VO EmMextLibraryVO which has a clientRowInterface method generateMextArchive(). Now i have a use-case in ComplianceAssocAM where i have to use this client row interface method and extract some data. After extraction of data i use it in the flow and then commit and the use-case finishes.
      The code i am using for this use-case in ComplianceAssocAMImpl is:
                   MextID mextId = new MextID(mexttt, mextName, mextVersion);
                   MextUiAMImpl mextAM = (MextUiAMImpl)this.initializeMextUiAMInstance();
                   EmMextLibraryVOImpl mextLibVO = mextAM.getEmMextLibraryVO();
                   EmMextLibraryVORowImpl mextRowImpl = mextLibVO.findByMextID(mextId);
                  
                   BlobDomain mextArchive = mextRowImpl.generateMextArchive(mextName, mextVersion, false);
                   mextIs = mextArchive.getBinaryStream();
                  
                   mextIs.reset();
                  
                   // DEPLOY ME
                   client.deployMetricExtension(mexttt,mextVersion.stringValue(),mextIs,mextName);
                      .....................
                      
      Now when i am exiting from the flow i am getting below error:
      2013-05-07 22:21:34,153 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] WARN  errPopup.ErrorPopupUtil logp.251 - ORA-01086: savepoint 'BO_SP' never established in this session or is invalid<br>
      oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Rollback to Savepoint": SQL Statement "null".
              at oracle.jbo.server.DBTransactionImpl.rollbackToSavepoint(DBTransactionImpl.java:3158)
              at oracle.jbo.server.DBTransactionImpl.restoreTmpPostState(DBTransactionImpl.java:1880)
              at oracle.jbo.server.DBTransactionImpl.restoreTmpPostState(DBTransactionImpl.java:1873)
              at oracle.jbo.server.DBTransactionImpl.doBeforeCommit(DBTransactionImpl.java:2271)
              at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2138)
              at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2389)
              at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
              at oracle.adf.model.dcframe.LocalTransactionHandler.commit(LocalTransactionHandler.java:139)
              at oracle.adf.model.dcframe.DataControlFrameImpl.commit(DataControlFrameImpl.java:1289)
              at oracle.adfinternal.controller.util.model.DCFrameImpl.commit(DCFrameImpl.java:88)
              at oracle.adfinternal.controller.activity.TaskFlowReturnActivityLogic.resolveTransaction(TaskFlowReturnActivityLogic.java:552)
              at oracle.adfinternal.controller.activity.TaskFlowReturnActivityLogic.execute(TaskFlowReturnActivityLogic.java:113)
              at oracle.adfinternal.controller.engine.ControlFlowEngine.executeActivity(ControlFlowEngine.java:1035)
              at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:921)
              at oracle.adfinternal.controller.engine.ControlFlowEngine.doRouting(ControlFlowEngine.java:820)
              at oracle.adfinternal.controller.engine.ControlFlowEngine.routeFromActivity(ControlFlowEngine.java:552)
              at oracle.adfinternal.controller.engine.ControlFlowEngine.performControlFlow(ControlFlowEngine.java:148)
              at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleAdfcNavigation(NavigationHandlerImpl.java:109)
              at oracle.adfinternal.controller.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:78)
              at org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:43)
              at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
              at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
              at oracle.adf.view.rich.component.rich.RichPopup$BroadcastContextCallback.invokeContextCallback(RichPopup.java:666)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1410)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnComponent(UIXComponentBase.java:1424)
              at org.apache.myfaces.trinidad.component.UIXComponentBase.invokeOnChildrenComponents(UIXComponentBase.java:1330)
              at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.invokeOnComponent(ContextSwitchingComponent.java:194)
      Any idea why the flow is broken?
        • 1. Re: Error while using Nested AM
          Timo Hahn
          There are two reasons I know this happen:
          1) you don't have access to the table (ps_txn) where the save points are stored internally (check your db if you have the table ), If the table is filled with many rows you can remove them all (be careful in a production system as some are in use, so only do this when the system is down).
          2) you do some actions like e.g. commit out of sync in your code. This will kill the savepoint the framework tries to reach and you get the error.

          You should check the logs for other errors which might be the cause of this behavior.

          Timo
          • 2. Re: Error while using Nested AM
            Tripuresh
            Hi Timo,

            Thanks for a quick response.
            I checked and there is PS_TXN in the db, also i am not doing any commit explicitly in the flow but the above use case is incorporated in a bounded task flow and the commit is happening before we move out of task flow.
            I checked that the parent AM's transaction is actually getting saved in the DB , but the data modified by MextUiAM is not getting saved.
            • 3. Re: Error while using Nested AM
              933169

              Where you able to find solution for this? As I am also facing the same issue.