Monday, 23 April 2018

PL/SQL: Sample code to insert/import an xml object into an xml structure using dbms_xmldom

In one of my project, I had to modify and existing code which uses dbms_xmldom to create an xml structure.
The requirement is to instert an xml struture as a node in the main xml. The below given is a sample which shows how to insert an xml into another xml when working with dbms_xmldom.
 DECLARE  
  v_doc               dbms_xmldom.domdocument;  
  v_root_node         dbms_xmldom.domnode;  
  v_grant_parent_node dbms_xmldom.domnode;  
  v_parent_node       dbms_xmldom.domnode;  
  v_child_xml         xmltype := xmltype('<children>  
                                            <child>ABC</child>  
                                            <child>XYZ</child>  
                                          </children>');  
  v_childdoc         dbms_xmldom.domdocument;  
  v_childdocelement  dbms_xmldom.domelement;  
  v_childnode        dbms_xmldom.domnode;  
 BEGIN  
  v_doc := dbms_xmldom.newdomdocument;  
  dbms_xmldom.setversion(v_doc,'1.0');  
  v_root_node         := dbms_xmldom.makenode(v_doc);  
  v_grant_parent_node := dbms_xmldom.appendchild(v_root_node  
                                     ,dbms_xmldom.makenode(dbms_xmldom.createelement(v_doc  
                                     ,'grantparent')));  
  v_parent_node       := dbms_xmldom.makenode(dbms_xmldom.createelement(v_doc  
                                     ,'parent'));  
  v_root_node         := dbms_xmldom.appendchild(v_grant_parent_node,v_parent_node);
  
  dbms_output.put_line('Before Adding Children:');  
  dbms_output.put_line(dbms_xmldom.getxmltype(v_doc).getclobval());  
  
  --Create the document using the child xml  
  v_childdoc := dbms_xmldom.newdomdocument(v_child_xml);  
  
  --Get the root element from the child document created above  
  v_childdocelement := dbms_xmldom.getdocumentelement(v_childdoc);  
  
  --Get the DomNode from the child document  
  v_childnode := dbms_xmldom.importnode(v_doc ,dbms_xmldom.makenode(v_childdocelement),TRUE);  
  
  --Converts the DomNode to a DomElement  
  v_childdocelement := dbms_xmldom.makeelement(v_childnode);  
  
  --Add the child element to the Parent Node.  
  v_root_node := dbms_xmldom.appendchild(v_parent_node,dbms_xmldom.makenode(v_childdocelement));  
  
  dbms_output.put_line('After Adding Children:');  
  dbms_output.put_line(dbms_xmldom.getxmltype(v_doc).getclobval());  
 END;  

Output:

 Before Adding Children:  
 <?xml version="1.0"?>  
 <grantparent>  
  <parent/>  
 </grantparent>  
 After Adding Children:  
 <?xml version="1.0"?>  
 <grantparent>  
  <parent>  
   <children>  
    <child>ABC</child>  
    <child>XYZ</child>  
   </children>  
  </parent>  
 </grantparent>  


Feel free to point out if anything is missing/wrong in this blog.

Thursday, 19 April 2018

PL/SQL: Disable formatting by PLSQL Developer Beautifier for a block

This post is just to highlight the syntax to supress formatting for the PLSQL Beautifier.



You can use the NoFormat Start and NoFormat End directives to suppress the formatting by the beautifier.
 -- NoFormat Start  
      <<Code goes here>>  
 -- NoFormat End       

From the PLSQL Developer Manual.




Monday, 9 April 2018

OAF: oracle.apps.fnd.framework.OAException: oracle.jbo.AttributeLoadException: JBO-27021: Failed to load CustomDatum value at index

In one of my project, the client was getting the below error when opening an OA Page after applying some patchset. Since I have seen this several time and most of the time the reason was the same, I thought of adding this to my blogpost.


 Exception Details.   
  oracle.apps.fnd.framework.OAException: oracle.jbo.AttributeLoadException: JBO-27021: Failed to load CustomDatum value at index 45 with java
 object of type oracle.jbo.domain.Number due to java.sql.SQLException.  
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)  
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:886)  
      at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:1009)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:783)  
      at oracle.apps.icx.por.wf.webui.ReqLinesNotificationsCO.processRequest(ReqLinesNotificationsCO.java:164)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:631)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1386)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)  
      at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2883)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:2060)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:582)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:470)  
      at _pages.__oa._jspService(__oa.java:233)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.WLFilter.doFilter(WLFilter.java:213)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(Unknown Source)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:432)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      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:60)  
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)  
      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:2283)  
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)  
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499)  
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)  
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)  
 ## Detail 0 ##  
 java.sql.SQLException: Invalid column index  
      at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)  
      at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)  
      at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:103)  
      at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1196)  
      at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:1634)  
      at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2221)  
      at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1073)  
      at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:3045)  
      at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2917)  
      at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2398)  
      at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2256)  
      at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1504)  
      at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3705)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2815)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2671)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2912)  
      at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2094)  
      at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:782)  
      at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:900)  
      at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:814)  
      at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:808)  
      at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3674)  
      at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)  
      at xxxx.oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExtImpl.executeQuery(ReqLinesNotificationsVOExtImpl.java:17)  
      at oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOImpl.initQuery(ReqLinesNotificationsVOImpl.java:111)  
      at oracle.apps.icx.por.wf.server.ReqApprovalNotificationsAMImpl.initReqLinesNotfnVOQry(ReqApprovalNotificationsAMImpl.java:85)  
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
      at java.lang.reflect.Method.invoke(Method.java:606)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:783)  
      at oracle.apps.icx.por.wf.webui.ReqLinesNotificationsCO.processRequest(ReqLinesNotificationsCO.java:164)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:631)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1386)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)  
      at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2883)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:2060)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:582)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:470)  
      at _pages.__oa._jspService(__oa.java:233)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.WLFilter.doFilter(WLFilter.java:213)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(Unknown Source)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:432)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      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:60)  
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)  
      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:2283)  
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)  
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499)  
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)  
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)  
 java.sql.SQLException: Invalid column index  
      at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1494)  
      at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)  
      at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:103)  
      at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1196)  
      at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:1634)  
      at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2221)  
      at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1073)  
      at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:3045)  
      at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2917)  
      at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:2398)  
      at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:2256)  
      at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1504)  
      at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:3705)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2815)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2671)  
      at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2912)  
      at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2094)  
      at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:782)  
      at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:900)  
      at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:814)  
      at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:808)  
      at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3674)  
      at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)  
      at xxxx.oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOExtImpl.executeQuery(ReqLinesNotificationsVOExtImpl.java:17)  
      at oracle.apps.icx.por.wf.server.ReqLinesNotificationsVOImpl.initQuery(ReqLinesNotificationsVOImpl.java:111)  
      at oracle.apps.icx.por.wf.server.ReqApprovalNotificationsAMImpl.initReqLinesNotfnVOQry(ReqApprovalNotificationsAMImpl.java:85)  
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
      at java.lang.reflect.Method.invoke(Method.java:606)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(Unknown Source)  
      at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:783)  
      at oracle.apps.icx.por.wf.webui.ReqLinesNotificationsCO.processRequest(ReqLinesNotificationsCO.java:164)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:631)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1386)  
      at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(Unknown Source)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:1003)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:970)  
      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:690)  
      at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:283)  
      at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)  
      at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2883)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:2060)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:582)  
      at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:470)  
      at _pages.__oa._jspService(__oa.java:233)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:527)  
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)  
      at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:159)  
      at _pages.__oa._jspService(__oa.java:246)  
      at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)  
      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:301)  
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.WLFilter.doFilter(WLFilter.java:213)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.cabo.interceptor.JTFWrapperFilter.doFilter(JTFWrapperFilter.java:149)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(Unknown Source)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:432)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      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:60)  
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)  
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)  
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)  
      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:2283)  
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)  
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499)  
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)  
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)  

Cause:
In this specific case, the ReqLinesNotificationsVO was extended and the Patch has overridden the standard VO and added additional columns.

If we have a VO Substitution and the Standard VO gets modified  and new columns gets added or the datatype of some attribute gets changed, or the order or attributes gets changed, then we will get this error as there is a mismatch with the Standard VO Attribute and the Extended VO Attribute.

Solution:
Re-create the extended VO based on the new StandardVO and re-deploy to the server.



Related links :JBO-27021 Failed to load CustomDatum value at index 51, When Creating A Receipt in Oracle iProcurement (Doc ID 2127497.1)




Feel free to point out if anything is missing/wrong in this blog.