9 Replies Latest reply on Dec 7, 2015 4:53 AM by aJohny

    Error on  page after CO extension..

    binny2106


      oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

        at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)

        at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)

        at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)

        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2991)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)

        at _OA._jspService(_OA.java:212)

        at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)

        at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)

        at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)

        at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

        at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)

        at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)

        at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)

        at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)

        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)

        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)

        at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)

        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)

        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)

        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

        at java.lang.Thread.run(Thread.java:735)

      ## Detail 0 ##

      java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

        at xxtmx.oracle.apps.qot.quote.header.webui.XXTMXCQotQuoteDetailsCO.processFormRequest(XXTMXCQotQuoteDetailsCO.java:327)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1206)

        at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)

        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2987)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)

        at _OA._jspService(_OA.java:212)

        at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)

        at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)

        at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)

        at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

        at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)

        at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)

        at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)

        at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)

        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)

        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)

        at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)

        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)

        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)

        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

        at java.lang.Thread.run(Thread.java:735)

      java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

        at xxtmx.oracle.apps.qot.quote.header.webui.XXTMXCQotQuoteDetailsCO.processFormRequest(XXTMXCQotQuoteDetailsCO.java:327)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:819)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1206)

        at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1031)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:997)

        at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:852)

        at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)

        at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)

        at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2987)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)

        at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)

        at _OA._jspService(_OA.java:212)

        at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)

        at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)

        at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)

        at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

        at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)

        at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)

        at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)

        at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)

        at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)

        at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)

        at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)

        at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)

        at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)

        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)

        at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

        at java.lang.Thread.run(Thread.java:735)

        • 1. Re: Error on  page after CO extension..
          aJohny

          I thought you got the answer from Hint given in the other thread

          Also, paste the code also, without that no one can answer the question.

           

           

          When you use row.getAttribute() to get a value, you need to cast it to appropriate datatype.

           

          In your case, your error message says

          java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

           

          which means, you have a Number datatype object, which you are trying to cast to String, which is not possible.

           

          so change your code as below :

           

          Number <variable> = (Number)row.getAttribute("XXXX");

           

          Copied from the other thread:

          Number Dis =  (Number)row.getAttribute("LineAdjustedPercent");

           

           

          you might need to use

          import oracle.jbo.domain.Number;

           

          Cheers

          AJ

          • 2. Re: Error on  page after CO extension..
            Ranjith Nuthakki

            Hai,

             

            This is casting exception.

             

              Change the string to number and then try. Below high lighted text hints details of the issue:

             

            • oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

              at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)

              at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)

              at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)

              at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2991)

              at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1875)

              at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)

              at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)

              at _OA._jspService(_OA.java:212)

              at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)

              at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)

              at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)

              at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

              at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)

              at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)

              at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)

              at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)

              at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)

              at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)

              at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)

              at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)

              at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)

              at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)

              at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)

              at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

              at java.lang.Thread.run(Thread.java:735)

            ## Detail 0 ##

            1. java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.String

              at xxtmx.oracle.apps.qot.quote.header.webui.XXTMXCQotQuoteDetailsCO.processFormRequest(XXTMXCQotQuoteDetailsCO.java:327)

             

             

              In (XXTMXCQotQuoteDetailsCO.java

              line number 327, you have the issue.

            • 3. Re: Error on  page after CO extension..
              binny2106

              Hello Johny ,

              That error is gone now getting the following error..

               

              Error(352,61): method setString(int, oracle.jbo.domain.Number) not found in interface java.sql.PreparedStatement at compile time.

                                                                  

              Number Dis =  (Number)row.getAttribute("LineAdjustedPercent"); -No error


              stmt.setString(3,Dis); -Here is the error now

              stmt.setString(4,Ext);

              Need some help on this.

               

              Regards,

               

              Binoy

              • 4. Re: Error on  page after CO extension..
                aJohny

                What is the datatype of :3 in the SQL statement ?

                 

                if it is a NUMBER, then try

                stmt.setInt(3,Dis.intValue()); 

                 

                Cheers

                AJ

                • 5. Re: Error on  page after CO extension..
                  binny2106

                  Thanks Johny , but now getting this runtime error here after changing that ,

                  oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.Number could

                  at xxtmx.oracle.apps.qot.quote.header.webui.XXTMXCQotQuoteDetailsCO.processFormRequest(XXTMXCQotQuoteDetailsCO.java:330)

                  and line 330 is

                  Number Ext =  (Number)row.getAttribute("Attribute1");

                   

                  It could be an error with the number type or with the the value of null in some rows , just wanted to know how do we overcome the number and the nulls.

                   

                  Regards,

                  Binoy

                  • 6. Re: Error on  page after CO extension..
                    aJohny

                    Binoy,

                     

                    First try to understand what you are trying to do.

                     

                    What are you trying to do in this line ??

                    Number Ext =  (Number)row.getAttribute("Attribute1");


                     

                    You are trying to cast the value of attribute 'Attribute1' to a Number datatype. What is the datatype of the attribute Attribute1 ??? Check in your VO. It will be of type String.

                    So you need to use String datatype to access the value.

                     

                    String Ext =  (String)row.getAttribute("Attribute1");

                     

                     

                    Cheers

                    AJ

                    • 7. Re: Error on  page after CO extension..
                      aJohny

                      oops.. Sorry I thing I overlooked at the error message also.

                       

                      oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.jbo.domain.Number incompatible with java.lang.Number could


                      It looks like you ignored my previous response :


                      you might need to use

                      import oracle.jbo.domain.Number;

                       

                      Cheers

                      AJ

                      • 8. Re: Error on  page after CO extension..
                        binny2106

                        Hi Johny ,

                        Many thanks Johny,I have already added that to the import statement Here is the entire code pasted for your reference.Can you provide some pointers to overcome this.

                        • 9. Re: Error on  page after CO extension..
                          aJohny

                          Are you still facing any issue ?