How to handle ADF_FACES Errors/Exceptions and display customized message.
Hi All,
<b>My question here is, </b>
Is there any way to handle the validation/PPR kind of run time exceptions/errors. I have tried to handle these errors by extending the lifecycle and overridden the reportErrors method. But this method is being called in the PREPARE_RENDER phase. But the exception is happening in the JSF_PROCESS_VALIDATIONS phase. I have tried to handle the exceptions in the custom PagePhaseListener. But these exceptions could not be handled in the custom PagePhaseListener.
<b>I would like to display a customized message to the user instead of displaying the PPR exception</b>.
The details are given below.
I have a use case related to the security like if there is a drop down list in a page. Drop down list is having a af:validateRegExp component which allows only alphabets. Dropdown is populating alphanumeric values.
One option is selected in the drop down list and submitted the value with the help of the commondbutton.
With the help of some tools, we modified the submitted value(index of the list submitted) to some alphabets.
<b>Its throwing some validation exception. Some of the statements are given below.</b>
<UIXRegion> <_warn> Error processing viewId: /Validate_TF/validate URI: /validate.jsff actual-URI: /validate.jsff.
java.lang.NumberFormatException: ADF_FACES-60034:SelectOne could not convert index 0asd
<LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase PROCESS_VALIDATIONS 3
<RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR
<b>displaying a popup dialog with error message like:</b>
ADF_FACES_60034:could not convert index
ADF_FACES_60097:server exception
ADF_FACES_60096: some exception occurred during PPR,
<b>I don't want to show these kind of messages to user. Please suggest me whether is it possible or not.</b>
Thanks in advance.
Regards,
SatishRaj Dasari.
Hi,
Try reading one of Franks post :
[url https://blogs.oracle.com/jdevotnharvest/entry/extending_the_adf_controller_exception_handler]
Nigel
Similar Messages
-
How to handle sql error exception in view object
Guys,
I have view object (with rows fetched from a sql query).
Say the query in the VO looks like this..
select plsql_fun(c) from dual
(Note : the plsql function in the above query can throw an exception in some cases)
when the plsql function throws a exception, we get sql exception (oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation)
Is there any way i can catch this exception and return -1 in the view object...
Thanks in advance.Check out http://www.oracle.com/technetwork/issue-archive/2013/13-mar/o23adf-1897193.html
Have you tried to surround hte executeQuery with a try catch block?
Timo -
How to Handle RFC delivery exception (rfcClientException) in XI?
I have a following scenario.
I have an outbound soap interface (sender) and inbound RFC(receiver). When the soap message is posted it goes to receiver where it has to execute the RFC. It tries to convert the XML to RFC and throws the following exception.
com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date 'xxxx-xx-xx' has a wrong format at field CREAT_DATE: Unparseable date: "xxxx-xx-xx
I defined the fault message and attached it to the Inbound Interface. I also defined the mapping of receiver exception message to fault message. I am expecting a fault message back to sender which is not happening.
When I go to moni and try to look for the error in the response message I see the following.
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="PARSING">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date 'xxxx-xx-xx' has a wrong format at field CREAT_DATE: Unparseable date: "xxxx-xx-xx"</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I am suspecting that since the fault message does not contain this structure it's not able to build it.
How do I handle such runtime exception and transfer it to sender system. Any help would be greatly apperciated.I have the same problem. The error is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Adapter
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="PARSING">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Date '2006/04/09' has a wrong format at field INVALIDITYBEGIN: Unparseable date: "2006/04/09"</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Anyone have any idea, how should I resolve the data format issue?
Thanks -
How to handle multiple save exceptions (Bulk Collect)
Hi
How to handle Multiple Save exceptions? Is it possible to rollback to first deletion(of child table) took place in the procedure.
There are 3 tables
txn_header_interface(Grand Parent)
orders(parent)
order_items (Child)
One transaction can have one or multiple orders in it.
and one orders can have one or multiple order_items in it.
We need to delete the data from child table first then its parent and then from the grand parent table.if some error occurs anywhere I need to rollback to child record deletion. Since there is flag in child table which tells us when to delete data from database.
Is it possible to give name to Save exceptions?
e.g.
FORALL i IN ABC.FIRST..ABC.LAST SAVE EXCEPTIONS A
FORALL i IN abc.FIRST..ABC.LAST SAVE EXCEPTIONS B
if some error occurs then
ROLLBACK A; OR ROLLBACK B;
Please find the procedure attached
How to handle the errors with Save exception and rollback upto child table deletion.
CREATE OR REPLACE
PROCEDURE DELETE_CONFIRMED_DATA IS
TYPE TXN_HDR_INFC_ID IS TABLE OF TXN_HEADER_INTERFACE.ID%TYPE;
TXN_HDR_INFC_ID_ARRAY TXN_HDR_INFC_ID;
ERROR_COUNT NUMBER;
BULK_ERRORS EXCEPTION;
PRAGMA exception_init(bulk_errors, -24381);
BEGIN
SELECT THI.ID BULK COLLECT
INTO TXN_HDR_INFC_ID_ARRAY
FROM TXN_HEADER_INTERFACE THI,ORDERS OS,ORDER_ITEMS OI
WHERE THI.ID = OS.TXN_HDR_INFC_ID
AND OS.ID = OI.ORDERS_ID
AND OI.POSTING_ITEM_ID = VPI.ID
OI.DW_STATUS_FLAG =4 --data is moved to Datawarehouse
MINUS
(SELECT THI.ID FROM TXN_HEADER_INTERFACE THI,ORDERS OS,ORDER_ITEMS OI
WHERE THI.ID = OS.TXN_HDR_INFC_ID
AND OS.ID = OI.ORDERS_ID
OI.DW_STATUS_FLAG !=4);
IF SQL%NOTFOUND
THEN
EXIT;
END IF;
FORALL i IN TXN_HDR_INFC_ID_ARRAY.FIRST..TXN_HDR_INFC_ID_ARRAY.LAST SAVE
EXCEPTIONS
DELETE FROM ORDER_ITEMS OI
WHERE OI.ID IN (SELECT OI.ID FROM ORDER_ITEMS OI,ORDERS
OS,TXN_HEADER_INTERFACE THI
WHERE OS.ID = OI.ORDERS_ID
AND OS.TXN_HDR_INFC_ID = THI.ID
AND THI.ID = TXN_HDR_INFC_ID_ARRAY(i));
FORALL i IN TXN_HDR_INFC_ID_ARRAY.FIRST..TXN_HDR_INFC_ID_ARRAY.LAST SAVE
EXCEPTIONS
DELETE FROM ORDERS OS
WHERE OS.ID IN (SELECT OS.ID FROM ORDERS OS,TXN_HEADER_INTERFACE THI
WHERE OS.TXN_HDR_INFC_ID = THI.ID
AND THI.ID = TXN_HDR_INFC_ID_ARRAY(i));
FORALL i IN TXN_HDR_INFC_ID_ARRAY.FIRST..TXN_HDR_INFC_ID_ARRAY.LAST SAVE
EXCEPTIONS
DELETE FROM TXN_HEADER_INTERFACE THI
WHERE THI.ID = TXN_HDR_INFC_ID_ARRAY(i);
COMMIT;
DBMS_OUTPUT.PUT_LINE(TO_CHAR(SYSDATE, 'DD-MON-YY HH:MIPM')||':
DELETE_CONFIRMED_DATA: INFO:DELETION SUCCESSFUL');
EXCEPTION
WHEN OTHERS THEN
ERROR_COUNT := SQL%BULK_EXCEPTIONS.COUNT;
DBMS_OUTPUT.PUT_LINE(TO_CHAR(SYSDATE, 'DD-MON-YY HH:MIPM')||':
DELETE_CONFIRMED_DATA: ERROR:Number of errors is ' ||ERROR_COUNT);
FOR indx IN 1..ERROR_COUNT LOOP
DBMS_OUTPUT.PUT_LINE('Error ' || indx || 'occurred during
'||'iteration'||SQL%BULK_EXCEPTIONS(indx).ERROR_INDEX);
DBMS_OUTPUT.PUT_LINE('Error is '
||SQLERRM(-SQL%BULK_EXCEPTIONS(indx).ERROR_CODE));
END LOOP;
END DELETE_CONFIRMED_DATA;
Any suggestion would be of great help.
Thanks in advance
AnuIf you have one or two places in your code that need multiple exceptions, just do it with multiple catch statements. Unless you are trying to write the most compact Programming 101 homework program, inventing tricks to remove two lines of code is not good use of your time.
If you have multiple catches all over your code it could be a code smell. You may have too much stuff happening inside one try statement. It becomes hard to know what method call throws one of those exceptions, and you end up handling an exception from some else piece of code than what you intended. E.g. you mention NumberFormatException -- only process one user input inside that try/catch so it is easy to see what error message is given if that particular input is gunk. The next step of processing goes inside its own try/catch.
In my case, the ArrayIndexOutOfBoundsException and
NumberFormatException should be handled by the same way.Why?
I don't think I have ever seen an ArrayIndexOutOfBoundsException that didn't indicate a bug in the code. Instead of an AIOOBE perhaps there should be an if statement somewhere that prevents it, or the algorithm logic should prevent it automatically. -
How to handle the #error in ssrs expression
hi
Please any one help me to resolve this #error ,
I have a calculated filed in that expression i given a if condition like below
data of column is coming like this 0 , 0.0
=IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
how to handle the #error
Please let me know any oneHi deepuk23,
According to your description, when you use the IIF() function in the report you got some error,right?
The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null, because IIF() function always evaluates both the true part and the false part, even
though it returns only one of them, it will throw out the error.
To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
=IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
For more information, please refer to this article:
FAQ: Why does the “Attempted to divide by zero” error still happen?
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
How to handle method based exceptions in webdynpro abap?
Hi ,
I want to raise an exception from my method.....I am doing division operation inside my method...when I am entering a very large amount , that time I am getting run time error.....please someone help me to catch this exception and display on browser.
Thanks & Regards
Suman KumarHi Suman,
You can catch the arithmetic exception by using exception class CX_SY_ARITHMETIC_ERROR as below
Sample code:
data lv_ex_msg type string.
data lx_sy_error type ref to CX_SY_ARITHMETIC_ERROR.
try.
"here goes your code
catch CX_SY_ARITHMETIC_ERROR into lx_sy_error.
" you can get exception text as below
lv_ex_msg = lx_sy_error->get_text( ).
or
" lv_ex_msg = lx_sy_error->get_longtext( ).
endry.
Hope this helps you.
Regards,
Rama -
How to handle the errors using RSRV tcode
Hi all,
Could any one give tell me how to handle the errors,(if possible give me some example errors)and correct the errors using RSRV tcode.
Thanks & Regards,
Aswini.Hello Aswini,
For further details on RSRV go through the link:
http://help.sap.com/saphelp_nw04/helpdata/en/92/1d733b73a8f706e10000000a11402f/frameset.htm
Hope it helps
Cheers
SRS -
How to handling ecxeptions on alv and how to write subrotiens on scripts
Hi abapers..
tell me how to handle ecxeptions on ALV, and how many exceptions are there ,which exception i have to use.
AND is it possible to write subrotiens on script, if it is possible tell to me how to writeThere are already enough Exceptions provided for ALV .
yes you can write sub-routines in scripts , search SDN and you will get answer for the same -
How to handle transport errors????
Hi Gurus.
How to handle transport errors and create a workflow email to the owner of the transport from solution manager??Solution manager does provide automatic e-mail notification when status changes or error occures.To answer your question when ever transport fails ..you can configure such way that a support message can create automatically and notify support team / respective person.
If you are not using any t-code do you have any thoughts where you can create transport request???? and are you using solution manager only for maintanence project or for implimentation project also????
Hope this helps you....
Praveen -
My Ipad is locked and display a message that says " The Ipad hasnt been backed up in 2 weeks...........connected to wifi". How do I come out of it?
Reset iPad
Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
Note: Data will not be affected. -
Choosing any of several dozen bookmarks, Firefox will show a screen reporting Error 404 and display only part of the complete URL (whatever follows the slant mark beyond the domain name). When going to a new site, such as provided by a Google search, the initial page may show up but clicking on links within that page again brings up the 404 error. My only solution has been to uninstall whatever new version of Firefox has been automatically downloaded and then re-install version 3.6.0, which works.
A possible cause is security software (firewall) that blocks or restricts Firefox without informing you about that, possibly after detecting changes (update) to the Firefox program.
Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox.
See [[Server not found]] and [[Firewalls]] and http://kb.mozillazine.org/Firewalls
See also http://kb.mozillazine.org/Error_loading_websites -
How to validate concurrent program parameter and display a custom message?
Hi Friends,
I have a concurrent program which has two non-mandatory parameters.
The requirement is that user should provide value for any one of the parameters.
If user does not enter value for both the parameters, i need to display a custom error message.
Parameter1 has an independent value set.
Parameter2 has character value set with validation type as special.
Process i tried so far:
In the value set for the second parameter, under the Validate event, i have written the following code:
FND PLSQL "declare
l_paramb VARCHAR2(20) := :!VALUE;
l_parama VARCHAR2(20) := :$FLEX$.MOT_CUSTMSGTST_A;
BEGIN
IF 1 = 1 THEN
fnd_message.set_name('FND','FND_GENERIC_MESSAGE');
fnd_message.set_token('MESSAGE','Please enter any of the ip1 or ip2');
fnd_message.raise_error;
END IF;
END;" I am not using those variables that are defined for the time being.
Now since the condition 1=1 is always satisfied, i should always receive the error message.
I am not receving any error message and i can go ahead and submit the program..
Please advise on where am i going wrong.
Reports Version - 6i
Oracle Apps Version - 11.5.10.2
Regards,
Sreekanth MunagalaHi srrekanth,,
I've similar issue , I need to display custom message for concurrent program parameter.Need to validate the parameter & display custom message .
Can you pl provide solution. -
I have created a DVD via iMovie and burned several copies. It is a large file. When played the some DVD's will stop and display a message SKIPPING DAMAGED Part but will not resume. Some work fine. It is not the DVD. I have burned from several batches. When trying to export the project, I get an error message with the following message: The project could not be prepared for publishing because an error occured (-108).
TV video typically is copyrighted content. We'd be breaking several rules trying to help you. Good luck!
-
How to handle null pointer exception
dEAR ALL
how to handle null pointer exception
public void xxperscompmatchcase(OAPageContext pageContext,
OAWebBean webBean,String cid,String pid)
xxcrmleadperslastnameVOImpl vo=getxxcrmleadperslastnameVO();
xxcrmleadcompnameVOImpl vo1=getxxcrmleadcompnameVO();
vo.setWhereClauseParams(null);
vo1.setWhereClauseParams(null);
vo.setWhereClauseParam(0,pid);
vo1.setWhereClauseParam(0,cid);
vo.executeQuery();
vo1.executeQuery();
String compname="";
String plname="";
if(vo1.first().getAttribute("CompName")!=null)
compname=(String)vo1.first().getAttribute("CompName");
else
compname="";
if((String)vo.first().getAttribute("PersLastname")!=null)
plname=(String)(String)vo.first().getAttribute("PersLastname");
else
plname="";
OAFormattedTextBean p =
(OAFormattedTextBean)webBean.findChildRecursive("personmatchcase");
OAFormattedTextBean b =
(OAFormattedTextBean)webBean.findChildRecursive("matchcase");
b.setValue(pageContext,
"The Lead is matched to company " + compname.toUpperCase());
p.setValue(pageContext,
"The Lead is matched to person " + plname.toUpperCase());
it is going to null pointer exception
how to handle this exceptionHi,
try
//Write your logic here, which can generate any exception
catch(Exception e)
//Write your exception specific code here
Regards,
Reetesh Sharma -
How to stop a process from running and display a message
I have a button that inserts data into a table based on bind variable selected on the page. I would like to add code to that button that will check to see if certain data already exists in the table, for that bind variable, and if that data already exists, stop the process and display a message that says "you have already inserted that information - bla bla bla". If not, continue inserting. What would be the best way to do this?
Currently, the button is a plsql that inserts the data.
Any help or examples would be greatly appreciated!
mholman
Edited by: user10488561 on Jul 27, 2009 8:48 AMUse a validation process for that. If the validation fails (data exists) the processes will not be run. If it doesn't then the processing will continue.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------------------
Maybe you are looking for
-
How to add a value set in a custom form in query_find screen in R12 please
Hello,I need to add a value set fileld found in the fnd_flex_value_set table in a query find screen . How do I proceed please ? Do I create a record group followed by a 'LOV' ? Thanks.
-
Multiple Problems - Hardware or Software?
I've been having a lot of problems lately with my MacBook Pro and I have absolutely no idea why. I called one Apple store and was told I should reinstall Leopard, do an Erase and Install, and not restore from my Time Machine backup because my file st
-
Hi, Is there a way of setting the first page the user sees to the Document List in Info View? It is possible to change each one individually but would be far easier to do it globaly in one go. Thanks
-
Pavillion 21 won't power on but power light is on
My pavillion 21 will not come on although the power button lights up. The screen doesn't come on at all. Please help I've had it only a month and have no clue as to why it won't come on.
-
How to force updatedisplaylist in a skin when custom property changes
Hi Folks, I have created a custom component based on a Spark Button. In that custom component I have added a single, public, bindable property - let's call it Fred. I also have a custom skin, based on the Spark Button skin. It's basically just like