5 Replies Latest reply on Apr 28, 2012 11:07 AM by VitalyCoder

    Error during passivation

    VitalyCoder
      Hello!
      I have a problem during passivation process on JDeveloper 11.1.1.6.0. In AM pooling config I define maximum size = 2, minimum = 1, referenced = 1 (JDBC Datasourse). If working 3 user when error coming and i cant understand, how to find where I wrong:

      <ApplicationModuleImpl> <doPoolMessage>
      oracle.jbo.JboException: JBO-29000: Выявлено непредвиденное исключение: java.lang.ArrayIndexOutOfBoundsException, сообщ.=0
           at oracle.jbo.server.Serializer.passivate(Serializer.java:251)
           at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:290)
           at oracle.jbo.server.DBSerializer.passivateRootAM(DBSerializer.java:267)
           at oracle.jbo.server.ApplicationModuleImpl.passivateStateInternal(ApplicationModuleImpl.java:6007)
           at oracle.jbo.server.ApplicationModuleImpl.passivateState(ApplicationModuleImpl.java:5877)
           at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:386)
           at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:9084)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4607)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.manageReferencingState(ApplicationPoolImpl.java:1493)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.recycleReferencedInstance(ApplicationPoolImpl.java:2623)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2444)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2347)
           at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3246)
           at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:572)
           at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
           at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:505)
           at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:500)
           at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:523)
           at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:869)
           at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1640)
           at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2472)
           at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2416)
           at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4363)
           at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
           at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:2216)
           at oracle.jbo.uicli.binding.JUIteratorBinding.internalGetCurrentRowInBinding(JUIteratorBinding.java:500)
           at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:2203)
           at oracle.adf.model.binding.DCControlBinding.getCurrentRow(DCControlBinding.java:387)
           at oracle.jbo.uicli.binding.JUControlBinding.getCurrentRow(JUControlBinding.java:98)
           at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetRow(JUCtrlValueBinding.java:1314)
           at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2740)
           at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2729)
           at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.getInputValue(FacesCtrlAttrsBinding.java:185)
           at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2314)
           at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:277)
           at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
           at javax.el.MapELResolver.getValue(MapELResolver.java:164)
           at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
           at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
           at com.sun.el.parser.AstValue.getValue(Unknown Source)
           at com.sun.el.parser.AstEqual.getValue(Unknown Source)
           at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
           at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.getBooleanProperty(UIXComponentBase.java:1204)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.isRendered(UIXComponentBase.java:423)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:793)
           at oracle.adf.view.rich.component.rich.layout.RichPanelBox.processDecodes(RichPanelBox.java:211)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$001(ContextSwitchingComponent.java:41)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$2.run(ContextSwitchingComponent.java:111)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processDecodes(ContextSwitchingComponent.java:114)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.access$001(ContextSwitchingComponent.java:41)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$2.run(ContextSwitchingComponent.java:111)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.processDecodes(ContextSwitchingComponent.java:114)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXForm.processDecodes(UIXForm.java:75)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXComponentBase.java:986)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXComponentBase.java:972)
           at org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXComponentBase.java:797)
           at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1029)
           at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:540)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$ApplyRequestValuesCallback.invokeContextCallback(LifecycleImpl.java:1394)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
           at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
           at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at org.inec.auth.AuthFilter.doFilter(AuthFilter.java:83)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
           at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
           at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3315)
           at oracle.sql.NUMBER.toString(NUMBER.java:786)
           at oracle.sql.NUMBER.stringValue(NUMBER.java:2206)
           at oracle.jbo.domain.Number.toString(Number.java:410)
           at oracle.jbo.domain.DomainAttributeDef.getXMLContentNode(DomainAttributeDef.java:310)
           at oracle.jbo.server.ViewRowImpl.renderAttributeValueInXMLElement(ViewRowImpl.java:4534)
           at oracle.jbo.server.ViewRowImpl.renderAttributeInXMLElement(ViewRowImpl.java:4528)
           at oracle.jbo.server.ViewObjectImpl.passivateTransients(ViewObjectImpl.java:18424)
           at oracle.jbo.server.ViewObjectImpl.passivateTransients(ViewObjectImpl.java:18347)
           at oracle.jbo.server.ViewObjectImpl.passivateState(ViewObjectImpl.java:18085)
           at oracle.jbo.server.ViewObjectImpl.passivateState(ViewObjectImpl.java:18024)
           at oracle.jbo.server.ViewObjectImpl.doPassivateSettings(ViewObjectImpl.java:20125)
           at oracle.jbo.server.ApplicationModuleImpl.passivateVOs(ApplicationModuleImpl.java:7818)
           at oracle.jbo.server.ApplicationModuleImpl.doPassivateState(ApplicationModuleImpl.java:7625)
           at oracle.jbo.server.ApplicationModuleImpl.doPassivateAMState(ApplicationModuleImpl.java:7612)
           at oracle.jbo.server.Serializer.passivate(Serializer.java:222)
           ... 122 more

      Edited by: VitalyCoder on 27.04.2012 12:42
        • 1. Re: Error during passivation
          Timo Hahn
          You should test your application with application module pooling turned off (check http://tompeez.wordpress.com/2011/07/08/jdev-always-test-your-app-with-applicationmodule-pooling-turned-off/). This way you can test and debug the problem on your development pc. This will hopefully give you some idea where the problem is coming from.

          Do you have some instance variable in your application module? If yes, are they serializable?

          Timo
          1 person found this helpful
          • 2. Re: Error during passivation
            VitalyCoder
            Thank you for answer, Timo!
            Yes, I use one int variable in AM, but it save/load in overrided methods activateState/passivateState (in session`s userData).
            I think my troubles in using dinamically hiding viewcriteria field: for users with role1 this fiels showing, for users with role2 it hiding. For hiding and shoing I use method in ViewObjectImpl like:
                @Override  
                public AttributeHints getCriteriaItemAttributeHints(ViewCriteriaItem vci) {  
                  if (vci != null && vci.getViewCriteria().getName().equals("RegionsViewCriteria")) {  
                      if (vci.getAttributeDef().getName().equals("CountriesView")) {  
                          oracle.jbo.domain.Number nID = (oracle.jbo.domain.Number) this.getNamedWhereClauseParam("nID");
                          if (nID != null && nID.intValue() == 1) {
                              vci.setProperty(ViewCriteriaItem.RENDERED_MODE, ViewCriteriaItem.CRITERIA_RENDERED_MODE_BOTH);  
                              System.out.println(" criteria field 'Country Name' rendered: true");
                          }
                          else {
                              vci.setProperty(ViewCriteriaItem.RENDERED_MODE, ViewCriteriaItem.CRITERIA_RENDERED_MODE_NEVER);  
                              System.out.println(" criteria field 'Country Name' rendered: false");
                          }
                      }    
                  }  
                  return super.getCriteriaItemAttributeHints(vci);  
                }  
            So during passivation/activation AM for users with different users this error coming. You could prompt any features of passivation in my case where I could be mistaken?
            • 3. Re: Error during passivation
              Timo Hahn
              I don'T think this is the reason. Even if an application module is used by an other user it should be no problem to load the VO. Your code comes to play when the user visits a page with the VO on the page. In this case the code should set the attribute correct again.
              You can check if this part of the code is the cause of the problem. Just comment out the code and test the app again. If the error in gone you are right with your assumption, if the error is still there there is an other reason...

              Timo
              • 4. Re: Error during passivation
                VitalyCoder
                One more condition which I missed: I process a sign of existence of a field from VC and according to this field I set bind var value in SQL in OnQuery event in QuickQuery component.
                I try reproduce this issue on HR schema in simple application.
                • 5. Re: Error during passivation
                  VitalyCoder
                  Timo, thank you for the tips!
                  I found problem - it was something terrible in SQL bind vars, using it in both as where and view criteria type.