How to get the errors thrown during SwingWorkes-doInBackground-method

Hi,
I got an annoying problem.
I use a SwingWorker to do some operations in background...
Now it could be, that some of those operations throw an exception...
but the SwingWorker do not throw those...
The only exception i get is a final Exception cause of an object who
wants to display the result of the background activity...
In detail : a method done in background throws an index out of bounds exception
but how i can get this error?
I try to surround the swing worker object with a try and catch for general exceptions but
this don't work.
regards
Olek

There are two things you can do. First, you might wrap the code in doInBackground() in try/catch. I'd discourage this since it will make your code more complicated. Secondly, if an exception occurs, the SwingWorker will switch its state to 'done'. If you invoke the get() method (even if you're returning null in doInBackground()), an ExecutionException will be risen. Using Exception#getCause(), you will get the original exception that occured, in your case the ArrayIndexOutOfBoundsException.

Similar Messages

  • How to get the Error message from hr_contact_rel_api.create_contact

    Hello All,
    I am using this API for creating a contact for an employee in R12.
    But, some times i am not able to create the contact successfully, and Unable to figure out proper reason for record erroring out.
    I dont find any out msg data variables for this API in order to check it for the Error.
    So, can any body help me how to get the ERROR Message for such APIs.
    Thanks inAdvance,
    Amarnadh Js

    user12243334 wrote:
    solved the issue on myselfIt would be nice if you could share the solution with us.
    Thanks,
    Hussein

  • How to rectify the errors  occured during session method

    how to rectify the errors  occured during session method

    HI
      When the execution of session is completed: we can check the errors via the log.
      Rectification of errors depends on the kind of errors. It is not specific that we have to approach the same way to handle all kinds of errors.
      Errors can be due to data format, inconsistency due to the configuration, unavailability of master data...
    Kind Regards
    Eswar

  • How to get the storage details during 5 min interval

    Hi,
    I used below java code to collect the storage details. But i didn't get any output. Without filter condition it display all the records available in table. How to get the
    last five min data. Based on this how to change the tablequery.? I used partition key too. that also didnt work.
    1) How to use the tick count in this example.
    CloudStorageAccount httpAcc = CloudStorageAccount.parse(storageConnectionString);
    CloudTableClient tableClient = httpAcc.createCloudTableClient();
    CloudTable table = tableClient.getTableReference("$MetricsHourPrimaryTransactionsTable");
    Date date = new Date();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 
    TimeZone utc = TimeZone.getTimeZone("UTC");
    sdf.setTimeZone(utc);
    String upperBound = TableQuery.generateFilterCondition("TIMESTAMP",QueryComparisons.LESS_THAN,sdf.parse("2015-02-04")); // // sdf.format(cal.getTime())
    System.out.println("call lowertime ->"+upperBound);
    String lowerBound = TableQuery.generateFilterCondition("TIMESTAMP",QueryComparisons.GREATER_THAN,sdf.parse("2015-02-01"));
    System.out.println("call uppertime ->"+lowerBound);
    String filter = TableQuery.combineFilters(upperBound, Operators.AND, lowerBound);
    //String startTick = TableQuery.generateFilterCondition("TIMESTAMP",QueryComparisons.GREATER_THAN,sdf.parse("2015-09-03"));
    //System.out.println("the startTick==="+startTick);
    //String tick = TableQuery.generateFilterCondition("PartitionKey",QueryComparisons.GREATER_THAN,startTick);
    TableQuery<DynamicTableEntity> query = TableQuery.from(DynamicTableEntity.class).where(filter).select(new String[] {"Availability","TotalRequests","PercentSuccess"});
    for (DynamicTableEntity ent : table.execute(query))
    EntityProperty countProp = ent.getProperties().get("Availability");
    if (countProp == null) 
    throw new IllegalArgumentException("Invalid entity, Count property not found!");
    System.out.println(countProp.getValueAsString());
    EntityProperty countProp1 = ent.getProperties().get("TotalRequests");
    System.out.println(countProp1.getValueAsString());
    EntityProperty countProp2 = ent.getProperties().get("PercentSuccess");
    System.out.println(countProp2.getValueAsString());
    Regards,
    Rathidevi
    rathidevi

    checkout this document for secure web application
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf6167e-7fff.html    

  • How to get the error in TOAD?

    Hello All,
    I am using the oralce 9i and toad 9.0.1 version. When I am compileing the procedure, functions in the toad it is giving the result as "Warning: compiled but with compilation errors". But is there any way to get the error message like the sql*Plus.
    Thanks,
    SUN

    I don't know TOAD but think you can query the USER_ERRORS table:
    SQL> create  procedure a
      2  /
    Warning: Procedure created with compilation errors.
    SQL> select * from user_errors;
    NAME                           TYPE           SEQUENCE       LINE   POSITION
    TEXT
    ATTRIBUTE MESSAGE_NUMBER
    A                              PROCEDURE             1          1         11
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
       ( ; is with authid as cluster compress order using compiled
       wrapped external deterministic parallel_enable pipelined
    The symbol ";" was substituted for "end-of-file" to continue.
    ERROR                103Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/23/la-forza-del-foglio-di-calcolo-in-una-query-la-clausola-model/]

  • How to get the old selection in ListSelectionListener valueChanged() method

    Hi,
    Is anyone know how to get the old selection index/value in the ListSelectionListener valueChanged() method? The list.selectedValue() always return the same value which is the new selection. The ListSelectionEvent.getFirstIndex() and getLastIndex are always firstIndex <= lastIndex so that you cant' tell which one is the old selection.
    Please help and thanks!

    Just test the two indexes (first and last): if the corresponding row is selected, then the other is unselected. That gives you the old (unselected) and new (selected) item.
    Of course, I have supposed that you were using a SINGLE_SELECTION model...
    Hope this helped,
    Regards.

  • How to get the Class name of an API method?

    Like most of us, it's difficult to know where every method within a Java class is. Also, many of the same methods are scattered throughout Java Classes. I know of two methods that retreive this... getClass().getName(). But, you must have an object to use these. Is there a way to find out what Class contains a method or Class variable thru an Applet or Java Application?? Obviously, I can look at API Docs; but this takes time.
    Tks Randy

    RajEndiran wrote:
    Can anyone please let me know how we can get the class name of a page or region in oracle apex?What do you mean with class name? The name of the template (e.g. the css style class name)?
    I would also like to know how we get the DOM object ID for particular item.Use firebug or inspect the source code of the rendered page to see the object IDs. Other then then, the typical ID of page items is the name of the item. For regions you can set your own ID.

  • How to display the error message during the web dynpro application runtime

    hi,
        I'm a java developer,During i 'deploy and run ' a web dynpro application on server-1,if the application have some runtime errors. there are displayed many infomation about the runtime error,such as exception track,etc.
        But when i do the same on server-2,there just show something like:
                500   Internal Server Error
                                    SAP NetWeaver Application Server 7.00/Java AS 7.00
                Failed to process request. Please contact your system administrator.
    but the server-1 will stop the j2ee engine. 
    how can do i make server-2 show detail error message as server-1. when i debug web dynpro application need these infomation.
    Appreciate your inputs...
    (Note:server-1 and server-2 have same software version)
    Edited by: BingLin Zhong on Feb 18, 2008 2:13 AM

    The Sap-Notes 962319:
    1. Check in the Visual Administrator, "Licensing Adapter" -> "General" -> "SystemType" !
    If it is set to "DEVELOPMENT_MODE", verbose error messages are shown.
    If it is undefined, proceed with the next step.
    If it is set to something else, only exception IDs are shown. In this case the only chance is to search for this exception ID in the default traces.
    2. If the system type is undefined, then in the Config Tool "Configurations" -> "webdynpro" -> "sap.com" -> "tcwddispwda" -> "Propertysheet default" -> "DevelopmentMode" is evaluated. If it is "true", verbose error messages are shown.
    3. If verbose error messages are required but still the short version is shown, you probably face an error message that is not raised by Web Dynpro but by other components of the NetWeaver. In the Visual Administrator set "Properties" -> "HTTP Provider" -> "DetailedErrorResponse" to "true".
    4. In addition to the error page shown in the browser or client, important messages - including error messages and stack traces - are written to the log and trace files, e.g. to the default traces usr\sap\<SID>\<instance>\j2ee\cluster\server<number>\log\defaulttrace.trc.<number>.
    a) In some cases, when an exception ID is included in the error message, the detailed error message can easily be retrieved in the log file.
    b) When no exception ID is given, you have to search for the detailed error message in the log specifying time stamp and/or user ID.
    Always consider restarting the system after making changes on the settings.
    It is not recommended to switch the "SystemType" to an inappropriate value just for viewing verbose error messages. The system type potentially affects framework, applications and licensing in an perhaps unintended way.
    In the past there was no distinction between different system types regarding error messages. For security reasons this distiction has been introduced. It is not intended to show stack traces in non-development systems in the future. SAP does not provide workarounds or patches to enable such a behaviour again.

  • How to populate the Error stack during error records in field level routine

    hi,
    I am capturing the error records in Field level routine in transformation. now i want these records to reflect in error stack.
    i am using 'Append monitor-rec to MONITOR' at the moment but i cant see any records in error stack.
    but when i am using the same statement in start routine i am getting records in error stack.
    can anyone please help as to how can i populate error stack through field level routine?

    Hi,
    Try to do it in the end routine instead of the field routine.
    It should work.
    Regards,
    Joe

  • How to get the error raised in LoginModule into the error.jsp page?

    Hi,
    I would like to get the Exception message raised in a LoginModule and display it "friendly" into my error.jsp page.
    How to do that?
    Thanks.
    Stephane

    I have posted this question a few times. These forums are useless for all but the simplest of problems.
    Here is what you can do, of course it is unsupported, and may or may not break with a future release - all I can say is that it works in 10.1.3
    In your loginmodule login() method, add the JAZNContextCallback to your callbacks array, then after the callbacks are handled you can access the request in the following way:
    HttpServletRequest request = (HttpServletRequest) ((JAZNContextCallback)callbacks[2]).getContextObject(JAZNContextCallback.HTTP_SERVLET_REQUEST, null);
    You can then add the error message to the request and your jsp or whatever will be able to access it.
    By the way, JAZNContextCallback is contained in the jazncore.jar file.

  • How to get the error in idoc removed?

    Hi all,
    I am getting this error in inbound ORDERS "VKORG, VTWEG, SPART cannot be determined for customer PEPSICO , vendor". The help on this error says that this is automatically filled? How could the IDoc sender have given these values.. I think a user exit at my end (receiving end) can supply these values not my customer who sent this IDoc. My question is what is the exit name and is there any other way?
    Thanks a lot,
    Charles.

    Hi,
    Please try this user exits EXIT_SAPLVEDA_007 for FM IDOC_INPUT_ORDERS.
    Regards,
    Ferry Lianto

  • URGENT:how to get the error table populated in ODI

    Hello all,
    I am working on an interface of ODI where mapping is from a XML file to the database tables. I want, when there is any bad data (having length size greater than the target table's column length or data type mismatch) the bad data should get rejected or separated.
    I am using LKM, CKM, and IKM knowledge modules, but the erroneous record is not getting populated in even in the error table.
    when I try to insert lets say 4 records and 2nd record is erroneous then it is only inserting the 1st record. i want that the erroneous record should get inserted in the error table.
    Please suggest, if anybody is having any related information to get this done. That would be really helpful.
    Thanks in advance!

    Hello Phil,
    Thanks for your update.
    The option which you have mentioned having cloumn as char 4000, I can not do that as my target tables are seeded tables.
    I have also tried to get the data atleast in C$ tables having their length as varchar 4000. but it is not allowing to insert in C$ tables also.
    In my case I am getting data for ex: date_of_birth in VARCHAR datatype from the source XML and I have converted it ot DATE while mapping it to target column having DATE as the datatype.
    what if the DATE in xml source is invalid? its giving me the error while execution "Invalid datetime format". how would I identify that this error is for a particular record. If I can get this erroneous record atleast in C$ table I can find a work around for this correction then.
    I hope you have solution for this problem :)
    Thanks.

  • How to get the error code for http request

    I have to implement the if..elso loop depending on the error code return as below.
    String host="127.0.0.2"
    if the this servers is not found or itis down it should return error code, based on that I have to change the host value to some other server like "127.0.0.4" , Can you let me know how it can be implemented? Please help me.

    Here is my requirement...
    say.. if client hit " http:\\ 172.0.0.3: 1000/index.jsp" and if the server 172.0.0.3 is not available i will set the server host to some other and request will redirect accoringly like " http:\\ 172.0.0.4: 1000/index.jsp"

  • How to get the error message which causes Synonym Invalid?

    Hi,
    I created a synonym in USER_B for a table in USER_A.
    I have given all priveleges to USER_B from USER_A.
    I created a package. In that I am using this synonym. Its working fine.
    Today I have seen that.. the synonym is showing as invalid.
    Even I recompiled the synonym. But its still showing as Invalid in PL/SQL developer.
    Here I would like to see the error message which cause the synonym invalid.
    How can I see the error message.?
    Thank you,
    Regards,
    Gowtham Sen.

    Makes perfect sense. Oracle automatically attempts to revalidate objects when you try to use them.
    SQL> create table t (
      2  col1 NUMBER);
    SQL> create or replace procedure p is
      2   x POSITIVE;
      3  begin
      4    SELECT COUNT(*)
      5    INTO x
      6    FROM t;
      7  end p;
      8  /
    Procedure created.
    SQL> drop table t purge;
    Table dropped.
    SQL> select status
      2  from user_objects
      3  where object_name = 'P';
    STATUS
    INVALID
    SQL> create table t (
      2  col1 NUMBER);
    Table created.
    SQL> select status
      2  from user_objects
      3  where object_name = 'P';
    STATUS
    INVALID
    SQL> exec p
    BEGIN p; END;
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "UWCLASS.P", line 4
    ORA-06512: at line 1
    SQL> select status
      2  from user_objects
      3  where object_name = 'P';
    STATUS
    VALID
    SQL> Even when the procedure has a problem ... the revalidation takes place.

  • How to get the current class name in static method?

    Hi,
    I'd like to get the current class name in a static method. This class is intended to be extended. So I would expect that the subclass need not to override this method and at the runtime, the method can get the subclass name.
    getClass() doesn't work, because it is not a static method.
    I would suggest Java to make getClass() static. It makes sense.
    But in the mean time, does anybody give an idea to work around it?
    Thank you,
    Bill

    Why not create an instance in a static method and use getClass() of the instance?
    public class Test {
       public static Class getClassName() {
          return new Test().getClass();

Maybe you are looking for

  • TV@nywhere A/D

    After recently reformatting hard drive, My TV@nywhere A/D card was not working Downloaded latest driver System says running normally. But DVB interface says wrong os is there a vista patch or newer version of DVB or am i screwed. Please help me as i

  • Afp connecting

    Hi .. I have a "Afp can't connect" message at startup ... at sometime, I guess, I've asked to connect to my PBook from my desktop and now don't seem to be able to get rid of this message ... anyone any ideas please ? Many thanks Roger

  • Dynamic Train Creation

    Hi, I have urgent requirement where i need to create the dynamic train based on the selected values. The POF for the requirement is as below: There is a shuttle component with 5 services. When the user selects 2 services and click on a command button

  • 2014 New Black Mac Pro Crashing

    This is totally frustrating. I have a new Mac Pro 2014, preconfigured in Apple Store with 64 GB RAM, 1 TB Flash, AMD FirePro D700 6144 MB graphics with 2 monitors (2560x1440) connected by thunderbolt. After I installed all my applications, for exampl

  • Slow running I-Pod

    My 30GB ipod video takes a really long time to load songs and move between screens. Any suggestions?