14 Ответы Последний ответ: 21.05.2009 6:59, автор: Anoop Singh

    An exception is occurred after importing of substitutions

    697847
      Hi.

      I have extended some view objects, create substitutions in jpx-file and after import them to MDS repository (for instance, AVOEx extends AVO, BVOEx extends BVO). It works fine on my local machine. After that I have deployed AVOEx and BVOEx to server which uses same database. An exception is occurred:

      oracle.apps.fnd.framework.OAException: oracle.jbo.PersistenceException: JBO-26000: A Generic exception occurred during loading Customizations.
           at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
           at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
           at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
           at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2664)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1667)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:504)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:425)
           at oa_html._OA._jspService(_OA.java:88)
           at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
           at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
           at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
           at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
           at oracle.jsp.JspServlet.service(JspServlet.java:156)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
           at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
           at org.apache.jserv.JServConnection.run(JServConnection.java:294)
           at java.lang.Thread.run(Thread.java:534)
      ## Detail 0 ##
      java.lang.IndexOutOfBoundsException: Index: 146, Size: 145
           at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492)
           at com.sun.java.util.collections.ArrayList.set(ArrayList.java:322)
           at oracle.jbo.server.ViewDefImpl.resolveDefInternal(ViewDefImpl.java:2478)
           at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:2333)
           at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:1909)
           at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:509)
           at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:456)
           at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:313)
           at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:269)
           at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:649)
           at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java:376)
           at oracle.jbo.server.ApplicationModuleImpl.createViewObject(ApplicationModuleImpl.java:3189)
           at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.createViewObject(OAApplicationModuleImpl.java:1008)
      and so on.

      Anybody knows why this exception is occurred?
      Is there any way to solve my problem?

      Thanks in advance

      --keo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
        • 1. Re: An exception is occurred after importing of substitutions
          Braj Pratap
          hi

          r u using any arraylist in the CO used in the page where this exteded VO is used .

          thanx

          Pratap
          • 2. Re: An exception is occurred after importing of substitutions
            697847
            No.
            Exception is occurred when I try to create view object in application module. e.g. vo = (AVOImpl)createViewObject("AVO", "package.AVO");
            • 3. Re: An exception is occurred after importing of substitutions
              Braj Pratap
              hi

              as u have already extended the Vo ,y u r trying to create a view instance with AM ,as ur extended VO will be available itself with the AM ,no need to add VO with seeded AM .

              thanx

              Pratap
              • 4. Re: An exception is occurred after importing of substitutions
                697847
                View object is not available in Application module and I use method for view object getting. Something like this

                public DetailReceiptBasedVOImpl getOneReceiptBasedVO()
                {
                if(OneReceiptBasedVO == null)
                {
                OneReceiptBasedVO = (DetailReceiptBasedVOImpl)findViewObject("OneReceiptBasedVO");
                if(OneReceiptBasedVO == null)
                {
                OneReceiptBasedVO = (DetailReceiptBasedVOImpl)createViewObject("OneReceiptBasedVO", "oracle.apps.ap.oie.server.DetailReceiptBasedVO");
                OneReceiptBasedVO.setMaxFetchSize(0);
                }
                }
                return OneReceiptBasedVO;
                }
                • 5. Re: An exception is occurred after importing of substitutions
                  Braj Pratap
                  hi

                  OneReceiptBasedVO means u r working in Iexpense creation ?? ,a VO with instance name OneReceiptBasedVO is already there with WebexpenseAM

                  thanx
                  Pratap
                  • 6. Re: An exception is occurred after importing of substitutions
                    697847
                    Yes, I am working with OIE.

                    This method has been copied from decompiled DetailAMImpl and exception is occurred there during view object creating.

                    java.lang.IndexOutOfBoundsException: Index: 146, Size: 145
                         at com.sun.java.util.collections.ArrayList.RangeCheck(ArrayList.java:492)
                         at com.sun.java.util.collections.ArrayList.set(ArrayList.java:322)
                         at oracle.jbo.server.ViewDefImpl.resolveDefInternal(ViewDefImpl.java:2478)
                         at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:2333)
                         at oracle.jbo.server.ViewDefImpl.loadFromXML(ViewDefImpl.java:1909)
                         at oracle.jbo.server.MetaObjectManager.loadFromXML(MetaObjectManager.java:509)
                         at oracle.jbo.mom.DefinitionManager.loadLazyDefinitionObject(DefinitionManager.java:456)
                         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:313)
                         at oracle.jbo.mom.DefinitionManager.findDefinitionObject(DefinitionManager.java:269)
                         at oracle.jbo.server.MetaObjectManager.findMetaObject(MetaObjectManager.java:649)
                         at oracle.jbo.server.ViewDefImpl.findDefObject(ViewDefImpl.java:376)
                         at oracle.jbo.server.ApplicationModuleImpl.createViewObject(ApplicationModuleImpl.java:3189)
                         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.createViewObject(OAApplicationModuleImpl.java:1008)
                         at oracle.apps.ap.oie.server.DetailAMImpl.getOneReceiptBasedVO(DetailAMImpl.java:3925)
                         at oracle.apps.ap.oie.server.DetailAMImpl.getDetailLineVO(DetailAMImpl.java:360)
                         at oracle.apps.ap.oie.server.DetailAMImpl.initDetailLinesVO(DetailAMImpl.java:654)
                         at oracle.apps.ap.xxoie.webui.XxCashAndOtherListCO.processFormRequest(XxCashAndOtherListCO.java:159)


                    --keo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                    • 7. Re: An exception is occurred after importing of substitutions
                      Braj Pratap
                      hi

                      yes thats y i m trying to understand your exact requirement ,u extended XxCashAndOtherListCO and trying to create a VO ,the same which is already available there ,what is your requirement to do this ,if u need this VO just get the VO from DetailAM.

                      thanx
                      Pratap
                      • 8. Re: An exception is occurred after importing of substitutions
                        697847
                        Hi

                        To get view object I use next statement in XxCashAndOtherListCO:
                        XxDetailReceiptBasedVOExImpl details = (XxDetailReceiptBasedVOExImpl) detailAM.getOneReceiptBasedVO();
                        getOneReceiptBasedVO() is existent method in DetailAMImpl.

                        I think problem is not way of view object creating. I think there is something wrong with customizations. This exception has occurred after I import my substitution from jpx-file.

                        begin
                        jdr_utils.printDocument('/oracle/apps/ap/oie/server/customizations/site/0/DetailReceiptBasedVO');
                        end;

                        <?xml version='1.0' encoding='UTF-8'?>
                        <customization xmlns="http://xmlns.oracle.com/jrad" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:user="http://xmlns.oracle.com/user" version="9.0.3.8.13_1566" xml:lang="en-US"
                        customizes="/oracle/apps/ap/oie/server/DetailReceiptBasedVO">
                        <replace with="/oracle/apps/ap/xxoie/server/XxDetailReceiptBasedVOEx"/>
                        </customization>

                        If I delete this customization
                        begin
                        jdr_utils.deleteDocument('/oracle/apps/ap/oie/server/customizations/site/0/DetailReceiptBasedVO');
                        end;
                        statement XxDetailReceiptBasedVOExImpl details = (XxDetailReceiptBasedVOExImpl) detailAM.getOneReceiptBasedVO(); throws ClassCastException.

                        --keo                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                        • 9. Re: An exception is occurred after importing of substitutions
                          498248
                          begin
                          jdr_utils.deleteDocument('/oracle/apps/ap/oie/server/customizations/site/0/DetailReceiptBasedVO');
                          end;

                          After this syntax you used "COMMIT" statement ??

                          Thanks,
                          Kumar
                          • 10. Re: An exception is occurred after importing of substitutions
                            Anoop Singh
                            Hi Keo,

                            When you are doing the VO substitution, Don't refer the Custom VO Name. You should use Seeded VO.
                            When you do the substitution, it automatically uses the new ectended VO in place of OLD one.

                            Thanks
                            Anoop
                            • 11. Re: An exception is occurred after importing of substitutions
                              697847
                              Hi Kumar,

                              Yes, I've used "COMMIT" statement.

                              --keo                                                                                                                                                                                                       
                              • 12. Re: An exception is occurred after importing of substitutions
                                697847
                                Hi, Anoop

                                For creating of substituted instance I use getOneReceiptBasedVO() method in DetailAMImpl. It uses seeded VO.
                                But after that I need to cast it to extended VO, because I need to access new transient attribute.

                                -- keo
                                • 13. Re: An exception is occurred after importing of substitutions
                                  Braj Pratap
                                  hi
                                  if u will delete the customization this will definitely throw the error ClassCastException,bcznow u have deleted the personalization and no more XxDetailReceiptBasedVOExImpl is available there ,so it dont find the XxDetailReceiptBasedVOExImpl type VO with AM if u will use

                                  DetailReceiptBasedVO = (DetailReceiptBasedVO) detailAM.getOneReceiptBasedVO(); ,it will not give the error ,two suggestion

                                  1.)VO with instance name OneRecipetBasedVO is already there ,please do not create one more of XxDetailReceiptBasedVOExImpl type ,if u want to create then use a custom name like XXOneRecipetBasedVO ,

                                  2.) and if u want the instance of original OneRecipetBasedVO type VO then use the following code
                                  DetailReceiptBasedVO = (DetailReceiptBasedVO) detailAM.getOneReceiptBasedVO(); instead of that one which is giving error.

                                  please let me know if u still face any problem

                                  thanx

                                  Pratap
                                  • 14. Re: An exception is occurred after importing of substitutions
                                    Anoop Singh
                                    Hi Keo,

                                    There is no need to cast it to new VO.

                                    SImply Write oldVOInstance.getAttribute("Newly added View Attribute Name"):

                                    At run time it will work.

                                    Anoop