Home » Developer & Programmer » JDeveloper, Java & XML » oracle.apps.fnd.framework.OAException: java.lang.ClassCastException (JDeveloper 9i, Apps 11.5.10.2)
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException [message #503647] Mon, 18 April 2011 13:55
stephaniewatton
Messages: 5
Registered: April 2011
Junior Member
Hi,

I am getting the following error when extending the ReceiveDueItemsVO.xml.

oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:708)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.handleSearchEvent(RcvSrchCO.java:630)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.processFormRequest(RcvSrchCO.java:125)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2688)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1695)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
at _oa__html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.lang.ClassCastException
at oracle.apps.icx.por.rcv.server.ReceiveItemsAMImpl.initQuery(ReceiveItemsAMImpl.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:708)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.handleSearchEvent(RcvSrchCO.java:630)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.processFormRequest(RcvSrchCO.java:125)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2688)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1695)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
at _oa__html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
java.lang.ClassCastException
at oracle.apps.icx.por.rcv.server.ReceiveItemsAMImpl.initQuery(ReceiveItemsAMImpl.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:708)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.handleSearchEvent(RcvSrchCO.java:630)
at oracle.apps.icx.por.rcv.webui.RcvSrchCO.processFormRequest(RcvSrchCO.java:125)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2688)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1695)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:511)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:432)
at _oa__html._OA._jspService(_OA.java:84)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)

Here is the query which I know works because I have put it into the seeded VO to test and this works fine:

SELECT QRSLT.REQ_LINE_ID,
QRSLT.RCV_SHIPMENT_NUMBER,
QRSLT.ORDER_TYPE_CODE,
QRSLT.RECEIPT_DATE,
QRSLT.REQUESTOR_ID,
QRSLT.PO_HEADER_ID,
QRSLT.PO_RELEASE_ID,
QRSLT.ORDER_ID,
QRSLT.PO_NUMBER,
QRSLT.PO_LINE_ID,
QRSLT.PO_LINE_LOCATION_ID,
QRSLT.PO_RELEASE_NUMBER,
QRSLT.PO_LINE_NUMBER,
QRSLT.PO_SHIPMENT_NUMBER,
QRSLT.TO_ORGANIZATION_ID,
QRSLT.ITEM_ID,
QRSLT.PRIMARY_UOM,
QRSLT.PRIMARY_UOM_CLASS,
QRSLT.QUANTITY_DELIVERED,
QRSLT.EXPECTED_RECEIPT_QTY,
QRSLT.ITEM_DESCRIPTION,
QRSLT.SHIP_TO_LOCATION_ID,
QRSLT.VENDOR_ID,
QRSLT.SOURCE,
QRSLT.VENDOR_SITE_ID,
QRSLT.SUPPLIER_SITE,
QRSLT.NEED_BY_DATE,
QRSLT.PROMISED_DATE,
QRSLT.EXPECTED_RECEIPT_DATE,
QRSLT.ORDERED_QTY,
QRSLT.ORDERED_UOM,
QRSLT.USSGL_TRANSACTION_CODE,
QRSLT.PO_DISTRIBUTION_ID,
QRSLT.PO_NUM_REL_NUM,
QRSLT.UNIT,
QRSLT.RECEIPT_QUANTITY,
QRSLT.REQ_DISTRIBUTION_ID,
QRSLT.DELIVER_TO_LOCATION_ID,
QRSLT.REQ_HEADER_ID,
QRSLT.REQUISITION_NUMBER,
QRSLT.ORDER_TYPE,
QRSLT.PO_DISTRIBUTION_NUM,
QRSLT.VENDOR_PRODUCT_NUM,
QRSLT.ORDER_NUMBER,
QRSLT.MATCHING_BASIS,
QRSLT.REQ_LINK,
QRSLT.SHIPMENT_HEADER_ID,
QRSLT.MANUFACTURER_PART_NUMBER,
QRSLT.OPERATING_UNIT,
PORD.PROJECT_ID,
PAPA.SEGMENT1 PROJECT_NUMBER,
papa.name PROJECT_NAME,
PORL.LINE_NUM REQ_LINE_NUM,
PAT.TASK_NUMBER,
PAT.TASK_NAME,
pord.Expenditure_Type,
NVL(porl.currency_unit_price, porl.unit_price ) UNIT_PRICE
FROM
(SELECT REQ_LINE_ID,
RCV_SHIPMENT_NUMBER,
ORDER_TYPE_CODE,
RECEIPT_DATE,
REQUESTOR_ID,
PO_HEADER_ID,
PO_RELEASE_ID,
ORDER_ID,
PO_NUMBER,
PO_LINE_ID,
PO_LINE_LOCATION_ID,
PO_RELEASE_NUMBER,
PO_LINE_NUMBER,
PO_SHIPMENT_NUMBER,
TO_ORGANIZATION_ID,
ITEM_ID,
PRIMARY_UOM,
PRIMARY_UOM_CLASS,
QUANTITY_DELIVERED,
EXPECTED_RECEIPT_QTY,
ITEM_DESCRIPTION,
SHIP_TO_LOCATION_ID,
VENDOR_ID,
SOURCE,
VENDOR_SITE_ID,
SUPPLIER_SITE,
NEED_BY_DATE,
PROMISED_DATE,
EXPECTED_RECEIPT_DATE,
ORDERED_QTY,
ORDERED_UOM,
USSGL_TRANSACTION_CODE,
PO_DISTRIBUTION_ID,
PO_NUM_REL_NUM,
PRIMARY_UOM UNIT,
EXPECTED_RECEIPT_QTY RECEIPT_QUANTITY,
REQ_DISTRIBUTION_ID,
DELIVER_TO_LOCATION_ID,
REQ_HEADER_ID,
req_number REQUISITION_NUMBER,
(SELECT lookup.meaning
FROM fnd_lookup_values_vl lookup
WHERE lookup.lookup_code = rcv.order_type_code
AND lookup.lookup_type ='POR_RCV_ORDER_TYPE'
) ORDER_TYPE,
PO_DISTRIBUTION_NUM,
VENDOR_PRODUCT_NUM,
ORDER_NUMBER,
matching_basis,
DECODE(req_number, NULL, 'ReqLinkDisabled', 'ReqLinkEnabled') REQ_LINK,
NULL shipment_header_id,
MANUFACTURER_PART_NUMBER,
OPERATING_UNIT
FROM por_rcv_req_items_v rcv
UNION ALL
SELECT REQ_LINE_ID,
RCV_SHIPMENT_NUMBER,
ORDER_TYPE_CODE,
RECEIPT_DATE,
REQUESTOR_ID,
PO_HEADER_ID,
TO_NUMBER(NULL) PO_RELEASE_ID,
ORDER_ID,
PO_NUMBER,
PO_LINE_ID,
PO_LINE_LOCATION_ID,
PO_RELEASE_NUMBER,
PO_LINE_NUMBER,
PO_SHIPMENT_NUMBER,
TO_ORGANIZATION_ID,
ITEM_ID,
PRIMARY_UOM,
PRIMARY_UOM_CLASS,
QUANTITY_DELIVERED,
EXPECTED_RECEIPT_QTY,
ITEM_DESCRIPTION,
SHIP_TO_LOCATION_ID,
VENDOR_ID,
SOURCE,
VENDOR_SITE_ID,
SUPPLIER_SITE,
NEED_BY_DATE,
PROMISED_DATE,
EXPECTED_RECEIPT_DATE,
ORDERED_QTY,
ORDERED_UOM,
USSGL_TRANSACTION_CODE,
PO_DISTRIBUTION_ID,
PO_NUM_REL_NUM,
PRIMARY_UOM UNIT,
EXPECTED_RECEIPT_QTY RECEIPT_QUANTITY,
REQ_DISTRIBUTION_ID,
DELIVER_TO_LOCATION_ID,
REQ_HEADER_ID,
REQUISITION_NUMBER,
(SELECT lookup.meaning
FROM fnd_lookup_values_vl lookup
WHERE lookup.lookup_code = rcv1.order_type_code
AND lookup.lookup_type ='POR_RCV_ORDER_TYPE'
) ORDER_TYPE,
PO_DISTRIBUTION_NUM,
VENDOR_PRODUCT_NUM,
ORDER_NUMBER,
NULL matching_basis,
DECODE(req_line_id, to_number(NULL), 'ReqLinkDisabled', 'ReqLinkEnabled') REQ_LINK,
to_number(NULL) SHIPMENT_HEADER_ID,
MANUFACTURER_PART_NUMBER,
OPERATING_UNIT
FROM por_rcv_internal_items_v rcv1
) QRSLT ,
PO.PO_REQ_DISTRIBUTIONS_ALL pord ,
PO.PO_REQUISITION_LINES_ALL porl ,
PA.PA_PROJECTS_ALL PAPA ,
PA.PA_TASKS PAT
WHERE pord.distribution_id = QRSLT.REQ_DISTRIBUTION_ID
AND pord.requisition_line_id = porl.requisition_line_id
AND pord.PROJECT_ID = papa.PROJECT_ID
AND pord.task_id = pat.task_id

And here is the ReceiveItemsAMImpl.java file since the error stack seems to say that the error is occurring at line 163 of this class file:

if(!DataUtil.isEmpty(s3))
{
String s4 = (String)ITEMS_DUE_MAP.get(s3);

package oracle.apps.icx.por.rcv.server;

import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.*;
import oracle.apps.fnd.framework.server.*;
import oracle.apps.fte.util.server.Util;
import oracle.apps.icx.por.common.DataUtil;
import oracle.apps.icx.por.common.server.*;
import oracle.apps.icx.por.rcv.RcvConstants;
import oracle.jbo.domain.Number;
import oracle.jbo.server.ApplicationModuleImpl;
import oracle.jbo.server.ViewObjectImpl;
import oracle.sql.NUMBER;

// Referenced classes of package oracle.apps.icx.por.rcv.server:
// RcvParametersVOImpl, RcvUtil, ReceiveItemsConfirmationVOImpl, ReceiveItemsTxnVOHelper,
// ReceiveItemsTxnVOImpl, ReceiveItemsTxnVORowImpl, ReceiveItemsVOImpl, ReceiveItemsVORowImpl,
// ReceiveRequisitionsVOImpl, ReqHeaderIdVORowImpl, ReqHeaderIdVVOImpl

public class ReceiveItemsAMImpl extends OAApplicationModuleImpl
{

public ReceiveItemsAMImpl()
{
}

public void sampleReceiveItemsAMImplExportable()
{
}

public void sampleReceiveItemsAMImplExportable2(String s)
{
}

public static void main(String args[])
{
ApplicationModuleImpl.launchTester("oracle.apps.icx.por.rcv.server", "ReceiveItemsAMLocal");
}

public OAViewObjectImpl getRcvUOMListVO()
{
return (OAViewObjectImpl)findViewObject("RcvUOMListVO");
}

public OAViewObjectImpl getRcvItemsDueListVO()
{
return (OAViewObjectImpl)findViewObject("RcvItemsDueListVO");
}

public String getRequesterName()
{
return PorUtil.getEmployeeName(this);
}

public HashMap getRequesterInfo()
{
return PorUtil.getEmployeeInfo(this);
}

public ReceiveItemsTxnVOImpl getReceiveItemsTxnVO()
{
return (ReceiveItemsTxnVOImpl)findViewObject("ReceiveItemsTxnVO");
}

public void initQuery(HashMap hashmap)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "initQuery");
OAViewObjectImpl oaviewobjectimpl = (OAViewObjectImpl)findViewObject((String)oadbtransactionimpl.getValue("RcvSrchVOName"));
constructWhereClause(oaviewobjectimpl, hashmap);
String s = "NEED_BY_DATE DESC,PO_NUMBER, PO_LINE_NUMBER";
((ReceiveItemsVOImpl)oaviewobjectimpl).setOrderByClause(s);
oaviewobjectimpl.executeQuery();
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "initQuery");
}

private void constructWhereClause(OAViewObjectImpl oaviewobjectimpl, HashMap hashmap)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "constructWhereClause");
String s = (String)hashmap.get("porOrigin");
if("ICXPOR_NOTIF_DETAIL_PAGE".equals(s))
{
constructNotificationClause(oaviewobjectimpl, hashmap);
return;
}
String s1 = (String)hashmap.get("OrderNumber");
Number number = (Number)hashmap.get("RequesterId");
Number number1 = (Number)hashmap.get("VendorId");
Number number2 = (Number)hashmap.get("OrderId");
String s2 = (String)hashmap.get("OrderTypeCode");
Number number3 = (Number)hashmap.get("ShipmentId");
String s3 = (String)hashmap.get("ItemsDue");
Boolean boolean1 = (Boolean)hashmap.get("Function");
Number number4 = (Number)hashmap.get("ReqHeaderId");
Object obj = null;
String _tmp = (String)oadbtransactionimpl.getValue("RcvSrchVOName");
int i = 0;
oaviewobjectimpl.setWhereClauseParams(null);
if(s1 != null && s2 != null && s2.equals("UNKNOWN"))
{
Object obj1 = null;
Object obj2 = null;
int j = -1;
if((j = s1.lastIndexOf('-')) > -1)
{
String s6 = s1.substring(0, j - 1);
oaviewobjectimpl.setWhereClauseParam(i++, s6);
try
{
Number number5 = new Number(s1.substring(j + 1, s1.length()));
RcvUtil.appendWhereClause(oaviewobjectimpl, i, "PO_RELEASE_NUMBER = :2");
oaviewobjectimpl.setWhereClauseParam(i++, number5);
}
catch(Exception _ex)
{
oaviewobjectimpl.setWhereClauseParam(i++, s1);
}
} else
{
oaviewobjectimpl.setWhereClauseParam(i++, s1);
}
}
if(number2 != null)
{
if("RELEASE".equals(s2))
RcvUtil.appendWhereClause(oaviewobjectimpl, i, "PO_RELEASE_ID = :1");
else
if("PO".equals(s2))
RcvUtil.appendWhereClause(oaviewobjectimpl, i, "PO_HEADER_ID = :1");
else
if("REQ".equals(s2))
RcvUtil.appendWhereClause(oaviewobjectimpl, i, "ORDER_ID = :1");
oaviewobjectimpl.setWhereClauseParam(i++, number2);
}
if(number != null)
{
RcvUtil.appendWhereClause(oaviewobjectimpl, i, " REQUESTOR_ID = :2 ");
oaviewobjectimpl.setWhereClauseParam(i++, number);
}
if(number4 != null)
{
RcvUtil.appendWhereClause(oaviewobjectimpl, i, " REQ_HEADER_ID = :3 ");
oaviewobjectimpl.setWhereClauseParam(i++, number4);
}
if(number3 != null)
{
RcvUtil.appendWhereClause(oaviewobjectimpl, i, " SHIPMENT_HEADER_ID = :4 ");
oaviewobjectimpl.setWhereClauseParam(i++, number3);
}
if(number1 != null)
{
RcvUtil.appendWhereClause(oaviewobjectimpl, i, " VENDOR_ID = :5 ");
oaviewobjectimpl.setWhereClauseParam(i++, number1);
}
if(!DataUtil.isEmpty(s3))
{
String s4 = (String)ITEMS_DUE_MAP.get(s3);
if(s4 != null && !"ANY_TIME".equals(s3))
RcvUtil.appendWhereClause(oaviewobjectimpl, i, s4);
}
if(boolean1 == null || boolean1.equals(Boolean.FALSE))
{
String s5 = " requestor_id = :6 ";
RcvUtil.appendWhereClause(oaviewobjectimpl, i, s5);
oaviewobjectimpl.setWhereClauseParam(i++, new Number(oadbtransactionimpl.getEmployeeId()));
}
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "constructWhereClause");
}

private void constructNotificationClause(OAViewObjectImpl oaviewobjectimpl, HashMap hashmap)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "constructNotificationClause");
Number _tmp = (Number)hashmap.get("OrgId");
Number number = (Number)hashmap.get("OrderId");
Number number1 = (Number)hashmap.get("RequesterId");
String s = (String)hashmap.get("ExpectedReceiptDate");
String _tmp1 = (String)hashmap.get("OrderTypeCode");
Object obj = null;
int i = 0;
oaviewobjectimpl.setWhereClauseParams(null);
if(number != null)
{
oaviewobjectimpl.setWhereClause(" PO_HEADER_ID = :1 ");
oaviewobjectimpl.setWhereClauseParam(i++, number);
}
if(number1 != null)
{
String s1 = " REQUESTOR_ID = :2 ";
if(i > 0)
oaviewobjectimpl.addWhereClause(" and " + s1);
else
oaviewobjectimpl.setWhereClause(s1);
oaviewobjectimpl.setWhereClauseParam(i++, number1);
}
if(!DataUtil.isEmpty(s))
{
String s2 = " trunc(to_date(:3, 'DD-MON-YYYY')) = trunc(EXPECTED_RECEIPT_DATE) ";
if(i > 0)
oaviewobjectimpl.addWhereClause(" and " + s2);
else
oaviewobjectimpl.setWhereClause(s2);
oaviewobjectimpl.setWhereClauseParam(i++, oadbtransactionimpl.getOANLSServices().stringToDate(s));
}
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "constructNotificationClause");
}

public String findVOName(HashMap hashmap)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
String _tmp = (String)oadbtransactionimpl.getValue("RcvSrchVOName");
String s = "ReceiveMyItemsVO";
Number number = (Number)hashmap.get("RequesterId");
Number number1 = (Number)hashmap.get("VendorId");
Number number2 = (Number)hashmap.get("OrderId");
String s1 = (String)hashmap.get("OrderTypeCode");
Number number3 = (Number)hashmap.get("ShipmentId");
String s2 = (String)hashmap.get("ItemsDue");
Number number4 = (Number)hashmap.get("ReqHeaderId");
String s3 = (String)hashmap.get("ExpectedReceiptDate");
String s4 = (String)hashmap.get("OrderNumber");
if(s4 != null && s1 != null && s1.equals("UNKNOWN"))
s = "ReceiveOrderQuickSearchVO";
else
if(s1 != null && s3 != null)
{
if("REQ".equals(s1))
s = "ReceiveConfirmInternalVO";
else
if("PO".equals(s1))
s = "ReceiveBySupplierAndIDVO";
} else
if(number3 != null)
s = "ReceiveByShipmentsVO";
else
if("REQ".equals(s1))
s = "ReceiveConfirmInternalVO";
else
if(number2 != null || number1 != null)
s = "ReceivePurchaseItemsVO";
else
if(number4 != null)
s = "ReceiveReqItemsVO";
else
if(number != null)
s = "ReceiveMyItemsVO";
else
if(s2 != null)
s = "ReceiveItemsDueVO";
clearVOCache(oadbtransactionimpl, s);
return s;
}

public void clearVOCache(OADBTransactionImpl oadbtransactionimpl, String s)
{
String s1 = (String)oadbtransactionimpl.getValue("RcvSrchVOName");
if(s1 != null && !s.equals(s1))
{
OAViewObjectImpl oaviewobjectimpl = (OAViewObjectImpl)findViewObject(s1);
ViewObjectUtil.removeAllRows(oaviewobjectimpl);
}
oadbtransactionimpl.putValue("RcvSrchVOName", s);
}

public Boolean receiveItems()
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "receiveItems");
String s = (String)oadbtransactionimpl.getValue("RcvSrchVOName");
ReceiveItemsVOImpl receiveitemsvoimpl = (ReceiveItemsVOImpl)findViewObject(s);
ReceiveItemsTxnVOImpl receiveitemstxnvoimpl = (ReceiveItemsTxnVOImpl)findViewObject("ReceiveItemsTxnVO");
Boolean boolean1 = Boolean.FALSE;
Object obj = null;
int i = receiveitemsvoimpl.getRangeStart();
Object obj1 = null;
Object obj2 = null;
boolean flag = "Y".equals(oadbtransactionimpl.getProfile("POR_REQUIRE_BLIND_RECEIVING"));
if(receiveitemstxnvoimpl != null)
receiveitemstxnvoimpl.setMaxFetchSize(0);
if(receiveitemstxnvoimpl != null && receiveitemstxnvoimpl.getFetchedRowCount() > 0)
ViewObjectUtil.removeAllRows(receiveitemstxnvoimpl);
receiveitemsvoimpl.reset();
receiveitemstxnvoimpl.last();
for(int j = 0; j < receiveitemsvoimpl.getFetchedRowCount(); j++)
{
ReceiveItemsVORowImpl receiveitemsvorowimpl = (ReceiveItemsVORowImpl)receiveitemsvoimpl.next();
String s1 = receiveitemsvorowimpl.getSelectFlag();
Number number = receiveitemsvorowimpl.getReceiptQuantity();
if(!flag && "Y".equals(s1) && number != null || flag && number != null && number.doubleValue() >= 0.0D)
{
receiveitemstxnvoimpl.next();
receiveitemstxnvoimpl.createTrxnRow(oadbtransactionimpl, receiveitemsvorowimpl);
if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "created on row#: " + j, 1);
calculateTotalQuantity(receiveitemsvorowimpl);
}
}

if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "txnVO.size = " + receiveitemstxnvoimpl.getFetchedRowCount(), 1);
if(receiveitemstxnvoimpl != null && receiveitemstxnvoimpl.getFetchedRowCount() <= 0)
{
receiveitemsvoimpl.setRangeStart(i);
ViewObjectUtil.removeAllRows(receiveitemstxnvoimpl);
clearCache();
throw new OAException("ICX", "ICX_POR_RCVSRCH_ENTER_ONE", null, (byte)0, null);
}
if(!receiveitemsvoimpl.validateQuantity())
{
ViewObjectUtil.removeAllRows(receiveitemstxnvoimpl);
receiveitemsvoimpl.setRangeStart(i);
clearCache();
} else
{
receiveitemsvoimpl.setRangeStart(i);
clearCache();
boolean1 = Boolean.TRUE;
}
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "receiveItems");
return boolean1;
}

private void calculateTotalQuantity(ReceiveItemsVORowImpl receiveitemsvorowimpl)
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "calculateTotalQuantity");
Number number = receiveitemsvorowimpl.getReceiptQuantity();
String s = receiveitemsvorowimpl.getUnit();
Number number1 = receiveitemsvorowimpl.getPoLineLocationId();
Number number2 = receiveitemsvorowimpl.getItemId();
String s1 = receiveitemsvorowimpl.getPrimaryUom();
if(number1 != null && number1.intValue() > 0)
{
if("QUANTITY".equals(receiveitemsvorowimpl.getMatchingBasis()) && !s.equals(s1))
number = RcvUtil.getQuantityByUOM(oadbtransactionimpl, number, s, number2, s1);
HashMap hashmap = (HashMap)oadbtransactionimpl.getTransientValue("RcvQtyTotals");
if(hashmap == null)
hashmap = new HashMap();
Number number3 = (Number)hashmap.get(number1);
if(number3 != null)
hashmap.put(number1, number3.add(number));
else
hashmap.put(number1, number);
oadbtransactionimpl.putTransientValue("RcvQtyTotals", hashmap);
}
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "calculateTotalQuantity");
}

private void clearCache()
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "clearCache");
oadbtransactionimpl.removeTransientValue("RcvQtyTotals");
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "clearCache");
}

public Boolean expressReceive()
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getDBTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "expressReceive");
ReceiveItemsTxnVOImpl receiveitemstxnvoimpl = (ReceiveItemsTxnVOImpl)findViewObject("ReceiveItemsTxnVO");
String s = null;
boolean flag = false;
receiveitemstxnvoimpl.validateReceiptForExpressRcv();
if("Y".equals(oadbtransactionimpl.getValue("ExpressReceivingReqs")))
{
s = "ICX_POR_EXP_RCV_REQ_ERR";
flag = true;
}
if(ExceptionUtil.replaceRegisteredException(oadbtransactionimpl, s, flag) || ReceiveItemsTxnVOHelper.replaceReceiptDateException(oadbtransactionimpl, getReceiveItemsTxnVO(), s, flag))
{
if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "expressReceive: Exceptions during validations", 1);
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "expressReceive");
return new Boolean("false");
}
if("N".equals(oadbtransactionimpl.getProfile("POR_ENABLE_REVIEW_EXPRESS_RCV")))
{
if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "expressReceive: Profile POR_ENABLE_REVIEW_EXPRESS_RCV is set to N", 1);
receiveitemstxnvoimpl.submitReceiptItems();
if(ExceptionUtil.replaceRegisteredException(oadbtransactionimpl, s, flag))
{
if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "expressReceive: Exceptions during submit to transaction processor", 1);
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "expressReceive");
return new Boolean("false");
}
}
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "expressReceive");
return new Boolean("true");
}

public Boolean expressReceive(String s, String s1)
throws Exception
{
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getDBTransaction();
RcvUtil.startTimedProcedure(this, oadbtransactionimpl, "expressReceive(String reqHeaderId, String receiveAllItems)");
ReceiveItemsTxnVOImpl receiveitemstxnvoimpl = (ReceiveItemsTxnVOImpl)findViewObject("ReceiveItemsTxnVO");
oadbtransactionimpl.putValue("ExpressReceivingReqs", "Y");
receiveitemstxnvoimpl.setWhereClauseParam(0, s);
if("N".equals(s1))
{
if(oadbtransactionimpl.isLoggingEnabled(1))
oadbtransactionimpl.writeDiagnostics(this, "expressReceive: function security for receive all items is set to N", 1);
receiveitemstxnvoimpl.setWhereClause(" REQUESTOR_ID = :2 ");
receiveitemstxnvoimpl.setWhereClauseParam(1, new Number(oadbtransactionimpl.getEmployeeId()));
}
receiveitemstxnvoimpl.executeQuery();
Boolean boolean1 = expressReceive();
RcvUtil.endTimedProcedure(this, oadbtransactionimpl, "expressReceive(String reqHeaderId, String receiveAllItems)");
return boolean1;
}

public String getReqHeaderId(HashMap hashmap)
{
ReqHeaderIdVVOImpl reqheaderidvvoimpl = getReqHeaderIdVO();
reqheaderidvvoimpl.initQuery(hashmap);
ReqHeaderIdVORowImpl reqheaderidvorowimpl = (ReqHeaderIdVORowImpl)reqheaderidvvoimpl.first();
if(reqheaderidvorowimpl != null)
{
Number number = reqheaderidvorowimpl.getReqHeaderId();
if(number != null)
return number.toString();
}
return null;
}

public FinancialsSystemParametersVOImpl getFinancialsSystemParametersVO()
{
return (FinancialsSystemParametersVOImpl)findViewObject("FinancialsSystemParametersVO");
}

public ReceiveItemsConfirmationVOImpl getReceiveItemsConfirmationVO()
{
return (ReceiveItemsConfirmationVOImpl)findViewObject("ReceiveItemsConfirmationVO");
}

public PoSystemParametersVOImpl getPoSystemParametersVO()
{
return (PoSystemParametersVOImpl)findViewObject("PoSystemParametersVO");
}

public RcvParametersVOImpl getRcvParametersVO()
{
return (RcvParametersVOImpl)findViewObject("RcvParametersVO");
}

public ReceiveItemsVOImpl getReceiveItemsVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveItemsVO");
}

public OAViewObjectImpl getRcvReqPostQueryVO()
{
return (OAViewObjectImpl)findViewObject("RcvReqPostQueryVO");
}

public OAViewObjectImpl getRcvPOPostQueryVO()
{
return (OAViewObjectImpl)findViewObject("RcvPOPostQueryVO");
}

public ReceiveItemsVOImpl getReceiveByShipmentsVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveByShipmentsVO");
}

public ReceiveItemsVOImpl getReceiveReqItemsVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveReqItemsVO");
}

public ReceiveItemsVOImpl getReceiveMyItemsVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveMyItemsVO");
}

public ReceiveItemsVOImpl getReceiveConfirmInternalVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveConfirmInternalVO");
}

public ReceiveItemsVOImpl getReceiveItemsDueVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveItemsDueVO");
}

public ReceiveItemsVOImpl getReceiveBySupplierAndIDVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveBySupplierAndIDVO");
}

public OAViewObjectImpl getEmployeeNameVO()
{
return (OAViewObjectImpl)findViewObject("EmployeeNameVO");
}

public ReqHeaderIdVVOImpl getReqHeaderIdVO()
{
return (ReqHeaderIdVVOImpl)findViewObject("ReqHeaderIdVO");
}

public ApplicationModuleImpl getShipmentDetailsAM()
{
return (ApplicationModuleImpl)findApplicationModule("ShipmentDetailsAM");
}

public OAViewObjectImpl getReturnItemsRadioVO()
{
return (OAViewObjectImpl)findViewObject("ReturnItemsRadioVO");
}

public Boolean onlyAmountBasedItemsExist()
{
ReceiveItemsTxnVOImpl receiveitemstxnvoimpl = getReceiveItemsTxnVO();
receiveitemstxnvoimpl.reset();
while(receiveitemstxnvoimpl.hasNext())
{
ReceiveItemsTxnVORowImpl receiveitemstxnvorowimpl = (ReceiveItemsTxnVORowImpl)receiveitemstxnvoimpl.next();
String s = receiveitemstxnvorowimpl.getMatchingBasis();
if("QUANTITY".equals(s))
{
receiveitemstxnvoimpl.first();
return Boolean.FALSE;
}
}
receiveitemstxnvoimpl.first();
return Boolean.TRUE;
}

public OAViewObjectImpl getReceiveItemsRadioVO()
{
return (OAViewObjectImpl)findViewObject("ReceiveItemsRadioVO");
}

public ReceiveRequisitionsVOImpl getReceiveRequisitionsVO()
{
return (ReceiveRequisitionsVOImpl)findViewObject("ReceiveRequisitionsVO");
}

public ReceiveItemsVOImpl getReceivePurchaseItemsVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceivePurchaseItemsVO");
}

public OAViewObjectImpl getEmployeeInfoVO()
{
return (OAViewObjectImpl)findViewObject("EmployeeInfoVO");
}

public Number getBusinessGroupId()
{
OADBTransaction oadbtransaction = getOADBTransaction();
return new Number(oadbtransaction.getBusinessGroupId());
}

public Number queryNotificationId(String s, String s1)
{
OADBTransaction oadbtransaction = getOADBTransaction();
return new Number(PorUtil.queryNotificationId(oadbtransaction, s, s1));
}

public String getCarrierId(String s)
{
OADBTransaction oadbtransaction = getOADBTransaction();
return Util.getCarrierId(oadbtransaction, s);
}

public String getOrgCurrencyCode()
{
return FinancialsSystemParametersVOHelper.getOrgCurrencyCode(this);
}

public ReceiveItemsVOImpl getReceiveOrderQuickSearchVO()
{
return (ReceiveItemsVOImpl)findViewObject("ReceiveOrderQuickSearchVO");
}

public static final String RCS_ID = "$Header: ReceiveItemsAMImpl.java 115.45.11510.5 2009/10/26 09:31:50 gvijh ship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: ReceiveItemsAMImpl.java 115.45.11510.5 2009/10/26 09:31:50 gvijh ship $", "oracle.apps.icx.por.rcv.server");
private static final HashMap ITEMS_DUE_MAP;

static
{
ITEMS_DUE_MAP = new HashMap(10);
ITEMS_DUE_MAP.put("TODAY", " expected_receipt_date >= trunc(sysdate - 1) and expected_receipt_date <= trunc(sysdate + 1)");
ITEMS_DUE_MAP.put("THIS_WEEK", " expected_receipt_date >= trunc(sysdate - Cool and expected_receipt_date <= trunc(sysdate + 1) ");
ITEMS_DUE_MAP.put("LAST_THIRTY", " expected_receipt_date >= trunc(sysdate - 31) and expected_receipt_date <= trunc(sysdate + 1) ");
ITEMS_DUE_MAP.put("LAST_SIXTY", " expected_receipt_date >= trunc(sysdate - 61) and expected_receipt_date <= trunc(sysdate + 1) ");
ITEMS_DUE_MAP.put("NEXT_THIRTY", " expected_receipt_date >= trunc(sysdate - 1) and expected_receipt_date <= trunc(sysdate + 31) ");
ITEMS_DUE_MAP.put("NEXT_SIXTY", " expected_receipt_date >= trunc(sysdate - 1) and expected_receipt_date <= trunc(sysdate + 61) ");
}
}
Can anyone help me solve this issue please it's quite urgent.

Thanks
Previous Topic: XML parse automatically by xml tree
Next Topic: INSERTCHILDXML CLOB Error(3 Merged)
Goto Forum:
  


Current Time: Fri Jul 30 13:01:11 CDT 2021