Dropdownlist handler throws error

I have this handler for my dropdownlist:
protected function selectQuality_changeHandler(event:IndexChangeEvent):void {                   
    currentQualityLevel = event.currentTarget.selectedItem.@name;
    counterCostSF = event.currentTarget.selectedItem.@price;}
As soon as the state that includes this menu is activated, I get the error [code]TypeError: Error #1010: A term is undefined and has no properties.
However, if I continue past the error the app works fine, and people without the debugging plugin get no error.
That menu is populated with xml, and which node is chosen by a menu to the left of it.  I guess it is possible that the data is not ready, but that makes sense to me if the menu is chosen; not just on state load.
Since I don't actually "need" this information until the user uses the menu (there are default values),how can I prevent the error?
Here is the code that controls that menu:
private function getCountertops_resultHandler(event:ResultEvent):void {
     countertopData = event.result.type;}
protected function selectMaterial_changeHandler(event:IndexChangeEvent):void {
     var sel:int = event.currentTarget.selectedIndex;
     currentMaterial = event.currentTarget.selectedItem.name;
     updateCountertopCard(sel);
protected function selectQuality_changeHandler(event:IndexChangeEvent):void {                        
    currentQualityLevel = event.currentTarget.selectedItem.@name;
    counterCostSF = event.currentTarget.selectedItem.@price;
private function updateCountertopCard(i:int):void {
      var node:XML = countertopData[i];
      if (!node) return;
      matTitle.text = countertopData[i].title;
      matCaption.text = countertopData[i].caption;
      matBullets.text = countertopData[i].bullets;
      image1.imageSource = "images/"+countertopData[i]..swatches.swatch[0];
      selectQuality.dataProvider = new XMLListCollection(countertopData[i].cost.level);
      selectQuality.selectedIndex = 0;
      profileList.dataProvider = new XMLListCollection(countertopData[i].profiles.profile);

@Handycam,
You should always try and verify that the event.currentTarget.selectedItem property is not null before trying to access any of it's properties.
Either try this:
if (event.currentTarget.selectedItem) {
    currentQualityLevel = event.currentTarget.selectedItem.@name;
    counterCostSF = event.currentTarget.selectedItem.@price;}
Or you could try wrapping the code in a try/catch block.
Peter

Similar Messages

  • 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 one 

    Hi 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 system errors in XI using BPM? please help!

    Hi Experts,
         I have a requirement where I have to handle system errors. For example when I am making RFC call using RFC adapter if the remote destination is down then I have create a understandable error message and store it in another SAP table.
    How to handle it? I am using BPM. I can see that there is "Exceptions" in the send step. How to use this?
    Thanks
    Gopal

    Hi Gopalkrishna,
    In this case whenever you get Mapping Exception , you can raise an Exception with the help of BPM and you can send the status to the RFC. But with the help of BPM.
    For a Simple case refer:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/33/4a773f12f14a18e10000000a114084/frameset.htm
    If you want you can do it without a BPM
    and throw an exception in case any of the values is missing:
    have a look at this weblog on how to throw exceptions
    in a nice way:
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    Also just go through <a href="/people/sap.user72/blog/2005/02/23/raising-exceptions-in-sap-xi-mapping Exceptions in SAP XI Mapping</a> and see if it helps you solve the problem.
    Also go through these links:
    http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7f2243d711d1893e0000e8323c4f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/68/253239bd1fa74ee10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/f2bbc8142c11d3b93a0000e8353423/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/5d/2166e6a91d11d188de0000e8216438/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/05/bb223905b61b0ae10000000a11402f/content.htm
    Please do let know if it helped.
    Regards,
    Abhy

  • Why Webdynpro framework is throwing error in this testcase

    Hi All,
    In my requirement i'm using the WTGXXX(for Discount field) in Webdynpro ABAP.
    If I validate the entries there is a standard check performed by the webdynpro framework when entries other than the numercie fields are given.
    This is a webdypro ALV.
    For Ex:
    when the discount is given as (9-33) it is throwing the error that "The entered value can only contain numerical characters" but it is not throwing any error for (9-(9/22)) or (9-(42)) instead it is calculating the values which is a good feature. But why, (9-33) this case is not handled.
    I tried to keep the value in duegging it is working fine.
    Before any event gets trigerred for the above cases the value is calculated by the framweork by defalut.
    Some times some cases are handled sometimes not.
    I'm unable to get this behavior of the framework.
    For the first time (9-3*3) calcuation is throwing error from the 2nd time onwards this is giving the correct output. When I load the view for the first time and do this check then error is thrown, second time when the other calcuations are done and again do this calcaulation then this error is not shown instaead it is giving me 0 which is the result.
    This case applies to the cases where the expressions result in 0 (defalut values)
    One mroe test case for this is - (9-9).
    Eventhough the user knows the result of these expresions, these are throwing errors.
    How to handle this.
    I tired handling this with own DE/Domanin CURR 15 but for the 1st time this error is theon 2nd time on wards the reuslt is shown correct.
    Isn't a special case.
    When I bound the table again with INITIAL data then again the erorr is thrown for that case.
    ie I have one RESET button where i will bind the table again with the INITIAL table entries then agian the error is thrown for (9-3*3).
    Is there any SAPNOTE applied or Exceptions to this. Please let me know.
    Please replicate the same in Webdynpro Java also and share the reasons.
    Currently I'm doing this by taking the string only to avoid these erorrs in case of Zero.
    Regards,
    Lekha.

    Hi
    Use another forum for Webdynpro questions: Web Dynpro ABAP
    BR, Sergei

  • Error Handling and Error Messages

    I already posted this in the java programming forum, but I dont think the people responded understand patterns, or what I was asking. Here is my original post, for reference I am not asking how to catch and exception, or how to display an error, I am asking about the pattern implementation.
    I am currently in the process of creating my Exception model for my program, and I have a question about error messages. I was reading the book "Effective Java Programming" which deals with patterns and it states that an exception should state the error and report information on all relavent states. For instance If you have a class the modeled some sort of memory array, and an access was requested to a block of memory outside the array you should throw an ArrayIndexOutOfBoundsException("Index:" + index + ", start:" + 0 + ",end:" + Array.length) or if you made your own MemoryAddressOutOfBoundsException(same as above) which when printed should read
    ArrayIndexOutOfBoundsException: Index:-1, start:0, end:0
    stack trace
    The pertinate information is the index, start index, and end index.
    The book CLEARLY states as an industry design pattern that exceptions weather checked or unchecked should not contain user error messages. For instance with the above example one might be tempted to use this as the exception message: "The memory addres index is not a valid memory address." This is clearly a user error message.
    So heres my situation. In a gui environment (command line console not visible) how do you generated a user error message, letting the user know that an internal exception has occured.
    In my previous implementation of my project, I used the exception message the user error message and just reported the message on a dialog. I have heard of people using error catalogs, which centrallizes all the error messages into a single class or file.
    I was wondering if and Error catalog was a good approach, how I might go about implementing one, and if not how do you the community handle user error messages.

    class MyAppErrors {
       public static final int FILE_NOT_FOUND = 0;
       public static final int DIR_NOT_FOUND = 1;
       public stat final String[] errMsgs = {
          "The file was not found.",
          "The directory was not found.",
       public String getErrMsg( int n ) { return errMsgs[n]; }
    [\code]
    And a nicer version would allow the calling code to pass in a substring so you could say "The file 'somename.ext' was not found."                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Throw Error in Module Adapter EJB

    Hi experts,
    In order to make some validations when getting file in File Adapter, was developed a EJB Module Adapter. When the validation failed, it must to be generate a throw error with a text that appears in Runtime workbench.
    throw new ModuleException("Error al crear objeto Archivo para procesar el legacy: "+legacy);
    But, it doens't happen. In Runtime workbench I just can see a Exception null . 
    Follow Below the Java Code of Module EJB:
    package clasesSox;
    import java.io.IOException;
    import java.io.InputStream;
    import java.math.BigDecimal;
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    import java.util.Map;
    import java.util.StringTokenizer;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import com.sap.aii.af.mp.module.ModuleException;
    @author martin.j.rodriguez
    public class Archivo extends XMLParser {
         private Log log = LogFactory.getLog(Archivo.class);
         private Config config;
        private String nombre, tipoSistema, pais;
        private Date fecha;
        //private boolean procesado;
         //private org.xml.sax.XMLReader xr;
         private double totimp, importeParcial;
        private String buscaTOTIMP, regImporte, buscaTOTLIN;
        private String [] tags;
        private InputStream inputStream;
        private int totlin, regCuenta;
        public Archivo(InputStream is, String legacy) throws ModuleException {
             super();
             Map properties = getConfig().getConfig(legacy);
              if (properties == null) {
                   if (log.isErrorEnabled()){
                        log.error("Error al crear objeto Archivo para procesar el legacy: "legacy" - No se encontro la configuración.");
                   throw new ModuleException("Error al crear objeto Archivo para procesar el legacy: "+legacy);
              this.buscaTOTIMP = (String)properties.get(Config.CAMPO_IMPORTE_TOTAL);
              this.regImporte =  (String)properties.get(Config.CAMPO_IMPORTE);
              this.buscaTOTLIN = (String)properties.get(Config.CAMPO_LINEAS_TOTAL);
              String tagstosearch = (String)properties.get(Config.CAMPO_LINEAS_CONTAR);
              StringTokenizer st = new StringTokenizer(tagstosearch, ",");
              tags = new String[st.countTokens()];
              int i=0;
              while(st.hasMoreTokens()){
                   String token = st.nextToken();
                   tags[i++] = token.trim();
              setInputStream(is);
        public List validaArchivo() throws ParserConfigurationException, SAXException, IOException {
              regCuenta = 0;
             importeParcial = 0;
              DefaultHandler handler = this;
              SAXParserFactory factory = SAXParserFactory.newInstance();
              SAXParser saxParser = factory.newSAXParser();
              saxParser.parse(inputStream, handler);
              String s = "";
              roundValues();
              String stotimp = new BigDecimal(totimp).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
              String simporteParcial = new BigDecimal(importeParcial).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
              if (log.isDebugEnabled()){
                   log.debug("Resultados: TOTIMP: "stotimp" - CONTEO: "+simporteParcial);
                   log.debug("Resultados: TOTLIN: "totlin" - CONTEO: "+regCuenta);
              List results = new ArrayList();
              if (totimp != importeParcial) {
                   s = "Error al contar el total del importe, deberia ser: "stotimp" y el calculado es: "+simporteParcial;
                   if (log.isDebugEnabled()){
                        log.debug(s);
                   results.add(s);
              if (totlin != regCuenta) {
                   s = "Error al contar el total del lineas, deberia ser: "totlin" y el calculado es: "+regCuenta;
                   if (log.isDebugEnabled()){
                        log.debug(s);
                   results.add(s);
              return results;
         private void roundValues() {
              totimp = roundValue(totimp);
              importeParcial = roundValue(importeParcial);
    redondea un numero a 2 decimales
         private double roundValue(double d) {
              BigDecimal bd = new BigDecimal(d);
              bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);
              return bd.doubleValue();
         public void startElement(String namespaceURI, String lName, String qName, org.xml.sax.Attributes attrs) throws org.xml.sax.SAXException {
              String etiqueta = getTagName(qName, lName);
              //niveles.add(etiqueta);
              // Cuenta registros
              for (int i = 0;i< tags.length; i++){
                   if (etiqueta.equals(tags+)){
                        regCuenta++;
                        break;
         public void endElement(String namespaceURI, String lName, String qName)     throws org.xml.sax.SAXException     {
              String etiqueta = getTagName(qName, lName);
              //niveles.remove(niveles.size() - 1);
              // set valor totlin
              if (buscaTOTLIN.equals(etiqueta)){
                   totlin = parseInt(valor);
              // set valor totimp
              if (buscaTOTIMP.equals(etiqueta)){
                   totimp = parseDouble(valor);
              // suma importe parcial
              if (regImporte.equals(etiqueta)){
                   importeParcial += parseDouble(valor);
        public InputStream getInputStream() {
            return inputStream;
        public void setInputStream(InputStream texto) {
            this.inputStream = texto;
        public String getNombre() {
            return nombre;
        public void setNombre(String nombre) {
            this.nombre = nombre;
        public String getTipoSistema() {
            return tipoSistema;
        public void setTipoSistema(String tipoSistema) {
            this.tipoSistema = tipoSistema;
        public String getPais() {
            return pais;
        public void setPais(String pais) {
            this.pais = pais;
        public java.util.Date getFecha() {
            return fecha;
        public void setFecha(java.util.Date fecha) {
            this.fecha = fecha;
         public static void main(String args[]) {
                   String fileName = "FI_MAS_SAP_RENBAN_####_AAAAMMDD_HHMMSS.TXT";
                   java.util.StringTokenizer st = new java.util.StringTokenizer(fileName, "_");
                   for (int i = 0; i < 5; i++)
                        st.nextToken();
                   String anioMes = st.nextToken();
                   if (anioMes != null)
                        if (anioMes.length() > 5) {
                             System.out.println(anioMes);
                             System.out.println(anioMes.substring(0, 4) + " " + anioMes.substring(4, 6));
         private double parseDouble(String number){
              if (number == null || number.trim().length()==0 || number.trim().equals("/"))
                   return 0;
              // remuevo los 0 a la izquierda que afectan al parseint
              number = number.trim().replaceAll("^0+","");
              number = number.replaceAll(",",".");
              double result = 0;
              try {
                   result = Double.parseDouble(number);
              catch (NumberFormatException nfe){
                   System.err.println("Error parseando numero "+number);
              return result;
         private int parseInt(String number){
              if (number == null || number.trim().length()==0 || number.trim().equals("/"))
                   return 0;
              // remuevo los 0 a la izquierda que afectan al parseint
              number = number.trim().replaceAll("^0+","");
              number = number.replaceAll(",",".");
              int result = 0;
              try {
                   result = Integer.parseInt(number);
              catch (NumberFormatException nfe){
                   System.err.println("Error parseando numero "+number);
              return result;
    Carga la configuracion
    @return
         protected Config getConfig(){
              if (config == null){
                   ConfigParser cp = new ConfigParser();
                   config = cp.readConfig();
              return config;
    Could anyone help me about this problem ?
    Thanks in advance.+

    Hi,
    do u think, u will get the error text in the RWB ? I don't think so, it will provide the output in the RWB.
    The output of the Adapter module is nothing but XI -XML message. So this will not come
    check it out for the how to work on Adapter Modules-
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    Hope this helps,
    Regards,
    Moorthy

  • ColdFusion 11 Throws Error Session Variable Undefined, When in fact it is Defined as shown by CFDump.

    I've been having a particularly annoying error with ColdFusion 11, and unable to track down the source of this problem.
    Basically There are a few variables defined in the session scope we check with isdefined a few lines above to make sure they are defined. Subsequent lines may or may not throw a #variablename# is undefined on random lines.
    What can I do to fix this issue? Is this a known bug?

    I am doing isDefined checks for relevant variables when neccessary. The problem is not that the code errors out undefined ... it's that the variable is actually defined and errors out undefined.
    As a simplified example;
    Login.cfm Form supplies form.username and form.password to login_action.cfm then redirects to index.cfm after succesful LDAP authentication. I will not include all lines as it would be too long.
    Login_action.cfm
    <cfinclude template="ldap.cfm">
    <!--- LDAP login code goes here; checks if credential's supplied are valid and sets variable #logged_in# ... --->
    <cftry>
        <cfif isdefined("logged_in") and logged_in>
            <!--- Create Session User Structure and Default Profile --->
            <cfset session.user=StructNew()>
            <cfset session.user.username=form.username>
            <cfset session.user.firstname="">
            <cfset session.user.surname="">
            <cfset session.user.email="">
            <!--- Pull in additional Details --->
            <cfquery name="qDetails" datasource="userdetails">
            SELECT firstname,surname,email FROM Profiles
            WHERE username = '#session.user.username#'
            </cfquery>
            <cfif isdefined("qDetails") and qDetails.recordcount>
                <cfoutput query="qDetails">
                <cfset session.user.firstname ="#qDetails.firstname#">
                <cfset session.user.surname="#qDetails.surname#">
                <cfset session.user.email="#qDetails.email#">
                </cfouput>
            </cfif>
        <cfelse>
            <!--- Throw Error back to login page --->
            <cfthrow message="1" type="Custom_Security" ErrorCode="Fail">
        </cfif>
        <cfcatch type="any">
            <!--- Throw Error back to login page --->
            <cfthrow message="2" type="Custom_Security" ErrorCode="Fail">
        </cfcatch>
    </cftry>
    <!--- Redirect User to login page after Successful Login --->
    <cflocation url="index.cfm">
    Index.cfm
    <!--- At Top of Index session.user.email always exists, in the event it is undefined it will be set to "" --->
    <cfparam name="session.user.email" default="">
    <!--- Lots of lines of code above here build HTML page etc <cfoutput> references to #session.user.email# and other session vars --->
    <!--- Example pull some more information this line may or may not error... --->
    <cfquery name="qUserInformation" datasource="userdetails">
    SELECT * FROM Information
    WHERE user_email = '#session.user.email#'
    ORDER BY SomeOtherColumn
    </CFQUERY>
    <!--- Example point where a session error can be generated less than 2 lines above it has just finished getting information using session.user.email --->
    <cfquery name="qUserGroups" datasource="userdetails">
    SELECT * FROM Groups
    WHERE user_email = '#session.user.email#'
    ORDER BY SomeColumn
    </CFQUERY>
    <!--- Some other common examples require cfscript - and throw errors; above lines may not ... --->
    <cfscript>
    oHomePage=CreateObject("component","site_components.homepage");
    qNews=oHomePage.getNews("#session.user.category#");
    </cfscript>
    <!--- More lines to do with HTML Footer etc <cfoutput> more stuff --->
    in the wwwroot the Application.cfm handles all errors generated during rendering of the page, which includes generating a cfdump of the session scope.
    When I get the Error Log I can see in the cfcatch cfdump the error... Element USER.EMAIL UnDefined in SESSION.
    struct
    Browser
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36
    DateTime
    {ts '2014-09-28 11:38:48'}
    Diagnostics
    Element USER.EMAIL is undefined in SESSION. <br>The error occurred on line 15.
    However when I check the SESSION scope which is also dumped ... It is defined!
    struct
    user
    struct
    COLOR
    cccccc
    EMAIL
    [email protected]
    FIRSTNAME
    Example
    SURNAME
    Surname
    EXAMPLE1
    1
    TEMPLATE
    template14
    TEMPLATE_DETAILS
    0
    What is causing this strange and irratic behaviour? The problem is so far I cannot replicate the issue. It is intermittant. The issue only started after upgrading to ColdFusion 11. This code has worked flawlessly for years on CF8.

  • How to throw error from process without raising exception

    Hi ,
    I like to throw error messages in Process error section whenever my If condition fails from PL/SQL anonymous block.The process is fired after submit-computation and validation.Also i like to avoid placing raise_application_error from the Process region source.
    My task is to validate whether a itemvalue is in from the table lists or not.
    like --- If :P1_X not in ('abc','xyz') then throw error .(where abc and xyz are tablename) .Instead of placing the validation as Validation routine i must have to place it in Process since the :P1_X item value obtain after computation and validation of another process.
    Thanks & Regards,
    ROSY.

    Hi Vikas ,
    Again thnx for ur input and sorry 4 my late reply.
    Probably i cant make my actual requirement clear to you.
    I want to press a submit button and the process will be fired.The process should check the item :p1_x value if this value is not in the tablenames then here i am throwing error by raise_application_error .I want to make this customized such that instead of raising the error i want to make the error string display in the error message section which is the error pattern usually displayed as Inline error notification for the validation types.But since its not validation rather process so how can i handle the situation.
    Any suggestion ?
    Thanks & Regards,
    ROSY.

  • How to handle write errors in non blocking sockets

    Hi,
    I'm using sockets registered with a Selector for read operations. I've seen code examples that put the SocketChannel in non blocking mode before registering it with the selector, and in fact not doing so would cause an IllegalBlockingModeException to be thrown.
    My problem is that I can't handle write errors. The call to write() returns inmediately without throwing any exception. Even worse, when the network timeout expires the selector wakes up and I get an exception on read(). So I can't tell the difference between a real read error and a write error.
    What can I do? Is there a magic method I haven't heard about?
    Thanks

    ejp wrote:
    OK, so what happens is this: you write from your ByteBuffer; if there is room in the socket send buffer, the data is transferred and the transfer count is returned. (If there isn''t, the write returns zero and nothing has happened.) Your application code then continues. Meanwhile TCP is trying to send the data in the send buffer and get an ACK from the peer. If the peer is down as per your test, eventually those write attempts will time out. You will then get a connection reset exception on the next read or write.
    Even worse, when the network timeout expires the selector wakes upCorrect, to tell you there is an error condition pending. This is good, not bad.You're right. This way my program can know that something happened.
    But I still don't understand what the difference between a failed write() and a failed read() is. I mean, the error condition may appear during a send attempt, or it may appear after sending. In both cases I get an error when trying to read. How can my program know if data have been received by the other end?
    Do I have to implement ACK messages in the application level protocol??? It'd be nice if TCP could do this for me...

  • 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

  • Handling DB Errors In A Bean

    Obviously there are many different things that can go wrong when trying to retrieve data from a database. A couple of examples are that I have several DB constraints and triggers that prevent "bad data" from being entered. However, I'm not sure how to communicate this info back to the JSP so that a custom message can be presented to the user. My JSP calls a javabean that does the actual DB read. It returns a 2D array with the data returned from the call or a null if no data is returned. I do catch errors but, right now, I do a printStackTrace because I'm not sure how to handle this situation. Even if I could code a way to catch all the specific errors, is there some common way of returning them to the JSP to display the specific error messages? The only thing I can think of is to have the JSP pass in an extra parameter - some object that would store specific errors. Upon return to the JSP it would check this object. If null then ignore. If not null then handle the error from the JSP side. I would think DB errors and displaying a reason to users why a DB call failed would be a common thing and so there's probably an "accepted way" of doing this kind of thing. Any advice?

    My JSP calls a javabean that does the actual DB read. It returns a 2D array with the data returned from the call or a null if no data is returned. I do catch errors but, right now, I do a printStackTrace because I'm not sure how to handle this situation
    Do not catch error here. Throw it to the caller. For exemple :
    Your code should look like:
    public void read(){
    try{
    }catch(Exception e){
    e.printStackTrace();
    change for :
    public void read() throws Exception{
    In jsp :
    Bean bean = .....
    <%
    try{
    bean.read()
    catch(Exception e){
    handle your error here.
    %>

  • To throw error message on line item

    Hi Experts,
      I am using the user exit MV45AFZZ_MOVE_FIELD_TO_VBAP of sale order and it is getting triggered when we press 'ENTER' after filling the line item details of a sale order.
      In my requirement i have to check some conditions on the line items and have to throw error message on that particular item sothat the user can delete that item and can proceed with the remaining.
      But i am not able to throw error message on the particular item.
      Please help me to throw error message on the particular tabstrip corresponds to the item. 
    Thanks in Advance,
    Shaju

    You can try this fm
                    CALL FUNCTION 'DD_POPUP_TO_CONFIRM_CANCEL'
                         EXPORTING
                              textline1    = text-902
                              textline2    = text-903
                              title        = text-901
                              start_column = 25
                              start_row    = 6
                              defaultpos   = 'C'
                         IMPORTING
                              answer       = cancel_rc.
                    CASE cancel_rc.
                      WHEN 'A'.
                      WHEN 'C'.
                        LEAVE PROGRAM.
                      WHEN OTHERS.
                    ENDCASE.
    Based upon user inputs you can handle conditions (CANCEL_RC) accordingly.

  • Acrobat Standard 9 : app.viewerVersion is throwing error.

    I'm using Acrobat 9 standard in Windows platform.
    I have a vb 6.0 application and I have to find the version of
    Acrobat installed on the user machine. I'm using the below code but it is throwing error :
    Error Message:
    Run-time error '-2147417851 (80010105)':
    Automation error
    The server threw an exception "
    How can I find the version of Acrobat available in a
    machine? The below code works with Acrobat 8.0
    installed machine but fails with Acrobat 9.0 standard
    Dim oAVDoc As Acrobat.CAcroAVDoc
    Dim oPDDoc As Acrobat.CAcroPDDoc
    Dim oJSO As Object
    Dim iOK As Boolean
    Private Sub Form_Load()
    Set oAVDoc = CreateObject("AcroExch.AVDoc")
    iOK = oAVDoc.Open ("<< required parameters>>")
    Set oPDDoc = oAVDoc.GetPDDoc
    Set oJSO = oPDDoc.GetJSObject
    MsgBox (oJSO.App.viewerVersion)

    I get much the same problem with VB6, Acrobat 9 Pro and WinXP SP3. When I single step the line:
    oJSO.Collab.showAnnotToolsWhenNoCollab = True
    in debug I go to the error handler for my Sub. Inspecting the VB Err object has Number = -2147417851 and Description = "Automation error
    The server threw an exception." I get a Microsoft crash notice about Acrobat a short while later.
    I've experimented with the JavaScript debugger in Acrobat and you can execute Collab.showAnnotToolsWhenNoCollab = True and reference the value of Collab.showAnnotToolsWhenNoCollab in the console. The problem appears only when accessing Acrobat Javascript through the Interapplication Communication API.
    If anyone can help it would be appreciated. I tried Adobe's Acrobat support and they were no help at all.

  • PL/SQL throwing errors! trying to alter dates

    the following code keeps throwing errors, I was wondering if it is due to me getting confused when to use ":" before a variable and also ":=" when setting values?
    Can anyone see what I am doing wrong?
    Here is the code, at the moment it is throwing an error on line 44
    ORA-06550: line 44, column 1:
    PLS-00103: Encountered the symbol "" when expecting one of the following:
    CODE.....
    DECLARE
         QNStart DATE;
         QNFinish DATE;
         Q1Start DATE;
         Q1Finish DATE;
         Q2Start DATE;
         Q2Finish DATE;
         Q3Start DATE;
         Q3Finish DATE;
         Q4Start DATE;
         Q4Finish DATE;
         Q5Start DATE;
         Q5Finish DATE;
         QNT NUMBER;
         Q1T NUMBER;
         Q2T NUMBER;
         Q3T NUMBER;
         Q4T NUMBER;
         QNR NUMBER;
         Q1R NUMBER;
         Q2R NUMBER;
         Q3R NUMBER;
         Q4R NUMBER;
    BEGIN
         case current_date
              when current_date between to_date('01-JAN', 'DD-Mon') AND to_date('31-MAR', 'DD-Mon') then
                        QNStart := to_date('01-JAN', 'DD-Mon');
                        QNFinish := to_date('31-MAR', 'DD-Mon');
              when current_date between to_date('01-APR', 'DD-Mon') AND to_date('30-JUN', 'DD-Mon') then
                        QNStart := to_date('01-APR', 'DD-Mon');
                        QNFinish := to_date('30-JUN', 'DD-Mon');
              when current_date between to_date('01-JUL', 'DD-Mon') AND to_date('30-SEP', 'DD-Mon') then
                        QNStart := to_date('01-JUL', 'DD-Mon');
                        QNFinish := to_date('30-SEP', 'DD-Mon');
              when current_date between to_date('01-OCT', 'DD-Mon') AND to_date('31-DEC', 'DD-Mon') then
                        QNStart := to_date('01-OCT', 'DD-Mon');
                        QNFinish := to_date('31-DEC', 'DD-Mon');
         End Case
    :Q1Start := ADD_MONTHS(:QNStart,-3);
    :Q1Finish := ADD_MONTHS(:QNFinish,-3);
    :Q2Start := ADD_MONTHS(:QNStart,-6);
    :Q2Finish := ADD_MONTHS(:QNFinish,-6);
    :Q3Start := ADD_MONTHS(:QNStart,-3);
    :Q3Finish := ADD_MONTHS(:QNFinish,-3);
    :Q4Start := ADD_MONTHS(:QNStart,-4);
    :Q4Finish := ADD_MONTHS(:QNFinish,-4);
    :Q5Start := ADD_MONTHS(:QNStart,-5);
    :Q5Finish := ADD_MONTHS(:QNFinish,-5);
    select COUNT(COUNT(*)) INTO :Q1T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q1Start AND :Q1Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q2Start AND :Q2Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q3Start AND :Q3Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4T from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :Q4Start AND :Q4Finish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNT from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
    WHERE f.DATE_ENTERED BETWEEN :QNStart AND :QNFinish
    AND a.ACTION_SCORE = 'Y'
    AND f.INPUT_TYPE = a.ACTION_NAME
    GROUP BY f.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q1R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q2R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q2Start AND Q2Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q3R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q3Start AND Q3Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :Q4R from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN Q4Start AND Q4Finish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q5Start AND Q5Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    select COUNT(COUNT(*)) INTO :QNR from FF_ACTIONS a
    WHERE a.DATE_ENTERED BETWEEN QNStart AND QNFinish
    AND a.COMPANY_NAME IN
         (select f.COMPANY_NAME from FF_ACTIONS f, FF_ACTION_TYPE_LOV a
         WHERE f.DATE_ENTERED BETWEEN Q1Start AND Q1Finish
         AND a.ACTION_SCORE = 'Y'
         AND f.INPUT_TYPE = a.ACTION_NAME
         GROUP BY f.COMPANY_NAME)
    GROUP BY a.COMPANY_NAME;
    EXECUTE
    Cheers
    Simon

    Dave had given you already some good advice.
    Your code is not only too complicated, but you have also probably a bug in it. You have for instance a QNstart as to_date('01.01, 'dd.mm') and a corresponding QNfinish as to_date('31.03', 'dd.mm'). As this means, it is the time portion at 00:01, you are missing the complete last day of this interval. So you better do:
    declare
      l_QNstart      date;
      l_Q1start      date;
      l_Q1finish     date;
      l_q1t          number
    begin
      l_QNstart := trunc(sysdate, 'Q');
      l_Q1start := add_months(l_QNstart, -3);
      l_Q1finish := l_QNstart;
      -- your condition is now
      select count(count(*))
      into   l_q1t
      from   ff_actions f, ff_action_type_lov a
      where  f.date_entered >= l_Q1start and f.date_entered < l_Q1finish
      and    a.action_score = 'y'
      and    f.input_type = a.action_name
      group by f.company_name;
    end;
    /Message was edited by:
    Leo Mannhart
    btw: what is the difference between Q1Start / Q3 Start and Q1Finish / Q3Finish resp.?

  • Report throwing error

    Hi BI Experts,
    I have an issue in the report output. The query is giving the data but the report is not showing the same.
    when nonexisting values are given, report is throwing ERROR instead of giving blank page. Client is expecting blank page or dummy page with tables or headings etc but not the error message.
    Please suggest a solution for this.
    Let me know if anybody needs any other information regarding this.
    Thanks in advance.

    you need to use no data found logic in order to get blank or any message saying no data found for that selected value.
    check this link
    https://blogs.oracle.com/xmlpublisher/entry/no_data_found
    or
    send me your sample xml having data and no data and template i can try at my side. email: [email protected]
    assign me some points if helpful

Maybe you are looking for

  • "Quicktime Streaming failed to load because of an unknown error"

    iTunes and Quicktime will not load, install, or uninstall because of at some point the popup message "Quicktime Streaming failed to load because of an unknown error" appears. Succesive reboots and removal of SpyBot (which may have denied access to Qu

  • Setting  nls_date_format....in oracle 9i v 9.2

    Setting nls_date_formate is working in session level fine. But i need to set the format in an application level.For that i tried the following,but date format is not changed. i created the Pfile from SPfile,made an entry nls_date_format='DD/MM/YYYY'.

  • Open Canon 6D, CR2 files in Elements 10

    I recently upgraded my camera to the Canon 6D. Took loads of great pictures only to find that when I tried to open them in Elements 10 the programme didn't support them!!! I've search and trolled through every forum I can find lookong for a solution,

  • I have installed Xcel for Mac and now it opens at startup and all its files open up. How to I stop this?

    To process forms on ICD10 for my wife I had to buy Xcel for Mac. Now on startup it opens and opens all the files. I really want this to stop. How?

  • HPLIP auto install: does it work?

    I just bought an HP printer. Then I was installing HPLIP during 2.5 days; more than expected. (Needless to say I was cursing HP the last day). Now I am happy to succeed, but I also feel that it was a good luck. I think this story should be shared. I