OAF: Controller Extension => NoClassDefFoundError
Hi all,
In the past I have done some vo and eo extensions (extra fields, adding custom validation, etc.).
But now I have run into a problem with a controller extension, which I have not done before.
I have the following business requirements: In iProcurement I have added two desc flexfield (PO_REQUISITION_LINES) in the shopping cart page.
If one of these fields are filled, the other one should be filled too.
So I thought, this should be done by controller extension in the processFormRequest of the page.
I have set a new controller which extends the standard controller of the page: ShoppingCartCO.
I have put in some extra validation and if one of the fields are filled and the other one not, it throws an exception. (or this is the plan)
I compiled the custom java file and placed the class file (XXShoppingCartCO) on the $JAVA_TOP => xxez/oracle/apps/icx/por/req/webui/
I personalized (on SITE-level) the controller class of /oracle/apps/icx/por/req/webui/ShoppingCartPG, from oracle.apps.icx.por.req.webui.ShoppingCartCO to xxez.oracle.apps.icx.por.req.webui.XXShoppingCartCO
The DBA has bounced the application server.
But now I am getting the following error, when I navigate to the shopping cart page.
JSP Error:
--------------------------------------------------------------------------------
Request URI:/OA_HTML/OA.jsp
Exception:
java.lang.NoClassDefFoundError: xxez/oracle/apps/icx/por/req/webui/ShoppingCartCO
It looks like the class path is not set correctly. The custom controller is placed on the xxez path, not the standard.
I have double-checked of the custom files are correctly placed on the $JAVA_TOP.
So, I am a little bit lost...I have googled, but I couldn't find a solution for this case.
Has anybody got a clue? What do I miss? What am I doing wrong?
I would be very grateful for some help on this.
I have put below the code of the custom controller.
(I am not sure if the custom code would exactly match the business requirements, but it this moment I am not able to test it, because of the error when navigating to the shopping cart page)
(I was not able to run any page from jdeveloper for this client, I was troubling with the 11i jdveloper. [I am used to work with the R12 jdeveloper] I have done some other extensions for this client, also directly, without testing from jdeveloper, which were succesfully).
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package xxez.oracle.apps.icx.por.req.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.jbo.Row;
import java.lang.String;
public class XXShoppingCartCO extends ShoppingCartCO
{
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processFormRequest(pageContext, webBean);
//BEGIN// 29-04-2011 CvD: Validation
OAApplicationModule am = pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
for (Row row = vo.first(); row != null; vo.next())
{
String Attribute14 = (String) row.getAttribute("Attribute14");
String Attribute15 = (String) row.getAttribute("Attribute15");
if (Attribute14 == null && Attribute15 != null)
{
throw new OAException("XXEZ", "XXEZ_ICX_REFERENCE_TYPE_MSG");
}
if (Attribute14 != null && Attribute15 == null)
{
throw new OAException("XXEZ", "XXEZ_ICX_REFERENCE_VALUE_MSG");
}
}
}
//END// 29-04-2011 CvD: Validation
}