CallableStatement + setString()
Hi,
I am calling an oracle function with the CallableStatement, following is the sample code
cstmt = conn.prepareCall(SQL_FN_FAC_SEARCH_DATA);
cstmt.setLong(2, stateId);
cstmt.setString(3, facilityName);
cstmt.registerOutParameter(1, OracleTypes.CURSOR);
cstmt.execute();
rs = (ResultSet)cstmt.getObject(1);
while (rs.next()) { }
This works fine but if the facilityName has apostrophe like "mike's workshop" - i get sql exception. How come setString is not encoding the apostrophe - am i missing something?
Appreciate your input on this!
ornov
Sorry I only provided snippet of my code to get the point across but here is the entire method
private static final String SQL_FN_FAC_SEARCH_DATA
= " begin ? := pkg_enoi_enoi_pt_search.fn_pt_ptplc_search_data(?,?,?); end; ";
public List getFacilityIdsByOrgIdStateAndName(String state, String facilityName,String orgId) throws DAOException
ArrayList list = new ArrayList();
Connection conn = null;
CallableStatement cstmt = null;
ResultSet rs = null;
long l_orgId = 0l;
try {
conn = getConnection();
cstmt = conn.prepareCall(SQL_FN_FAC_SEARCH_DATA);
if(state !=null && state.length()>0) {
long stateId=-1;
try{
LookupServices ls= new LookupServices();
stateId= ls.getLLID("V_GBL_LK_STATE",state);
}catch(LookupServicesException lse){
throw new DAOException(lse);
cstmt.setLong(2, stateId);
log.info("stateId"+stateId);
}else{
cstmt.setNull(2,Types.INTEGER);
log.info("I am here 1");
if(facilityName!=null && facilityName.length()>0){
cstmt.setString(3, facilityName);
log.info("facilityName"+facilityName);
}else{
cstmt.setNull(3,Types.VARCHAR);
log.info("I am here 12") ;
if(orgId!=null && orgId.length()>0){
l_orgId =Long.parseLong(orgId);
log.info("org Id value is"+l_orgId);
cstmt.setLong(4,l_orgId);
}else{
cstmt.setNull(4,Types.INTEGER);
log.info("I am here 13");
cstmt.registerOutParameter(1, OracleTypes.CURSOR);
cstmt.execute();
rs = (ResultSet)cstmt.getObject(1);
log.info("I am here2") ;
while (rs.next()) {
log.info("I am here 3");
long facilityId = rs.getLong(3);
log.info("The organization Ids for given parametes"+orgId);
list.add(new Long(facilityId));
} catch (SQLException sqle) {
sqle.printStackTrace();
throw new DAOException(sqle);
} finally {
closeResources(conn, cstmt, rs);
return list;
So the following method returns result if facilityName doesnt have any aprostrophe. But if there is a apostrophe - i get the following sqlexception thrown
com.tetratech.enoi.exception.PermitServicesException: com.tetratech.enoi.exception.DAOException: java.sql.SQLException: ORA-20000: ORA-00907: missing right parenthesis
ORA-06512: at "ENOI_P2.PKG_ENOI_ENOI_PT_SEARCH", line 222
ORA-06512: at line 1
at com.tetratech.enoi.services.PermitServices.getFacilityIdsByOrgIdStateAndName(PermitServices.java:672)
at com.tetratech.enoi.action.OpInfoAction.next(OpInfoAction.java:132)
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 org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:252)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)
Caused by: com.tetratech.enoi.exception.DAOException: java.sql.SQLException: ORA-20000: ORA-00907: missing right parenthesis
ORA-06512: at "ENOI_P2.PKG_ENOI_ENOI_PT_SEARCH", line 222
ORA-06512: at line 1
at com.tetratech.enoi.dao.SearchPermitServicesDAO.getFacilityIdsByOrgIdStateAndName(SearchPermitServicesDAO.java:744)
at com.tetratech.enoi.services.PermitServices.getFacilityIdsByOrgIdStateAndName(PermitServices.java:668)
... 20 more
Caused by: java.sql.SQLException: ORA-20000: ORA-00907: missing right parenthesis
ORA-06512: at "ENOI_P2.PKG_ENOI_ENOI_PT_SEARCH", line 222
ORA-06512: at line 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:304)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:271)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:625)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:180)
at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:790)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1109)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2901)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2992)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4124)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)].sql.PreparedStatementBCELProxy.execute(PreparedStatementBCELProxy.java:363)
at com.tetratech.enoi.dao.SearchPermitServicesDAO.getFacilityIdsByOrgIdStateAndName(SearchPermitServicesDAO.java:731)
... 21 more
Similar Messages
-
CallableStatement.setString(String parameterName, String x)
Hi!
I want to use the function CallableStatement.setString(String, String) but I don't know how. By this moment I work with setString(int, String) and works fine, but I want the same result with setString(String, String).
I had create an stored procedure in SQL Server:
CREATE PROCEDURE SelectList @operatorId varchar
AS
SELECT Name FROM target where OperatorId=@operatorIdand then I execute the query in Java like this:
String request = "SelectList ?";
CallableStatement cs = connection.prepareCall(request);
cs.setString(1, "4");
ResultSet resultSet = cs.executeQuery();and this works fine, but when I try the same with:
cs.setString("operatorId", "4");I have this error:
com.microsoft.sqlserver.jdbc.SQLServerException: Index out of range30 Valid range is 1 to 1
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.setParam(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.setString(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerCallableStatement.setString(Unknown Source)
at com.transatel.jbpm.wbpm.essai9.essai9.main(essai9.java:34)
Exception in thread "main"
Any Ideas?hi
thax for u r code. i tried this . it is working nicelly
One dout that how can we optimize the application using java.
if any ideas please forword u r idea to [email protected]
thakx
and regards
kiran -
Named Parameters in CallableStatement HELP!!!!!!!
Help please. Such syntax as "select * from table1 where t1_name like ?" and "CallableStatement.setString("name","%ALICE%")" throws an
java.lang.AbstractMethodError: oracle.jdbc.driver.OracleCallableStatement.setString(Ljava/lang/String;Ljava/lang/String;)
Why is it abstract??? Can anyone help to overcome it?Alexander,
Have you seen the Named Parameters Sample?
Good Luck,
Avi. -
CallableStatement for Procedure / Function
Hi,
Could you let me now on below questions.
1) CallableStatement callableStatement = txn.createCallableStatement("begin xxx_procedure(:1, :2); end;",OADBTransaction.DEFAULT);
If there are 2 input and 1 output parameters, How should i re-write above Callable Statement.
I have seen some sample codes online which were in below formats, not sure which format is correct.
CallableStatement cs = txn.createCallableStatement("begin :1 := check_Approval_Status(:2,:3); end;",OADBTransaction.DEFAULT); -- 1 i/p and 2 o/p's
CallableStatement cs = getOADBTransaction().createCallableStatement("begin xx_lkp_details_pkg.list_lkp(:1,:2,:3); end;", OADBTransaction.DEFAULT); -- 1 i/p and 2 o/p's
2) If there are 2 input and 1 output parameters,
How should i write below statements.
try {
callableStatement.registerOutParameter(?, Types.VARCHAR); --what value goes in place of ?, is it 1 or 2 or 3
callableStatement.setString(?, "Inputparameter"); --what value goes in place of ?, is it 1 or 2 or 3
callableStatement.setString(?, "Inputparameter"); --what value goes in place of ?, is it 1 or 2 or 3
String outParamValue = null;
callableStatement.execute();
outParamValue = callableStatement.getString(?); --what value goes in place of ?, is it 1 or 2 or 3
callableStatement.close();
ThanksHi AJ,
Thanks for info.
What value do i need to pass for getString(?);
In most of the sample codes I see getString(1);
Should I need to pass 1 every time, could you let me know why we are passing 1.
outParamValue = callableStatement.getString(?); --what value goes in place of ?, is it 1 or 2 or 3
Thanks -
XML Publisher Report Output from OAF Page
Hi,
I created a button in a OAF page, and called the XML publisher Report program on click of this button. The concurrent request was ran when check from View Requests. When I click on viewout, the pdf document was open with the option, open, save, cancel. But this is not coming up in the OAF page. when debugged the code, the url is null.
Please see the below code.
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)paramOAPageContext.getRootApplicationModule().getOADBTransaction();
String s1 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("TWO_TASK");
System.out.println("s1 = " + s1);
String s2 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("GWYUID");
System.out.println("s2 = " + s2);
String s3 = "BEGIN :1 := fnd_webfile.get_url(fnd_webfile.request_out, :2, :3, :4, 2); end;";
CallableStatement callablestatement = paramOAPageContext.getApplicationModule(paramOAWebBean).getOADBTransaction().createCallableStatement(s3, 1);
System.out.println("s3 = " + s3);
if(requestId != 0)
try
Number number = new Number(requestId);
callablestatement.registerOutParameter(1, 12);
callablestatement.setInt(2, number.intValue());
callablestatement.setString(3, s2);
callablestatement.setString(4, s1);
callablestatement.execute();
String s4 = callablestatement.getString(1);
System.out.println("Before S4 if statement");
if(s4 == null || s4.equals(""))
// throw new RuntimeException();
System.out.println("URL is null");
System.out.println(" print ouput url - " + s4 );
// throw OAException.wrapperException(exception);
oadbtransactionimpl.putValue("OutputURL", s4);
System.out.println(" print ouput url - " + s4 );
}Look at the links AJ gave.
Basically what you will do is create a Data Definition and assign a Data Template to it. Create a (document) Template and assign it to your data definition. You will use the XML Publisher Java API classes to pass parameters to your data template and extract the XML data. Then you will use this in conjunction with your document template and the OAF integration region to present the final output to the user.
All of these things are in the XML Publisher documentation and Javadocs. -
Issues on setting the SQL ARRAY in Weblogic 10.3
Hello,
I am facing problem while migrating my application from Weblogic 8.1 to Weblogic 10, and problem is on setting the database ARRAY.
here is the brief of the problem which we are facing during weblogic upgrade, appreciate if someone could help us in this regard.
Requirement:- Upgrading the Weblogic Server from 8.1 SP4 to 10.3.
Problem Description :- We are facing issue with Weblogic server 10.3 related to JDBC call for setting the Database Array. We are using Spring framework JDBC templates.
In 8.1 we used to send the database Array by using two different methods mentioned below.
Method 1 :- First method which we are using to set the ARRAY object to database.
CODE:
public Object doBaseInConnection(Connection connection) throws SQLException
OracleCallableStatement callableStatement = OracleCallableStatement)connection.prepareCall(DBUtils.createPreparedStatementFunctionString("bbvoice_customer_discovery_ng", "validate_password_3", 8));
callableStatement.registerOutParameter(1, Types.INTEGER);
callableStatement.setString(2, identifier);
callableStatement.setString(3, password);
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("TACTOSS.PRODUCT_NAME_ARRAY", connection);
ARRAY ocbsArray = new ARRAY(arrayDesc, connection, productSearchList); -- Exception in this LINE
callableStatement.setARRAY(4, ocbsArray);
callableStatement.execute();
EXCEPTION:
This was working fine in Weblogic8.1 where as giving the below exception in Weblogic 10.3.
java.lang.ClassCastException: $Proxy439 cannot be cast to oracle.jdbc.OracleConnection
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:155)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:123)
CHANGE:
Only change in Weblogic 10.3 in this area is earlier in weblogic 8.1 we used to have ojdbc14.jar but weblogic10.3 is having ojdbc6.jar.
Method 2 :- Second method which we are using to set the ARRAY object to database.
CODE:
public Object doBaseInConnection(Connection connection) throws SQLException
OracleConnection oracleConnection = (OracleConnection) ((WLConnection)connection).getVendorConnection(); -- Exception in this LINE
OracleCallableStatement callableStatement = (OracleCallableStatement)connection.prepareCall(DBUtils.createPreparedStatementFunctionString("bbvoice_business_bbv_ng", "create_service_3_mb", 15));
callableStatement.registerOutParameter(1, Types.INTEGER);
callableStatement.setBigDecimal(2, new BigDecimal(customerId.intValue()));
callableStatement.setString(3,businessBBVDTONG.getCpeType() );
ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor( "TACTOSS.GEO_DETAILS_ARRAY", oracleConnection);
List geoList = businessBBVDTONG.getGeoNumberList();
int size = geoList.size();
Object arrayValues[][] = new Object[size][];
Object[] str = new Object[3];
for(int i=0;i<geoList.size();i++)
GeoNumberDTO geoNumberDetails = (GeoNumberDTO)geoList.get(i);
str[0]=geoNumberDetails.getDirectoryEntry();
str[1]=geoNumberDetails.getCssDistrictId();
str[2]=geoNumberDetails.getCssExchangeGroupCode();
arrayValues[i] = str;
str = new Object[3];
ARRAY ocbsArray = new ARRAY(arrayDesc, oracleConnection, arrayValues);
callableStatement.setARRAY(4, ocbsArray);
callableStatement.execute();
EXCEPTION:
This was also working fine in Weblogic8.1 where as giving the below exception in Weblogic 10.3.
java.lang.ClassCastException: $Proxy216 cannot be cast to weblogic.jdbc.extensions.WLConnection
at com.bt.bbv.core.dao.bbvoice.nextgen.BusinessBBVDAONGImplDB$2createService.doBaseInConnection(BusinessBBVDAONGImplDB.
java:171)
at com.bt.bbv.core.util.BaseConnectionCallback.doInConnection(BaseConnectionCallback.java:38)
CHANGE:
Changes from Weblogic 8.1 to 10.3 are
1) We are not having the WLConnection in weblogic.jar instead it is present in com.bea.core.datasource6_1.4.0.0.jar
2)Weblogic 10.3 server is having ojdbc6.jar instead of ojdbc14.jar.You'll also need to map the security role defined in web.xml to a Weblogic principal (an actual Weblogic user or a group) in weblogic.xml.
Example:
web.xml
<web-resource-collection>
<web-resource-name>PowerPointTemplates.jws</web-resource-name>
<description>A web service secured by SSL and basic authentication</description>
<url-pattern>/PowerPointTemplates.jws/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>Friends</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>CLIENT-CERT</auth-method>
<realm-name>myrealm</realm-name>
</login-config>
<security-role>
<description>Role description</description>
<role-name>Friends</role-name>
</security-role>
weblogic.xml
<security-role-assignment>
<role-name>Friends</role-name>
<principal-name>weblogic</principal-name> <!-- the following 3 are users that exist in Weblogic -->
<principal-name>user1</principal-name>
<principal-name>user2</principal-name>
<principal-name>Turbo_Users</principal-name> <!-- this is a Weblogic group -->
</security-role-assignment> -
Unable to retrieve data from a Associative Array (?)
Hi!!!! :)))
i've a problem!!!
this is the oracle's code:
Package GEST_REPORT
IS
type rec_url is record(
TIBCDCON TBISD_30.TIBCDCON%TYPE,
etc...
SETDEL VARCHAR2(10)
type tab2 is table of rec_url index by binary_integer;
FUNCTION MAIN_SELECT
( CPLAS IN VARCHAR2)
RETURN tab2;
END;
...and a java code:
String storedProcedure = "{? = call GEST_REPORT.MAIN_SELECT(?)}";
String result = "";
try{
if (connection != null) {
CallableStatement callableStatement = null;
callableStatement = preprepareCall(storedProcedure);
// preparo parametri di input.
callableStatement.setString(2, "OM");
callableStatement.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "tab2");
and so on...
In the last line of code throws an 'invalid name pattern'
or
"ORA-21700: object does not exist or is marked for delete"
if registerOutParameter(1, oracle.jdbc.driver.OracleTypes.ARRAY, "ISDSV.GEST_REPORT").
Where TAB2: IS THE MY ARRAY (OR NESTED TABLE?);
GEST_REPORT: THE NAME OF PACKAGE;
ISDSV: THE USER.
do u have suggestion for retrieve data from TAB2 in JAVA??
THKS!!!!!!Hi
Use fully qualified type name: schema_name.type_name. For your case that would be "ISDSV.tab2"
Cherrs :)) -
JDBC stored procedure not working in Weblogic 12.1.3
Hi,
We are migrating from WLS 12.1.2 to 12.1.3.
We have a JDBC stored procedure which used to work correctly under 12.1.2. I understand that 12.1.2 uses ojdbc5/ojdbc6 jars (11.2.0.x). After migrating to 12.1.3, the stored procedure is not working.
We have narrowed it down to the different between 12.1.2 using ojdbc5/6 and 12.1.3 using ojdbc7 jars, though we do not understand what the difference here is.
Connection connection = getConnection();
CallableStatement callableStatement = connection.prepareCall("{call RECEIPT_LOG (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
callableStatement.registerOutParameter("PIO_RECEIPT_LOG_ID", java.sql.Types.INTEGER);
callableStatement.setLong("PIO_RECEIPT_LOG_ID", 0);
callableStatement.setString("PIO_DRAWER_NAME", request.getDrawerName());
callableStatement.setString("PIO_DRAWER_FIRST_NAME", request.getDrawerFirstName());
callableStatement.setString("PIO_DRAWER_OTHER_NAMES", "");
callableStatement.setString("PIO_DRAWER_STREET_NO", "");
callableStatement.setString("PIO_DRAWER_STREET", "");
callableStatement.setString("PIO_DRAWER_LOCALITY", "");
callableStatement.setLong("PIO_DRAWER_POSTCODE", 0);
callableStatement.setString("PI_PAYMENT_TYPE", request.getPiPaymentType());
callableStatement.setLong("PI_APPLICATION_ID", request.getApplicationId());
callableStatement.setString("PI_PRIMARY_ID", request.getPiPrimaryId());
callableStatement.setString("PI_SECONDARY_ID", request.getPiSecondaryId());
callableStatement.setDouble("PI_AMOUNT", request.getPiAmount());
callableStatement.setInt("PI_TAX_AMOUNT", 0);
callableStatement.setNull("PI_VPC_TXNRESPONSECODE", java.sql.Types.VARCHAR);
callableStatement.setInt("PI_VPC_TRANSACTIONNO", 0);
callableStatement.setString("PI_VPC_MESSAGE", "");
callableStatement.setString("PI_VPC_ACQRESPONSECODE", "");
callableStatement.setString("PI_VPC_RECEIPTNO", "");
callableStatement.setString("PI_VPC_BATCHNO", "");
callableStatement.setString("PI_VPC_CARD", "");
callableStatement.setString("PI_VPC_MERCHTXNREF", "");
callableStatement.setString("PI_VPC_MERCHANT", "");
callableStatement.setString("PI_VPC_ORDERINFO", "");
callableStatement.setInt("PI_VPC_AMOUNT", 0);
callableStatement.setString("PI_VPC_AUTHORIZEID", "");
callableStatement.registerOutParameter("PO_RECEIPT_NO", java.sql.Types.VARCHAR);
callableStatement.registerOutParameter("PO_SOURCE_ID", java.sql.Types.INTEGER);
callableStatement.registerOutParameter("PO_PAYMENT_METHOD_TEXT", java.sql.Types.VARCHAR);
callableStatement.registerOutParameter("PO_CREATE_COMMENT", java.sql.Types.VARCHAR);
callableStatement.registerOutParameter("PO_ERROR_MESSAGE", java.sql.Types.VARCHAR);
boolean isSuccessful = callableStatement.execute();
Long receiptLogId = callableStatement.getLong("PIO_RECEIPT_LOG_ID");
Here, when the callableStatement.execute() is fired, the isSuccessful is false and the output parameter receiptLogId is 0
Any help appreciated.
Regards,
RahulHi All,
We still haven't figured out what the problem is with JDBC when using ojdbc7.jar but, as an alternate solution we ported the code to Spring JDBC and got it working.
Regards,
Rahul -
How to display advance table based on parameter pls give me solution urgent
Co code:
public class PosASEBacklogCO extends OAControllerImpl
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
// PosASEBackShipAMImpl am = (PosASEBackShipAMImpl)pageContext.getApplicationModule(webBean);
//am.showPrintNShip();
// System.out.println("i am in Pfreq ");
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
PosASEBackShipAMImpl am = (PosASEBackShipAMImpl)pageContext.getApplicationModule(webBean);
OAViewObjectImpl ASEBacklogVO = (OAViewObjectImpl)am.findViewObject("ASEBacklogVO");
String CSDTxt = pageContext.getParameter("CSDTxt");
String Csdto = pageContext.getParameter("CSDTo");
String partnumberTxt = pageContext.getParameter("partnumberTxt");
String CustomerTxt = pageContext.getParameter("CustomerTxt");
String salesorderlineTxt = pageContext.getParameter("salesorderlineTxt");
String ASE = pageContext.getParameter("ASE");
if( "Submit".equals(pageContext.getParameter(EVENT_PARAM)) )
if(CSDTxt !=null && CSDTxt!="") {
am.getASEBacklogVO1().setWhereClauseParam(0,CSDTxt);
else {
am.getASEBacklogVO1().setWhereClauseParam(0,null);
if(Csdto !=null && Csdto!="") {
am.getASEBacklogVO1().setWhereClauseParam(1, Csdto);
else {
am.getASEBacklogVO1().setWhereClauseParam(1,null);
if(partnumberTxt !=null && partnumberTxt!="") {
am.getASEBacklogVO1().setWhereClauseParam(2, partnumberTxt);
else {
am.getASEBacklogVO1().setWhereClauseParam(2,null);
if(CustomerTxt !=null && CustomerTxt!="") {
am.getASEBacklogVO1().setWhereClauseParam(3, CustomerTxt);
else {
am.getASEBacklogVO1().setWhereClauseParam(3,null);
if(salesorderlineTxt !=null && salesorderlineTxt!="") {
am.getASEBacklogVO1().setWhereClauseParam(4, salesorderlineTxt);
else {
am.getASEBacklogVO1().setWhereClauseParam(4, null);
if(CSDTxt == "" && Csdto == "" && partnumberTxt == "" && CustomerTxt == "" && salesorderlineTxt == "")
am.getASEBacklogVO1().setWhereClauseParam(0, null);
am.getASEBacklogVO1().setWhereClauseParam(1, null);
am.getASEBacklogVO1().setWhereClauseParam(2, null);
am.getASEBacklogVO1().setWhereClauseParam(3, null);
am.getASEBacklogVO1().setWhereClauseParam(4, null);
am.getASEBacklogVO1().executeQuery();
// am.showPrintNShip();
System.out.println("Execute Query:- "+ASEBacklogVO.getQuery());
if(pageContext.getParameter("event").equals("ShippingDetailsAction"))
pageContext.setForwardURL("OA.jsp?page=/oracle/apps/pos/salesorder/webui/PosASEShippingDetailsPG", null, (byte)0, null, null, true, null, (byte)99);
else
if(pageContext.getParameter("event").equals("printCS"))
String salesOrderLineShippement = pageContext.getParameter("SalesOrderLineShippement");
am.printCS(salesOrderLineShippement);
} else
if(pageContext.getParameter("event").equals("ShipConfirmAction"))
String OperatingUnitform = pageContext.getParameter("OperatingUnitform");
am.shipConfirmAction(OperatingUnitform);
} else
if(pageContext.getParameter("event").equals("SelectRowAction"))
am.showPrintNShip();
Vo:
SELECT
'N' selectRow
,customer_name
,so_line_shipment
,part_number
,customer_item_number
,cust_po_number
,ordered_date
,promise_date
,schedule_ship_date
,shipping_terms
,shipping_method
,ordered_quantity
,shipping_instructions
,ship_to_address
,ship_to_contact
,ship_to_phone
,"Hold Name"
,"Hold Release Flag"
,order_number
,OPERATING_UNIT
FROM APPS.XXSY_SYNA_ASE_BACKLOG
where (to_date(promise_date,'dd-mm-rrrr')
between nvl(:1,to_date(promise_date,'dd-mm-rrrr')) and nvl(:2,to_date(promise_date,'dd-mm-rrrr')))
and part_number = NVL(:3, NVL(part_number,1))
AND customer_name = NVL(:4, NVL(customer_name,1))
and so_line_shipment = NVL(:5, NVL(so_line_shipment,1))
AM:
public class PosASEBackShipAMImpl extends OAApplicationModuleImpl {
/**This is the default constructor (do not remove)
public PosASEBackShipAMImpl() {
/**Sample main for debugging Business Components code using the tester.
public static void main(String[] args) {
launchTester("xxsy.oracle.apps.pos.salesorder.server", /* package name */
"PosASEBackShipAMLocal" /* Configuration Name */);
public void executegetASEShippingInfoVO(String salesOrderLineShippement) {
this.getASEShippingInfoVO1().getDetails(salesOrderLineShippement);
public void printCS(String salesOrderLineShippement)
OADBTransaction dbtrans = getOADBTransaction();
String sql = "BEGIN xxsy_call_wrapper_pkg.Invoice_wrapper(?,?,?); END;";
OracleCallableStatement callablestatement = (OracleCallableStatement)dbtrans.createCallableStatement(sql,1);
try{
callablestatement.setString(1,salesOrderLineShippement);
callablestatement.registerOutParameter(2,Types.VARCHAR);
callablestatement.registerOutParameter(3,Types.VARCHAR);
callablestatement.executeUpdate();
String Returncode = callablestatement.getString(3);
String ReturnMsg = callablestatement.getString(2);
callablestatement.close();
if(Returncode != null && (!Returncode.equalsIgnoreCase("2")) )
throw new OAException(ReturnMsg,OAException.ERROR);
if(Returncode != null && (!Returncode.equalsIgnoreCase("0")) )
throw new OAException(ReturnMsg,OAException.INFORMATION);
}catch(SQLException _sqle)
try{
callablestatement.close();
}catch (Exception e) {e.printStackTrace();}
throw OAException.wrapperException(_sqle);
String sql1 = "BEGIN xxsy_call_wrapper_pkg.Ship_wrapper(?,?,?); END;";
callablestatement = (OracleCallableStatement)dbtrans.createCallableStatement(sql1,1);
try{
callablestatement.setString(1,salesOrderLineShippement);
callablestatement.registerOutParameter(2,Types.VARCHAR);
callablestatement.registerOutParameter(3,Types.VARCHAR);
callablestatement.executeUpdate();
String Returncode = callablestatement.getString(3);
String ReturnMsg = callablestatement.getString(2);
callablestatement.close();
if(Returncode != null && (!Returncode.equalsIgnoreCase("2")) )
throw new OAException(ReturnMsg,OAException.ERROR);
if(Returncode != null && (!Returncode.equalsIgnoreCase("0")) )
throw new OAException(ReturnMsg,OAException.INFORMATION);
}catch(SQLException _sqle)
try{
callablestatement.close();
}catch (Exception e) {e.printStackTrace();}
throw OAException.wrapperException(_sqle);
public void shipConfirmAction(String OperatingUnitform)
OADBTransaction dbtrans = getOADBTransaction();
String sql = "BEGIN xxsy_call_wrapper_pkg.One_Touch_wrapper(?,?,?); END;";
OracleCallableStatement callablestatement = (OracleCallableStatement)dbtrans.createCallableStatement(sql,1);
try{
callablestatement.setString(1,OperatingUnitform);
callablestatement.registerOutParameter(2,Types.VARCHAR);
callablestatement.registerOutParameter(3,Types.VARCHAR);
callablestatement.executeUpdate();
String Returncode = callablestatement.getString(3);
String ReturnMsg = callablestatement.getString(2);
callablestatement.close();
if(Returncode != null && (!Returncode.equalsIgnoreCase("2")) )
throw new OAException(ReturnMsg,OAException.ERROR);
if(Returncode != null && (!Returncode.equalsIgnoreCase("0")) )
throw new OAException(ReturnMsg,OAException.INFORMATION);
}catch(SQLException _sqle)
try{
callablestatement.close();
}catch (Exception e) {e.printStackTrace();}
throw OAException.wrapperException(_sqle);
public void showPrintNShip() {
System.out.println("i am show Print Method1 ");
ASEBacklogVOImpl aseBacklogVOImpl = getASEBacklogVO1();
for(int i=0; i < aseBacklogVOImpl.getRowCount(); i++){
ASEBacklogVORowImpl aseBacklogVORowImpl = (ASEBacklogVORowImpl) aseBacklogVOImpl.getRowAtRangeIndex(i);
System.out.println("i am show Print Method2 ");
if(aseBacklogVORowImpl != null){
String selectRow = aseBacklogVORowImpl.getSelectrow();
System.out.println("i am show Print Method3 ");
if(selectRow != null && selectRow.equalsIgnoreCase("Y")) {
System.out.println("i am show Print Method4 ");
aseBacklogVORowImpl.setShowPrintReport(new Boolean(true));
aseBacklogVORowImpl.setShowShipConfirm(new Boolean(true));
aseBacklogVORowImpl.setShowShippingDetails(new Boolean(true));
}else {
System.out.println("i am show Print Method5 ");
aseBacklogVORowImpl.setShowPrintReport(new Boolean(false));
aseBacklogVORowImpl.setShowShipConfirm(new Boolean(false));
aseBacklogVORowImpl.setShowShippingDetails(new Boolean(false));
public void enableToUpdate() {
ASEShippingInfoVOImpl aseShippingInfoVOImpl = this.getASEShippingInfoVO1();
Row row = aseShippingInfoVOImpl.getRowAtRangeIndex(0);
if(row != null)
row.setAttribute("EditFlag", new Boolean(false));
public void setDefaultReadonly() {
/**Container's getter for ASEShippingInfoVO1
public ASEShippingInfoVOImpl getASEShippingInfoVO1() {
return (ASEShippingInfoVOImpl)findViewObject("ASEShippingInfoVO1");
/**Container's getter for ASEShiplogVO1
public ASEShiplogVOImpl getASEShiplogVO1() {
return (ASEShiplogVOImpl)findViewObject("ASEShiplogVO1");
/**Container's getter for ASEBacklogVO1
public ASEBacklogVOImpl getASEBacklogVO1() {
return (ASEBacklogVOImpl)findViewObject("ASEBacklogVO1");
it is showing null pointer exception pls help me asapException Details.
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
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.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
## Detail 0 ##
java.lang.NullPointerException
at oracle.apps.pos.salesorder.webui.PosASEBacklogCO.processFormRequest(PosASEBacklogCO.java:107)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
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.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
java.lang.NullPointerException
at oracle.apps.pos.salesorder.webui.PosASEBacklogCO.processFormRequest(PosASEBacklogCO.java:107)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(Unknown Source)
at OA.jspService(_OA.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
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.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
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.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
jest i change code in co so i am getting this type of error the query executing i given sop in evety block
CO:
// if(CSDTxt == "" && Csdto == "" && partnumberTxt == "" && CustomerTxt == "" && salesorderlineTxt == "")
thanks. -
Hi All,
I Face The Problem in Extending AM. I have a requirement to change the method Code which is Available in AMImpl.class
My Extending AM is Displaying in About This Page. But The Method Is Available in Custom AM is Not Called The Method which is Available in Seeded AM is Called. AM Substitution done Successfully.and also JPXIMPORT done Successfully.
My Seeded AMImpl code like
package oracle.apps.pon.outcome.creation.server;
import com.sun.java.util.collections.ArrayList;
import java.sql.*;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.apps.pon.schema.server.*;
import oracle.apps.pon.util.server.SourcingBaseAMImpl;
import oracle.apps.pon.util.server.SourcingServerUtil;
import oracle.jbo.RowIterator;
import oracle.jbo.Transaction;
import oracle.jbo.server.*;
// Referenced classes of package oracle.apps.pon.outcome.creation.server:
// POAwardedBiddersVORowImpl, UpdateOutcomeVOImpl
public class POCreationAMImpl extends SourcingBaseAMImpl
public static final String RCS_ID = "$Header: POCreationAMImpl.java 115.7.11510.2 2004/11/02 04:50:04 ssthakur ship $";
public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: POCreationAMImpl.java 115.7.11510.2 2004/11/02 04:50:04 ssthakur ship $", "%packagename%");
private static final String ALLOCATE_ITEMS = "{ call PON_AUCTION_CREATE_PO_PKG.ALLOC_ALL_UNALLOC_ITEMS(:1, :2, :3, :4, :5, :6," +
" :7, :8, :9, :10, :11, :12)}"
public POCreationAMImpl()
public OAViewObjectImpl getActiveEnabledLookupValuesVO1()
return (OAViewObjectImpl)findViewObject("ActiveEnabledLookupValuesVO1");
public OAViewObjectImpl getPOBuyerListVO1()
return (OAViewObjectImpl)findViewObject("POBuyerListVO1");
public OAViewObjectImpl getVendorSitesAllVO1()
return (OAViewObjectImpl)findViewObject("VendorSitesAllVO1");
public OAViewObjectImpl getPOCreationAuctionDataVO1()
return (OAViewObjectImpl)findViewObject("POCreationAuctionDataVO1");
public static void main(String args[])
ApplicationModuleImpl.launchTester("oracle.apps.pon.outcome.creation.server", "POCreationAMLocal");
public OAViewObjectImpl getPOAwardedBiddersVO1()
return (OAViewObjectImpl)findViewObject("POAwardedBiddersVO1");
public OAViewObjectImpl getPOAwardedItemsVO1()
return (OAViewObjectImpl)findViewObject("POAwardedItemsVO1");
public ViewLinkImpl getPOBidderItemVL1()
return (ViewLinkImpl)findViewLink("POBidderItemVL1");
public OAViewObjectImpl getLastUpdateDateVO()
return (OAViewObjectImpl)findViewObject("LastUpdateDateVO");
public Timestamp getLastUpdateDate(Integer integer)
return AuctionHeadersAllEntityExpert.getLastUpdateDate(getOADBTransaction(), integer.intValue());
public Timestamp lockAuction(Integer integer)
return AuctionHeadersAllEntityExpert.lockAuction(getOADBTransaction(), integer.intValue());
public void startPOCreation(String s, Integer integer, Integer integer1, String s1, String s2, Integer integer2)
BidHeadersEntityExpert.startPOCreation(s, integer.intValue(), getOADBTransaction(), integer1.intValue(), s1, s2, integer2.intValue());
public ArrayList validateSupplierSiteInPOCrt(String s)
OAViewObject oaviewobject = (OAViewObject)findViewObject(s);
return BidHeadersEOImpl.getBidHeadersEntityExpert(getOADBTransaction()).validateSupplierSiteInPOCrt(oaviewobject);
public ArrayList performPOCrossFieldRowValidation(String s, Boolean boolean1, Boolean boolean2)
OAViewObject oaviewobject = (OAViewObject)findViewObject(s);
if(oaviewobject == null)
return new ArrayList();
} else
return BidHeadersEntityExpert.performPOCrossFieldRowValidation(oaviewobject, boolean1.booleanValue(), boolean2.booleanValue());
public ArrayList performPOSingleFieldValidation(String s, Boolean boolean1, Boolean boolean2)
OAViewObject oaviewobject = (OAViewObject)findViewObject(s);
if(oaviewobject == null)
return new ArrayList();
oaviewobject.reset();
ArrayList arraylist = new ArrayList();
POAwardedBiddersVORowImpl poawardedbiddersvorowimpl;
while((poawardedbiddersvorowimpl = (POAwardedBiddersVORowImpl)oaviewobject.next()) != null)
BidHeadersEOImpl bidheaderseoimpl = (BidHeadersEOImpl)poawardedbiddersvorowimpl.getEntity(0);
if(boolean2.booleanValue())
bidheaderseoimpl.validateOrderNumber(arraylist);
if(boolean1.booleanValue())
bidheaderseoimpl.validatePoStartDate(arraylist);
bidheaderseoimpl.validatePoEndDate(arraylist);
return arraylist;
public String[] allocateAllUnallocatedItems(Integer integer)
throws SQLException
DBTransaction dbtransaction = getDBTransaction();
*CallableStatement callablestatement = dbtransaction.createCallableStatement("{ call PON_AUCTION_CREATE_PO_PKG.ALLOC_ALL_UNALLOC_ITEMS(:1, :2, :3, :4, :5, :6," +*
*" :7, :8, :9, :10, :11, :12)}"*
*, -1);*
String as[] = new String[10];
String s = "PONCOMPL";
String s1 = null;
int i = integer.intValue();
callablestatement.setString(1, s);
callablestatement.setString(2, s1);
callablestatement.setInt(3, i);
callablestatement.registerOutParameter(4, 12);
callablestatement.registerOutParameter(5, 12);
callablestatement.registerOutParameter(6, 2);
callablestatement.registerOutParameter(7, 12);
callablestatement.registerOutParameter(8, 12);
callablestatement.registerOutParameter(9, 12);
callablestatement.registerOutParameter(10, 12);
callablestatement.registerOutParameter(11, 12);
callablestatement.registerOutParameter(12, 12);
callablestatement.execute();
as[0] = callablestatement.getString(4);
as[1] = callablestatement.getString(5);
as[2] = String.valueOf(callablestatement.getInt(6));
as[3] = callablestatement.getString(7);
as[4] = callablestatement.getString(8);
as[5] = callablestatement.getString(9);
as[6] = callablestatement.getString(10);
as[7] = callablestatement.getString(11);
as[8] = callablestatement.getString(12);
if("SUCCESS".equals(as[0]))
dbtransaction.commit();
if(callablestatement != null)
callablestatement.close();
return as;
*}* public void doAutomaticAllocation(Integer integer)
try
if(integer == null)
throw new OAException("PON", "PON_AUC_INVALID_PARAMETERS");
String as[] = allocateAllUnallocatedItems(integer);
if("SUCCESS".equals(as[0]))
UpdateOutcomeVOImpl updateoutcomevoimpl = getUpdateOutcomeVO();
if(updateoutcomevoimpl != null)
updateoutcomevoimpl.updateOutcomeStatus(integer);
getOADBTransaction().commit();
return;
catch(Exception exception)
throw OAException.wrapperException(exception);
public String getProfileOption(String s)
return SourcingServerUtil.getProfileOption(getOADBTransaction(), s);
public void commitTransaction()
getOADBTransaction().commit();
public void rollbackTransaction()
getOADBTransaction().rollback();
public OAViewObjectImpl getPOAcceptanceValuesVO()
return (OAViewObjectImpl)findViewObject("POAcceptanceValuesVO");
public OAViewObjectImpl getCheckContractsEnabledVO()
return (OAViewObjectImpl)findViewObject("CheckContractsEnabledVO");
public UpdateOutcomeVOImpl getUpdateOutcomeVO()
return (UpdateOutcomeVOImpl)findViewObject("UpdateOutcomeVO");
**and My Custom AM Code like,**
package oracle.apps.xxega.outcome.creation.server;
import oracle.apps.pon.outcome.creation.server.POCreationAMImpl;
import com.sun.java.util.collections.ArrayList;
import java.sql.*;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.server.OAViewObjectImpl;
import oracle.apps.pon.schema.server.*;
import oracle.apps.pon.util.server.SourcingBaseAMImpl;
import oracle.apps.pon.util.server.SourcingServerUtil;
import oracle.jbo.RowIterator;
import oracle.jbo.Transaction;
import oracle.jbo.server.*;
// --- File generated by Oracle Business Components for Java.
public class XXEGAPOCreationAMImpl extends POCreationAMImpl
* This is the default constructor (do not remove)
public XXEGAPOCreationAMImpl()
* Sample main for debugging Business Components code using the tester.
public static void main(String[] args)
launchTester("oracle.apps.xxega.outcome.creation.server", "XXEGAPOCreationAMLocal");
*@Override*
public String[] allocateAllUnallocatedItems(Integer integer)
throws SQLException
DBTransaction dbtransaction = getDBTransaction();
*CallableStatement callablestatement = dbtransaction.createCallableStatement("{ call PON_AUCTION_CREATE_PO_PKG.ALLOC_ALL_UNALLOC_ITEMS(:1, :2, :3, :4, :5, :6," +*
*" :7, :8, :9, :10, :11, :12)}"*
*, -1);*
String as[] = new String[10];
String s = "EGAPONCM";
String s1 = null;
int i = integer.intValue();
callablestatement.setString(1, s);
callablestatement.setString(2, s1);
callablestatement.setInt(3, i);
callablestatement.registerOutParameter(4, 12);
callablestatement.registerOutParameter(5, 12);
callablestatement.registerOutParameter(6, 2);
callablestatement.registerOutParameter(7, 12);
callablestatement.registerOutParameter(8, 12);
callablestatement.registerOutParameter(9, 12);
callablestatement.registerOutParameter(10, 12);
callablestatement.registerOutParameter(11, 12);
callablestatement.registerOutParameter(12, 12);
callablestatement.execute();
as[0] = callablestatement.getString(4);
as[1] = callablestatement.getString(5);
as[2] = String.valueOf(callablestatement.getInt(6));
as[3] = callablestatement.getString(7);
as[4] = callablestatement.getString(8);
as[5] = callablestatement.getString(9);
as[6] = callablestatement.getString(10);
as[7] = callablestatement.getString(11);
as[8] = callablestatement.getString(12);
if("SUCCESS".equals(as[0]))
dbtransaction.commit();
if(callablestatement != null)
callablestatement.close();
return as;
Is there any other way I can do this, declaratively?
Regards,
Nikunj Shah
Edited by: 844549 on Mar 15, 2011 6:49 AM
Edited by: Nikunj Shah on Mar 15, 2011 6:50 AMhttp://oracleanil.blogspot.com/2010/11/am-extension-in-oaf.html
Thanks
--Anil
http://oracleanil.blogspot.com -
I have been strucK at a point in invoking the procedure which has a boolean parameter which when called from java program get error saying that "wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS'". the procedure is given below along with the calling java code , and the Errors.
If i change the parameter data type to VARCHAR2 (the parameter hilighted in red) in the in the procedure and invoke it with the same method it works fine, even if i change the "callableStatement.setBoolean(1, true); to callableStatement.setInt(1, 1); it works fine.When i call it with setting the boolean to the procedure from my java i get a error. Im really confused whether is this a issue with oracle? or with java code.
Please can any body suggest me any kind of solution! to over come this scenario.
///// java code
public void testThePackage() throws ClassNotFoundException { Connection connection = null; connection = (Connection) getConnection(); CallableStatement callableStatement = null; try { callableStatement = connection .prepareCall("{call L_test.p_retrieve_oppty_order_status(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); callableStatement.setBoolean(1, true); // callableStatement.setString(1, "YES"); // callableStatement.setInt(1, 1); // callableStatement.setLong(1, 1L); callableStatement.setString(2, "SFA"); callableStatement.setString(3, "123421"); callableStatement.setLong(4, 1L); callableStatement.setLong(5, 123L); callableStatement.setLong(6, 345L); callableStatement.setInt(7, 10); callableStatement.setInt(8, 2435); callableStatement.setInt(9, 5675); callableStatement.registerOutParameter(10, Types.NUMERIC); // on_return_status callableStatement.registerOutParameter(11, Types.VARCHAR); // os_duns_no callableStatement.registerOutParameter(12, Types.VARCHAR); // os_hq_duns_no callableStatement.registerOutParameter(13, Types.NUMERIC); // on_approval_id callableStatement.registerOutParameter(14, Types.NUMERIC); // on_approval_amt callableStatement.registerOutParameter(15, Types.VARCHAR); // os_message callableStatement.registerOutParameter(16, Types.VARCHAR); // os_approval_cd callableStatement.registerOutParameter(17, Types.VARCHAR); // os_security_term_cd callableStatement.registerOutParameter(18, Types.VARCHAR); // action // code callableStatement.registerOutParameter(19, Types.VARCHAR); // action // message // txt callableStatement.execute(); connection.commit(); } catch (SQLException e) { System.out.println(e.getMessage()); } } [/code] /////procedure CREATE OR REPLACE PACKAGE BODY cust.L_test IS PROCEDURE p_retrieve_oppty_order_status (isNonAttilaAttempt boolean , is_system_cd VARCHAR2 , is_order_id VARCHAR2 , in_oppty_id NUMBER , in_company_id VARCHAR2 , in_acct_id NUMBER ,in_local_rev NUMBER ,in_switched_rev NUMBER ,in_dedicated_rev NUMBER , on_return_status OUT NUMBER , os_duns_no OUT VARCHAR2 , os_hq_duns_no OUT VARCHAR2 , on_approval_id OUT NUMBER , on_credit_balance OUT NUMBER , os_message OUT VARCHAR2 , os_approval_cd OUT VARCHAR2 , os_security_term_cd OUT VARCHAR2 ,os_action_cd OUT VARCHAR2 ,os_action_txt_msg OUT VARCHAR2) IS io_return l_cdt_util.return_data_t; action_cd VARCHAR2(20):= NULL; flag boolean:=false; BEGIN if isNonAttilaAttempt =[color=red]true[/color] then --'YES' true flag:=true; end if; insert into example (id,data,deleted) values(1,'Test','YES'); END p_retrieve_oppty_order_status; END cust.L_test; CREATE OR REPLACE PACKAGE BODY cust.L_test IS PROCEDURE p_retrieve_oppty_order_status (isNonAttilaAttempt boolean , is_system_cd VARCHAR2 , is_order_id VARCHAR2 , in_oppty_id NUMBER , in_company_id VARCHAR2 , in_acct_id NUMBER ,in_local_rev NUMBER ,in_switched_rev NUMBER ,in_dedicated_rev NUMBER , on_return_status OUT NUMBER , os_duns_no OUT VARCHAR2 , os_hq_duns_no OUT VARCHAR2 , on_approval_id OUT NUMBER , on_credit_balance OUT NUMBER , os_message OUT VARCHAR2 , os_approval_cd OUT VARCHAR2 , os_security_term_cd OUT VARCHAR2 ,os_action_cd OUT VARCHAR2 ,os_action_txt_msg OUT VARCHAR2) IS io_return l_cdt_util.return_data_t; action_cd VARCHAR2(20):= NULL; flag boolean:=false; BEGIN if isNonAttilaAttempt =[color=red]true[/color] then --'YES' true flag:=true; end if; insert into example (id,data,deleted) values(1,'Test','YES'); END p_retrieve_oppty_order_status; END cust.L_test; /////error ORA-06550: line 1, column 7: wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS' line 1, column 7: PL/SQL: Statement ignoredHi YoungWinston,
I realy appriciate your comments on the standard of the code , i also accept procedure and code may not be readable,
but the problem is not because of bloated call its just beacause of the Boolean parameter being passed throught the java code, and where as the SQL/PL does not allow BOOLEAN as paramater, please refer the below link for justification.
what am expecting is , is there any solution to this problem (not a work arround solution).
Please provide me with some sort of solution/hints or suggestions in achieving this solution,
I would realy your effort
Thanks
ud
http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/datatypes.htm#CJACJGBG
Predefined PL/SQL BOOLEAN Data Type
The BOOLEAN data type stores logical values, which you can use in logical operations. The logical values are the Boolean values TRUE and FALSE and the value NULL.
The syntax for specifying an BOOLEAN data item is:
BOOLEAN
SQL has no data type equivalent to BOOLEAN; therefore you cannot use BOOLEAN variables or parameters in the following:
SQL statements
Built-in SQL functions (such as TO_CHAR)
PL/SQL functions invoked from SQL statements
You cannot insert the value TRUE or FALSE into a database column. You cannot retrieve the value of a database column into a BOOLEAN variable.
To represent BOOLEAN values in output, use IF-THEN or CASE constructs to translate BOOLEAN values into another type (for example, 0 or 1, 'Y' or 'N', 'true' or 'false'). -
How to pass OAF filed data as a argument to custom function
Hi All,
I am doing controller extension. I have the following doubt will you please solve my doubt.
My doubt is how to pass the standard page filed data as an argument to custom function.
Let us assume that in my standard page i have item details (item number, description and uom.......)
and i need to pass item number as an argument to my custom function.
How to do this?
Please help me on this.
Regards
Zaheer.Hi
Thanks a lot for replying me, Thanks again and again.
The error which i am getting is as follows:
Actually iam extending egocancelapplypagebuttonbarco.
in this co we have code on Apply button iam writing my code there.
My code is as follows:
package oracle.apps.ego.common.webui;
import java.sql.*;
import oracle.apps.ego.item.eu.util.EgoItemContext;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.form.OAFormValueBean;
import oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean;
import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
import oracle.apps.fnd.framework.webui.beans.nav.OABreadCrumbsBean;
import oracle.jbo.Transaction;
import oracle.cabo.ui.beans.layout.PageLayoutBean;
import oracle.cabo.ui.beans.nav.LinkBean;
import oracle.jbo.ApplicationModule;
// Referenced classes of package oracle.apps.ego.common.webui:
// EgoCancelApplyPGButtonBarCO
public class EgoCancelApplyPGButtonBarEXTCO extends EgoCancelApplyPGButtonBarCO
public EgoCancelApplyPGButtonBarEXTCO()
public void processRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
super.processRequest(oapagecontext, oawebbean);
String s = null;
OAFormValueBean oaformvaluebean = (OAFormValueBean)oapagecontext.getPageLayoutBean().findChildRecursive("cancelDestinationHidden");
if(oaformvaluebean != null)
s = (String)oaformvaluebean.getValue(oapagecontext);
if(s == null)
OABreadCrumbsBean oabreadcrumbsbean = (OABreadCrumbsBean)oapagecontext.getPageLayoutBean().getLocation();
if(oabreadcrumbsbean != null)
int i = oabreadcrumbsbean.getLinkCount();
if(i >= 2)
s = oabreadcrumbsbean.getLinkDestination(i - 2);
if(oapagecontext.getSessionValue("EgoCritTempListPgUrl") != null && s == null)
s = (String)oapagecontext.getSessionValue("EgoCritTempListPgUrl");
if(s == null)
s = oapagecontext.getCurrentUrlForRedirect();
OAButtonBean oabuttonbean = (OAButtonBean)oawebbean.findIndexedChildRecursive("cancelButton");
oabuttonbean.setWarnAboutChanges(false);
oabuttonbean.setDestination(s);
public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
byte byte0 = 4;
super.processFormRequest(oapagecontext, oawebbean);
OAApplicationModule oaapplicationmodule = oapagecontext.getApplicationModule(oawebbean);
if(oapagecontext.getParameter("applyButton") != null)
oapagecontext.getApplicationModule(oawebbean).getTransaction().commit();
String s = null;
if(oapagecontext.getTransactionTransientValue("OverrideEgoCancelApplyPGButtonBarCODestination") == null)
OAFormValueBean oaformvaluebean = (OAFormValueBean)oapagecontext.getPageLayoutBean().findChildRecursive("applyDestinationHidden");
if(oaformvaluebean != null)
s = (String)oaformvaluebean.getValue(oapagecontext);
if(s == null)
OAButtonBean oabuttonbean = (OAButtonBean)oawebbean.findIndexedChildRecursive("cancelButton");
s = oabuttonbean.getDestination();
try
oapagecontext.sendRedirect(s);
return;
catch(Exception exception)
return;
if(byte0 == 4)
EgoItemContext egoitemcontext = EgoItemContext.getItemContextObject(oapagecontext);
String s1 = egoitemcontext.getItemNumber();
try
CallableStatement callablestatement = oaapplicationmodule.getOADBTransaction().getJdbcConnection().prepareCall("{XXNRITEMUPDATE(?)}");
callablestatement.setString(1, s1);
callablestatement.execute();
callablestatement.close();
catch(SQLException sqlexception)
sqlexception.printStackTrace();
And my error is as follows
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:603) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean.processRequest(OAPageButtonBarBean.java:351) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:980) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430) at oa_html._OA._jspService(_OA.java:82) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) 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:595) ## Detail 0 ##
java.lang.NullPointerException at oracle.apps.ego.common.webui.EgoCancelApplyPGButtonBarCO.processRequest(EgoCancelApplyPGButtonBarCO.java:81) at oracle.apps.ego.common.webui.EgoCancelApplyPGButtonBarEXTCO.processRequest(EgoCancelApplyPGButtonBarEXTCO.java:31) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:587) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean.processRequest(OAPageButtonBarBean.java:351) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:980) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1136) at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:959) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:926) at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:646) at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247) at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353) at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2336) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1735) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:509) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:430) at oa_html._OA._jspService(_OA.java:82) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) at javax.servlet.http.HttpServlet.service(HttpServlet.java:588) at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162) at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:175) at oa_html._OA._jspService(_OA.java:92) at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119) at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:385) at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259) at oracle.jsp.JspServlet.internalService(JspServlet.java:178) at oracle.jsp.JspServlet.service(JspServlet.java:148) 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:595)
I hope that u will help me untill i got the solution for this issue.
Regards
Zaheer. -
Calling PL/Sql Stored Procedure from java file
Having problem in calling oracle stored procedure using bc4j.
in ApplicationModuleImpl you can use following e.g.
on client side use a custom method to access
try {
DBTransaction dBTransaction = getDBTransaction();
String stmt = "CALL CHANGE_OWNER( ?, ?)";
CallableStatement callableStatement = dBTransaction.createCallableStatement(stmt,DBTransaction.DEFAULT);
callableStatement.setString( 1, oldOwner );
callableStatement.setString( 2, newOwner );
callableStatement.execute();
} catch (SQLException ex) {
throw new JboException(ex);
} -
Problem with the version of ojdbc
Hello
I have an application in struts 2, that connects with the database via ojdbc14.jar (Implementation-Version: "Oracle JDBC Driver version - 9.0.2.0.0"). With this version of the driver, the application works fine.
But I need to use ojdbc5.jar, and whith this driver, doesn't work.
When I do this:
callableStatement=conexion.prepareCall(consulta.toString());
and my "consulta" (query) have more than 10 parameters, throws an exception (Array index out of range). But if my query have less than 9 parameters, it's work!!!
For example:
Begin Insert into DIRECCION (TIPO_VIA, NOME_VIA, NUMERO_VIA, BLOQUE, ESCALEIRA, LOCALIDADE, MUNICIPIO, PISO, PORTA, PROVINCIA, PAIS) Values(?,?,?,?,?,?,?,?,?,?,?) returning ID_DIRECCION into :i; end;
How I can fix this error?.
ThanksHello
In the consultas.properties I have this:
DireccionDAO.altaDireccion=Begin Insert into DIRECCION (TIPO_VIA, NOME_VIA, NUMERO_VIA, BLOQUE, ESCALEIRA, LOCALIDADE, MUNICIPIO, PISO, PORTA, PROVINCIA, PAIS) Values(?,?,?,?,?,?,?,?,?,?,?) returning ID_DIRECCION into :i; end;
And in the queryDao.java I have this:
//In this line, throws an exception (Array index out of range)
callableStatement=conexion.prepareCall(consulta.toString());
callableStatement.setString(1, direccion.getNumeroVia());
callableStatement.setString(2, direccion.getNomeVia());
callableStatement.setInt(10, direccion.getProvincia());
callableStatement.registerOutParameter(12, java.sql.Types.INTEGER);
callableStatement.executeUpdate();
idDireccion=callableStatement.getInt(12);
return idDireccion;
I have all the queries like that, but in this query, the parameters are more than 10, and with the driver ojdbc5.jar, don't work, but with ojdbc14.jar it is working.
Thanks. -
Hi All,
I have extended the standard CO.
Below is my code.
processRequest(OAPageContext pageContext,OAWebBean webbean)
super.processRequest(pageContext,webbean);
processFormRequest(OAPageContext pageContext,OAWebBean webbean)
super.processRequest(pageContext,webbean);
String evt = pageContext.getParameter(OAWebBEanConstants.EVENT_PARAM);
OAApplicationModule oaapplicationmodule = pageContext.getRootApplicationModule();
OAViewObject vo = (OAViewObject)oaapplicationmodule.findViewObject("DisplaydetailsVO");
if(vo!=null)
vo.first();
String fwk = pageContext.getParameter("Runid"); *// If i use this statement to call the attribute value then Error 1 i am getting*
(or)
String qaz = (String)vo.getCurrentRow().getAttribute("Runid") *// If i use this statement to call the attribute value then Error 2 i am getting*
if(event.equals("GO")
try
CallableStatement callablestatement = (oracleCallableStatement)oaapplicationmodule.getOADBTransaction().createCallableStatement("begin purchase_po_wf.purchasing_vision_wf(:1); end;",1);
callablestatement.execute();
callablestatement.setString(1,fwk);
callablestatement.setString(1,qaz);
callablestatement.close();
callablestatement.close();
Catch(SQLException ex)
Please suggest me which statement to use call the Attributes & VO . Please do let me know if anything is wrong in the code.
I am getting the below errors :
1. Cannot call the procedurejava.lang.sql.exception Method in & out parameters extends::1
2. Java.lang.NullPointerException
Can any one please help me out , to overcome this issue. Its bit urgent
Thanks,
KalyanHi Kalyan,
So you want to get the value of DisplaydetailsVO.Runid attribute
and then use it for calling a package?
and the attribute is Runid or RunId
you can put the below code to get all the attributename and its values in the VO.(change the VO, AM names according to your customizations)
Then you can get what should be attributeName you should be using it, and I am not sure about your requirement, you might need to call before super.processFormRequest().
Get all the attribute from a VO with Attribute Names in Custom CO
OAApplicationModule rootAM = pageContext.getRootApplicationModule();
OAApplicationModule apprAM = (OAApplicationModule)rootAM.findApplicationModule("AppraisalsAM");
String offlineStatus = (String)apprAM.invokeMethod("getOfflineStatus",new Serializable[]{appraisalId+""});
OAViewObject appraisalVO = (OAViewObject)apprAM.findViewObject("AppraisalVO");
if(appraisalVO !=null)
AppraisalVORowImpl appraisalVORow = (AppraisalVORowImpl) appraisalVO.first();
if(appraisalVORow !=null)
int attrCount = appraisalVO.getAttributeCount();
writeLog("XXRBG",pageContext,"Attrbuute count "+attrCount);
String[] attributeNames = appraisalVORow.getAttributeNames();
for (int i = 0 ;i< attributeNames.length ;i++ )
writeLog("XXRBG",pageContext," Name "+attributeNames[i] +" = "+appraisalVORow.getAttribute(i));
Thanks,
With regards,
Kali.
OSSi.
Maybe you are looking for
-
Is Windows Server 2012 compatible with HP Officejet pro 8600 plus printers
Hello, I am wondering whether HP officejet pro 8600 plus printers compatible with Windows server 2012 - I have the driver installed on the server and deployed - installation of the driver and all was successful but it won't print from the server or
-
Withholding tax based on segments/profit center
Hello Friends Iam developing withholding tax report for our FI module.I need to show report based on segments which are our different company offices.Now WITH_ITEM table does not has segment otherwise I would have directly picked data from WITH-ITEM.
-
I chose by mistake ''voice over'' and now I can't unlock my iPod
Yesterday while I was changing some settings I saw that Voice Over, I didn't know what it was so I chose it and then I couldn't choose anything else. After that iPod locked and now I can't unlock it . I can't choose and select anything. Can someone g
-
Load balancing in Oracle RAC 11g (11.1.0.6.0)
Hi! One of our customers use load balancing, now all users get connected against node 2. --The configuration of load balancing will be correct I think, have worked before --How do I verify the load on each node ? --What can be wrong? --Need help, wha
-
Register with ESB, data sources
Hi, I have an ESB project to deploy on an integration server. It makes use of a database adapter. When I created that service, I connected to the database, and through the wizard it worked great. So far so good. From the wsdl file: Your runtime conne