1 2 3 Previous Next 34 Replies Latest reply on Feb 22, 2009 2:03 AM by sreese

    Urgent - MessageChoice (poplist) dependency has Class Cast exception

    sreese
      I've been struggling with the poplist dependency for over a week now. Mukul has provided me a link to his blog which has given me a good start. I believe I'm on the right track but I just can't get this to work. The form works as expected before adding dependency code.

      Based on the exception message, it appears to be an issue within the Process Request but I can't find anything wrong. Like I said I've been struggling with this for over a week. Any help would be greatly appreciated.

      I have two messagechoice values which need to be associated: Carrier and Service Level. When "UPS" is selected, only UPS service levels should be shown.

      Here's everything the way it's been defined/coded:

      (Poplist 1)
      ID = Carrier
      Picklist View Def = skr.oracle.apps.spl.poplist.server.CarrierVO
      Picklist View Inst = null
      Picklist Display Attr = FreightCode
      Picklist Value Attr = FreightCode
      Action Type = firePartialAction
      Event = carrierDefined
      Submit = True

      Query for CarrierVO (poplist1):
      select distinct freight_code from org_freight_vl
      where (disable_date is null
      or disable_date > sysdate) order by freight_code;


      (Poplist 2)
      ID = ServiceLevel
      Picklist View Def = skr.oracle.apps.spl.poplist.server.ServiceLevelVO
      Picklist View Inst = null
      Picklist Display Attr = Meaning
      Picklist Value Attr = Meaning

      Query for ServiceLevelVO (poplist2)
      select distinct meaning , attribute4 -- meaning is service level
      from splwms.so_lookups
      where lookup_type = 'SHIPMENT_PRIORITY'
      and enabled_flag = 'Y'
      and attribute4 = :Carrier


      Code added to Controller's Process Request:

      super.processRequest(pageContext, webBean);
      OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
      Carrier.setPickListCacheEnabled(false);
      //Similarly for second Poplist
      OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
      servicelevel.setPickListCacheEnabled(false);
      OATableBean XXX = (OATableBean)webBean.findChildRecursive("Carrier");
      OAMessageChoiceBean Meaning = (OAMessageChoiceBean)XXX.findChildRecursive("Meaning");
      Meaning.setListVOBoundContainerColumn(0, XXX,"FreightCode");

      Code added to Controller's Process Form Request:

      if("carrierDefined".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
      {
      String Carrier = pageContext.getParameter("Carrier");
      if(!(("".equals(Carrier))||(Carrier==null)))
      {
      Serializable[] param = {Carrier};
      am.invokeMethod("initServiceLevelVO1", param);
      }
      }


      Code added to AM's *Impl.java:

      public void initServiceLevelVO1(String Carrier)
      {
      getServiceLevelVO1().setWhereClauseParam(0,Carrier);
      getServiceLevelVO1().executeQuery();
      }



      Runtime Exception Error:
      Exception Details.

      oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
           at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
           at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
           at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
           at OA.jspService(OA.jsp:40)
           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
           at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
           at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
           at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
           at OA.jspService(OA.jsp:45)
           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
           at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
           at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
           at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
           at java.lang.Thread.run(Thread.java:534)
      ## Detail 0 ##
      java.lang.ClassCastException
           at skr.oracle.apps.spl.mm.webui.MMUpdateCO.processRequest(MMUpdateCO.java:52)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
           at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
           at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
           at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
           at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
           at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
           at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
           at OA.jspService(OA.jsp:40)






      Thanks,
      -Scott
        • 1. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
          557833
          What is code at line 52 of MMUpdateCO.java? That's where you have the issue.

          --Shiv                                                                                                                                                                           
          1 person found this helpful
          • 2. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
            user642317
            Hey,

            You mentioned only 2 MessageChoicebeans Carrier,ServiceLevel. What is this code referes to?
            OAMessageChoiceBean Meaning = (OAMessageChoiceBean)XXX.findChildRecursive("Meaning");
            This Meaning field is giving error. Here main mistake is "Meaning" your are refering is poplist VO attribute which should not consider.

            here is change to you code

            OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
            Carrier.setPickListCacheEnabled(false);

            //Similarly for second Poplist
            OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
            servicelevel.setPickListCacheEnabled(false);

            // This is table
            OATableBean XXX = (OATableBean)webBean.findChildRecursive("Carrier");
            servicelevel .setListVOBoundContainerColumn(0, XXX,"VOATRRIBUTENAME");

            Here servicelevel is your dependent messagechoicebean
            VOATRRIBUTENAME -- this is your main vo attribute name(refering by first messagechoicebean Carrier) not poplist vo attributename.

            Hope you will get this in singlechange.You can find this in Developer guide "Dynamic poplists".
            ----------------------
            Here is my code

            OAMessageChoiceBean AbsenceCode = (OAMessageChoiceBean) webBean.findIndexedChildRecursive("AbsenceCode");
            OAWebBeanContainer timepost = (OAWebBeanContainer) webBean.findIndexedChildRecursive("TimecardEntries");
            AbsenceCode.setListVOBoundContainerColumn(0,timepost,"SiteCode"); // SiteCode is view attribute name in my main VO not poplist vo attribute.
            AbsenceCode.setPickListCacheEnabled(false);

            Cheers,
            Anji
            1 person found this helpful
            • 3. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
              PrazzyJay
              can you post the code at 52 in MMUpdateCO.java:52


              --Prasanna                                                                                                                                                                                               
              1 person found this helpful
              • 4. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                sreese
                Hi all,

                I've updated the code based on Anji's recommendation. I'm receiving the same error as before. It may appear that the issue is prior to the code that Anji asked to change. Line 52 is where I assign to variable XXX. Any idea why that would cause an issue?



                45: //Code in process request
                46: OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                47: Carrier.setPickListCacheEnabled(false);
                48: //Similarly for second Poplist
                49: OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
                50: servicelevel.setPickListCacheEnabled(false);
                51:
                52: OATableBean XXX = (OATableBean)webBean.findChildRecursive("Carrier");
                53: OAMessageChoiceBean Meaning = (OAMessageChoiceBean)XXX.findChildRecursive("Meaning");
                54: Meaning.setListVOBoundContainerColumn(0, XXX,"FreightCode");



                Updated to:

                45: //Code in process request
                46: OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                47: Carrier.setPickListCacheEnabled(false);
                48: //Similarly for second Poplist
                49: OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
                50: servicelevel.setPickListCacheEnabled(false);
                51:
                52: OATableBean XXX = (OATableBean)webBean.findChildRecursive("Carrier");
                53: servicelevel.setListVOBoundContainerColumn(0,XXX,"FreightCode");


                Exception Details.

                oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
                     at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
                     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
                     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
                     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                     at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
                     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
                     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
                     at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
                     at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
                     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
                     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
                     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
                     at OA.jspService(OA.jsp:40)
                     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
                     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
                     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
                     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
                     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
                     at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
                     at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
                     at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
                     at OA.jspService(OA.jsp:45)
                     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
                     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
                     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
                     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
                     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
                     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
                     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
                     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
                     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
                     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
                     at java.lang.Thread.run(Thread.java:534)
                ## Detail 0 ##
                java.lang.ClassCastException
                     at skr.oracle.apps.spl.mm.webui.MMUpdateCO.processRequest(MMUpdateCO.java:52)
                • 5. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                  sreese
                  I also tried modifying code to the way Anji had written it:

                  44: super.processRequest(pageContext, webBean);
                  45:
                  46: OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                  47: OAWebBeanContainer servicelevel = (OAWebBeanContainer) webBean.findIndexedChildRecursive("ServiceLevel");
                  48: Carrier.setListVOBoundContainerColumn(0,servicelevel,"FreightCode");
                  49: Carrier.setPickListCacheEnabled(false);


                  This time the following exception occured:

                  Exception Details.

                  oracle.apps.fnd.framework.OAException: java.lang.ClassCastException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423) at OA.jspService(OA.jsp:40) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209) at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189) at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199) at OA.jspService(OA.jsp:45) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.lang.ClassCastException at skr.oracle.apps.spl.mm.webui.MMUpdateCO.processRequest(MMUpdateCO.java:47)
                  • 6. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                    PrazzyJay
                    45: //Code in process request
                    46: OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                    47: Carrier.setPickListCacheEnabled(false);
                    48: //Similarly for second Poplist
                    49: OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
                    50: servicelevel.setPickListCacheEnabled(false);
                    51:
                    52: OATableBean XXX = (OATableBean)webBean.findChildRecursive("Carrier");
                    53: servicelevel.setListVOBoundContainerColumn(0,XXX,"FreightCode");

                    In this code
                    at line 46, your searching for "Carrier" in webBean and it returns OAMessageChoiceBean.
                    at line 52, your searching for "Carrier" again in same webbean but now your expecting a OATableBean. ???!!!!

                    It will again return a OAMessageChoiceBean at line 52, and your assigning the OAMessageChoiceBean object to OATableBean. Hence the class cast exception.

                    Check the page again and identify the correct Table ID and update the line 52. ("Carrier" -> "XXXXTableID")


                    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                    1 person found this helpful
                    • 7. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                      PrazzyJay
                      Hi Scott,

                      44: super.processRequest(pageContext, webBean);
                      45:
                      46: OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                      47: OAWebBeanContainer servicelevel = (OAWebBeanContainer) webBean.findIndexedChildRecursive("ServiceLevel");
                      48: Carrier.setListVOBoundContainerColumn(0,servicelevel,"FreightCode");
                      49: Carrier.setPickListCacheEnabled(false);


                      Here change OAWebBeanContainer at line 47 to OAMessageChoiceBean.


                      --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
                      • 8. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                        sreese
                        In Query1 my VO attribute is FreightCode

                        In Query2 my VO attributes are Meaning (service level). Bind variable :Carrier is defined in this query to join pull associated values.

                        Also, the name of my Q1 VO is Carrier.
                        • 9. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                          sreese
                          //Code in process request
                          OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                          Carrier.setPickListCacheEnabled(false);
                          // Similarly for second Poplist
                          OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
                          servicelevel.setPickListCacheEnabled(false);

                          OATableBean XXX = (OATableBean)webBean.findChildRecursive("FreightCode");
                          servicelevel.setListVOBoundContainerColumn(0,XXX,"FreightCode");



                          Exception Details.

                          oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement:
                          select distinct meaning , attribute4
                          from splwms.so_lookups
                          where lookup_type = 'SHIPMENT_PRIORITY'
                          and enabled_flag = 'Y'
                          and attribute4 = :Carrier
                          order by meaning 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.OAPageBean.renderDocument(OAPageBean.java:2928) at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2725) at OA.jspService(OA.jsp:48) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209) at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189) at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199) at OA.jspService(OA.jsp:45) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## java.sql.SQLException: ORA-01008: not all variables bound at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
                          • 10. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                            PrazzyJay
                            Hi Scott,

                            I think, your so confused.. ;)

                            EO, VO and AM are bc4j objects (business components for Java)

                            Tables, MessageChoices, etc.. are UIX elements.

                            findChildRecrusive() is used to find UIX elements.


                            Now tell me whats your requirement ?


                            --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                            • 11. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                              PrazzyJay
                              If you want to access the attributes in VO.

                              your code should be something like this...
                              XXAmImpl am = (XXAmImpl)pageContext.getApplicationModule(webBean);
                              XXVOImpl vo = am.getXXVOImpl1();
                              XXVORowImpl row = (XXVORowImpl)vo.getCurrentRow();

                              String value = row.getXXAttribute3();



                              --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                              • 12. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                                sreese
                                Sorry Prashana,

                                I should have explained the screen above. I have moved passed the Class Cast exception now.

                                The most recent exception appears to involve the SQL within my ViewObject which was defined above in my initial post.

                                With your suggestion, I was able to move pass the Class Cast exception. I did some further analysis and found that I should have been using "FreightCode" on the that was giving me the exception.

                                I now have a problem with a SQL Statement Exception (shown above).



                                //Code in process request
                                OAMessageChoiceBean Carrier = (OAMessageChoiceBean)webBean.findChildRecursive("Carrier");
                                Carrier.setPickListCacheEnabled(false);
                                // Similarly for second Poplist
                                OAMessageChoiceBean servicelevel = (OAMessageChoiceBean)webBean.findChildRecursive("ServiceLevel");
                                servicelevel.setPickListCacheEnabled(false);

                                OATableBean XXX = (OATableBean)webBean.findChildRecursive("FreightCode");
                                servicelevel.setListVOBoundContainerColumn(0,XXX,"FreightCode");
                                • 13. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                                  sreese
                                  The last line may not be very clear:

                                  ORA-01008: not all variables bound at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
                                  • 14. Re: Urgent - MessageChoice (poplist) dependency has Class Cast exception
                                    PrazzyJay
                                    some with this code is
                                    select distinct meaning , attribute4
                                    from splwms.so_lookups
                                    where lookup_type = 'SHIPMENT_PRIORITY'
                                    and enabled_flag = 'Y'
                                    and attribute4 = :Carrier
                                    before executing the query you should bind the variables in it..

                                    eg:

                                    vo.setWhereClauseParams(null);
                                    vo.setWhereClauseParam(0,"carrier value");
                                    vo.executeQuery();

                                    If you fail to bind the :carrier value then you will get "Not all variables are bound" exception.


                                    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                                    1 2 3 Previous Next