Reporting errors while filling a JTable

Hello all, this is my first post here.
When i implement a class derived from AbstractTableModel to show some data in a JTable, sometimes, specially when this data is coming from databases, i need to be able to report any errors that ocur while geting that data via a message dialog, for example, specifically inside the overriden getValueAt() function, eg.
public Object getValueAt(int rowIndex, int columnIndex) {
try{
..... read the information from the database
}catch(SQLException ex){
JOptionPane.showMessageDialog(null, "Error!"........ show the error
this actually works, the message dialog is shown if an error ocurs, however there are 2 problems:
1.- after the user closes the message dialog, the JTable is not painted properly.
2.- i get all these exceptions:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.SwingUtilities.computeIntersection(SwingUtilities.java:417)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:430)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
If i just remove the line that shows the message dialog, then everything works ok. But i NEED a way to inform the user that something went wrong, how do i do this?
Thanks!

Hey numbnuts,
People keep reporting this error and you keep closing it w/o proper attention:
In SwingUtilities, sometimes "dest" becomes null. Don't tell why - sometimes its because of some library maybe you didnt write. But if you put in a "*if (dest == null) o something ...*" in there - it would fix it. Even a freshman comp sci programmer knows that.
And you wonder why nobody wants to learn Java anymore...
    public static Rectangle computeIntersection(int x,int y,int width,int height,Rectangle dest) {
        int x1 = (x > dest.x) ? x : dest.x;
        int x2 = ((x+width) < (dest.x + dest.width)) ? (x+width) : (dest.x + dest.width);
        int y1 = (y > dest.y) ? y : dest.y;
        int y2 = ((y + height) < (dest.y + dest.height) ? (y+height) : (dest.y + dest.height));
        dest.x = x1;
        dest.y = y1;
        dest.width = x2 - x1;
        dest.height = y2 - y1;
     // If rectangles don't intersect, return zero'd intersection.
     if (dest.width < 0 || dest.height < 0) {
         dest.x = dest.y = dest.width = dest.height = 0;
        return dest;
    }End Communication

Similar Messages

  • Error while filling the set up table for 2LIS_11_VAITM

    Dear Experts,
    i am facing an error while filling the set up table for 2LIS_11_VAITM in the source system.
    The error was "Company code for sales org 9000 does not exist (document 1326)".
    when i checked the document in the Header table VBAK,company code was blank for the document .
    Company code was there in the selections for the setup table.
    The error means that company code should be maintained for the sales document as per my knolwedge.i think document was not created properly in the source system.
    Could you please help me out to over come the problem.
    Regards,
    Sunil...

    in the selection screen for filling the setup table, there is a parameter No. tolerated faulty documents
    you'll have to enter at least '1' here in your case
    it might be that there are other erronuous records, in that case it will crash again, and you'll have to increase the value for this parameter
    (under "normal" circumstances, all documents in the source should be correct... but apparently it's possible to circumvent this)

  • Error while filling setup tables for 2lis_13_vahdr

    Dear friends,
    I am getting below Error while filling setup tables for 2lis_13_vahdr.
    More faulty documents found than the tolerated 0000000000
    Message no. M2222
    Can any one guide me how to address this issue.
    Thanks and Regards
    Nithya

    Hello Nithya,
    It seems the No of tolerated faulty documents that you have given is 0. So when you initialize try to these.
    While executing OLI*BW including a value in the maintain  "No. tolerated faulty documents" - 5000 or 10000.
    Then execute the program in background.
    Once the job is completed check the background job log if any errors.
    Thanks
    Chandran

  • Error while filling setup table for Sales

    Dear Team,
    We are getting following error while filling setup table for Sales (application component 11) and for Billing (application component 13),
    application component 11
    Error determining rate: foreign curr.  local curr. INR date 08.10.2007 (doc. 673624) (JOB - RMCVNEUA)
    Message No M2810
    application component 13
    Billing document 480050000: error determining stats. currency rate (no updating)
    More faulty documents found than the tolerated 0000000000 (JOB - RMCVNEUF)
    I have seen lot of threads based on this but all r showing diffrenent currency to INR but for the above mentioned documents currency is in INR only so why it is showing the error I am not able to determine.
    If anybody faced this problem kindly reply to this.
    Best Regards,
    SG

    Hi There,
    Might be your using a wrong document number.
    I mean if your using the 11 you should use only Sales document number and for 13 you should only use billing document number.
    If you use vice versa that error will throw.
    Regards,
    MQ

  • Error while filling setup table for 2LIS_03_BF

    Hello,
    I am getting an error while filling set-up table for 2LIS_03_BF.
    Following is the screenshot of the same.
    If I check in ST22, I get following,
    I could fill the setup table for other datasource 2LIS_03_BX without any problem.
    Please suggest.

    Hi,
    Can you try filling the setup table data for that range in background?
    Sometimes because of huge data that you are trying to fill it might through you a dump. So please execute it in background and see if it works?.
    But still can't really say what that dump tells from what you attached.
    Thanks,
    Sathya

  • Timeout error while filling setup tables

    HI all
    I am getting timeout error while filling setup tables(OLI1BW).I clicked on execute button on hte screen.Its not scheduled as a background job.
    Going through threads i have come to know that to solve this issue
    1.BASIS team have to increase backgroung processses or memory
    2.run it as a background job.
    When I went to Program->Executein the backgroundPrint background parameters window has popped up.
    What to do in there?I am afraid if I include parameters like printer name....what is it and how long is it going to print?
    Please let me know.
    Thanks,
    Harika.

    thanks for the reply.
    it was set to LOCL only.
    But i have 3 options in the dropdown  windowsprinter :Send to onenote2007
                                      Microsoft XPS document writer
                                      OUrprinteraddress
    WHich one to choose here?
    Edited by: harikag on Aug 10, 2011 8:47 AM

  • Fatal error while filling connection pool

    I was not getting a connection to an Oracle database and I was getting the following error in cms.log: "FATAL  Connector - Unable to create connection pool for T_Orbis_Oracle: Fatal error while filling connection pool for jdbc:oracle:thin:@MESDB:1521:ASPENB21" where T_Orbis_Oracle is the xMII link name and the database ASPENB21 is on server MESDB. I changed the database username in the link to SYSTEM and I then got a connection and a Created Connection pool message in the log. I then changed back to the username which originally was giving the error and it now also gave me a successful connection. I am now worried that there is an issue in the background which is gradually building up and will begin to fail again as previously. Can anyone explain what is causing this problem and suggest how I can correct it? Thanks, John.

    John,
    Check you have installed the JDBC driver ojdbc14.jar (works for both 9 and 10).
    Also check the server package:
    MII 11.x--->ServerPackage com.lighthammer.Illuminator.connectors.IDBC
    MII 12.x--->com.sap.xmii.Illuminator.connectors.IDBC
    Carefull when you set up the string because some oracle databases have servicenames instead of SID, and the url was different if you use them instead of the SID.
    For services names the url is jdbc:oracle:thin@host:port:SID
    Also check your Network firewall between MII and DB and ports too.
    Oracle9i installs with a number of default accounts.You must unlock all other accounts before using them. Oracle recommends changing all user passwords immediately after installation.
    -Suresh
    Edited by: Suresh Hiremath on Jul 29, 2009 8:20 AM

  • Crystal Report: Error while Export to Excel

    We are using combination of Crystal Report 10 With
    J2EE, Below source code is working fine While
    exporting to PDF, MSWord, RTF format.
    if(selectedFormat.equals("MSWORD"))
    exportOptions.setExportFormatType(ReportExportFormat.MSWord);
    if(iPageFrom>0 && iPageTo>0)
    RTFWordExportFormatOptions RTFExpOpts=new
    RTFWordExportFormatOptions();
    RTFExpOpts.setStartPageNumber(iPageFrom);
    RTFExpOpts.setEndPageNumber(iPageTo);
    exportOptions.setFormatOptions(RTFExpOpts);
    But am getting following error while exporting report
    to Excel
    com.crystaldecisions.report.web.viewer.ReportExportControl
    Invalid post back event : {0}
    We would like to know, Is SDK feasible for exporting
    to excel or not ?
    If yes! then Please suggest us for same.
    Thanks In advance :)

    I will make sure that I am on the latest patch ie SP4
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    You can find the rumtimes here:
    MSI:
    https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
    MSM:
    https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
    ClickOnce
    https://smpdl.sap-ag.de/~sapidp/012002523100008782442011E/cr2008sp4_clickonce.zip
    Recompile the app and then deploy.
    What is the .NET Framework used by the application?
    Method of deployment?
    OS where app is deployed, x86 or x64?
    Are you able to export the report from designer ie CR2008 Standalone?
    - Saurabh

  • Error while filling IT0031 "Employees could not be linked"

    Hi Experts!
    I am getting the error message "Employees could not be linked" while filling the infotype 0031 (Reference personnal number).
    I debugged through the standard program MP003100 and found that this error is related to CP relation (Central Person).
    I am little poor in HR functionality. Could any one help me in understanding this Central Person Number and how it is related to Reference Personal Number in IT0031?
    Also how to get rid of this error message " Employees could not be linked"
    Many Thanks
    Vamsi

    gOT THRU THIS
    http://help.sap.com/erp2005_ehp_01/helpdata/en/7e/5e003d4a1611d1894c0000e829fbbd/frameset.htm
    This will help you
    REWARD POINTS

  • Error while filling the aggregates

    I have re-created the cube as it got deleted by accident.
    When I run the Process Chain to load the cube, it is loading the cube but it is failing while "filling and activating"(by ABAP program) process type.
    Here are the errors.
    If somebody can make sense out of this and let me know what needs to be done, it will be very helpful.
    Job started                                                                  
    Step 001 started (program RSPROCESS, variant &0000000008939, user ID
    BWRFCADM)
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    INSERT INTO "/BIC/D100114P" ( "DIMID" ,                                      
    "SID_0CHNGID" , "SID_0RECORDTP" , "SID_0REQUID" )                            
    VALUES ( 0 , 0 , 0 , 0 )                                                     
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    INSERT INTO "/BIC/D100114T" ( "DIMID" ,                                      
    "SID_0CALDAY" , "SID_0FISCPER" , "SID_0FISCVARNT"                            
    , "SID_0FISCYEAR" ) VALUES ( 0 , 0 , 0 , 0 , 0 )                             
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    INSERT INTO "/BIC/D1001147" ( "DIMID" ,                                      
    "SID_ZCHECACTV" , "SID_0EMPLSTATUS" ,                                        
    "SID_0GENDER" , "SID_0NATION" , "S001_ZCHEDSTAT"                             
    , "SID_ZCHINFDEL" , "SID_ZCHJCAT" ) VALUES ( 0 ,                             
    0 , 0 , 0 , 0 , 0 , 0 , 0 )                                                  
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    INSERT INTO "/BIC/D1001148" ( "DIMID" ,                                      
    "S001_0SRVCLEN" , "S001_0AGE" ) VALUES ( 0 , 0 ,                             
    0 )                                                                          
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    DROP INDEX "/BIC/F100114~0"                                                  
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
    SQL-ERROR: 1.418 ORA-01418: specified index does not exist               
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    DROP INDEX "/BIC/E100114~0"                                                  
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
        SQL-ERROR: 1.418 ORA-01418: specified index does not exist               
    SQL: 27.02.2008 11:51:05 BWRFCADM                                            
    DROP INDEX "/BIC/E100114~P"                                                  
    SQL-END: 27.02.2008 11:51:05 00:00:00                                        
        SQL-ERROR: 1.418 ORA-01418: specified index does not exist               
    SQL: 27.02.2008 11:51:06 BWRFCADM                                            
    CREATE VIEW "/BIC/V100114F" ( "KEY_100114P",                                 
    "KEY_100114T", "KEY_1001145", "KEY_1001147",                                 
    "KEY_1001148", "AGE_VC", "ANSAL_VC", "HDCNT_VC",                             
    "HDFTE_VC", "SRVCLEN_VC", "/BIC/ZKHAUTL",                                    
    "/BIC/ZKHHCEM", "FACTCOUNT" ) AS ( SELECT                                    
    "KEY_100114P", "KEY_100114T", "KEY_1001145",                                 
    "KEY_1001147", "KEY_1001148", "AGE_VC",                                      
    "ANSAL_VC", "HDCNT_VC", "HDFTE_VC", "SRVCLEN_VC",                            
    "/BIC/ZKHAUTL", "/BIC/ZKHHCEM", "FACTCOUNT" FROM                             
    "/BIC/F100114" ) UNION ALL ( SELECT                                          
    "KEY_100114P", "KEY_100114T", "KEY_1001145",                                 
    "KEY_1001147", "KEY_1001148", "AGE_VC",                                      
    "ANSAL_VC", "HDCNT_VC", "HDFTE_VC", "SRVCLEN_VC",                            
    "/BIC/ZKHAUTL", "/BIC/ZKHHCEM", "FACTCOUNT" FROM                             
    "/BIC/E100114" )                                                             
    SQL-END: 27.02.2008 11:51:06 00:00:00                                        
    SQL: 27.02.2008 11:51:12 BWRFCADM                                            
    INSERT INTO "/BIC/D100115P" ( "DIMID" ,                                      
    "SID_0CHNGID" , "SID_0RECORDTP" , "SID_0REQUID" )                            
    Thanks.
    With regards,
    Venkatesh Iyengar

    Hi Venkatesh,
    You can go to T.code: RSDDV and give your infocube name and click for the aggregates, this will take you to the screen for the maintanenece of the aggregates.
    In this screen select one aggregate and first deactivate it by clicking on deactivate button.
    Then again activate and fill it by clicking the activate button.
    This will create a job with name BI_SAGGR* if this jobs gets completed its fine, else check for the job log if the job gets cancelled.
    Hope this helps!!!
    Reward points if helpful !!!
    Cheers,
    Neelesh Jain.

  • Error while filling set up table for Inventory

    Hi,
       While filling up setup table for Inventory, 2lis_03_bf, i get an error, Plant F041 doesnot exist. I am trying to fillup the table without any selections. Can anyone please suggest me a solution.
    Thanks,
    Praveen

    Please check the following link:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Hope it helps you.

  • Error while filling set up table SD-Billing Documents - Perform Setup

    Hello friends,
    while filling set up table of SD-Billing Documents - Perform Setup
    i am getting error 'TSV_TNEW_PAGE_ALLOC_FAILED' . i am executing this job in background process . Please suggest me a solution .
    Regards
    Nilesh Vakil

    Hi,
    Try some other LO extractor in RSA3 to check if you get the same error.
    If you dont then it may not be system memory issue, check if thr is some user exit written for the extractor.The problem could be in the user exit whr the internal table may get overflown and lead to the page overfloen dump.
    If this is also not the case try reducing the packet size.
    Let me know if the issue is resolved.
    Regards,
    Ashwin

  • Dump error while filling the Setup table

    Hi All,
    I am trying to fill the setup table.While filling the stup table for 2lis_03_BF datasource, i got the Dump error after some time. I have checked the data in Setup table and found 9000 records.
    Shall i proceed further by pulling the data from R/3 to BW.I have checked the data in RSA3 and got some data.
    Shall i schedule the data from BW side.
    Pls help on this issue.
    Thanks,
    Siva.

    Thanks Reddy and JS.
    I have checked the TCODE SM37 and found no jobs are available. I have checked the TCODE : NPRT and found some logs.In this, it is not showing any errors.
    I have checked in SM21 and found some errors.
    Time_______________Text
    17:08:10____________Transaction Canceled M2 630 ( )
    17:23:47____________Run-time error "TIME_OUT" occurred
    17:23:47____________> Short dump "090302 172347 sand1_W2 2_00 " generated
    17:30:08____________Status: 80% of IL00.DAT is in use
    17:30:17____________Status: 90% of IL00.DAT is in use
    17:30:18____________Overflow of Paging File (032768 Blocks)
    17:30:18____________Run-time error "MEMORY_NO_MORE_PAGING" occurred
    17:30:19____________> Short dump "090302 173018 sand1_W2 2_00 " generated
    Shall i execute filling the setup table again. Do i need to give termination time More ( 2 Hrs difference)
    Any issue on refilling the setup table again.
    Pls suggest.
    Thanks,
    Siva.

  • Short dump error while filling setup tables for 2LIS_06_INV

    Hi All,
    I am trying to fill the setup table.While filling the stup table for 2lis_06_inv datasource, i got the Dump error after some time.
    Error
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Short text
        SQL error in the database when accessing a table.
    plz can anyone help me out...

    Dear friends,
    I tried it by giving the selection on fiscal year,but again same problem.If i give 1 0r 2 document numbers in selection then extractor works fine.
    error:in detail.
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Short text
        SQL error in the database when accessing a table.
    Information on where terminated
        Termination occurred in the ABAP program "SAPLMRMBW" - in "BW_RETRIEVE_DB_CO".
        The main program was "RMCENEUR ".
        In the source code you have the termination point in line 827
        of the (Include) program "LMRMBWF01".
        The program "SAPLMRMBW" was started as a background job.
        Job Name....... "RMCENEUR"
        Job Number..... 10524100
        The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
        procedure "BW_RETRIEVE_DB_CO" "(FORM)", but it was neither handled locally nor
         declared
        in the RAISING clause of its signature.
        The procedure is in program "SAPLMRMBW "; its source code begins in line
        806 of the (Include program "LMRMBWF01 ".
      806 FORM bw_retrieve_db_co  USING    t_mcrbkey_bv    TYPE mcrbkey_t
      807                                  t_mcrbkey_nbv   TYPE mcrbkey_t
      808                                  t_ekbe_acc      TYPE t_ekbe
      809                         CHANGING t_mcrbco        TYPE mcrbco_t.
      810
      811   TYPES: BEGIN OF s_target.
      812   TYPES: table_left LIKE rbco.
      813   TYPES: table_right TYPE rbex.
      814   TYPES: END OF s_target.
      815   TYPES: t_target TYPE TABLE OF s_target.
      816
      817
      818   DATA: t_rbco_nbv  TYPE t_target,
      819         t_rbco_bv   TYPE t_target,
      820         s_rbco      TYPE s_target,
      821         s_ekbe      LIKE ekbe,
      822         s_mcrbco    TYPE mcrbco,
      823         l_index     LIKE sy-tabix.
      824
       825 * Data source: invoice item non-background
      826   IF NOT t_mcrbkey_nbv[] IS INITIAL.
    *>>>>>     SELECT * FROM  rbco AS r LEFT OUTER JOIN rbex AS i*
      828        ON   ( rmandt = imandt AND
      829               rbelnr = ibelnr AND
      830               rbuzei = ibuzei AND
      831               rcobl_nr = icobl_nr )
      832        INTO TABLE t_rbco_nbv
      833        FOR ALL ENTRIES IN t_mcrbkey_nbv
      834        WHERE r~gjahr = t_mcrbkey_nbv-gjahr AND
      835              r~belnr = t_mcrbkey_nbv-belnr.
      836   ENDIF.
      837 * Data source: invoice item background
      838   IF NOT t_mcrbkey_bv[] IS INITIAL.
      839     SELECT * FROM  rbco AS r LEFT OUTER JOIN rbex AS i
      840        ON   ( rmandt = imandt AND
      841               rbelnr = ibelnr AND
      842               rbuzei = ibuzei AND
      843               rcobl_nr = icobl_nr )
      844        INTO  TABLE t_rbco_bv
      845        FOR ALL ENTRIES IN t_mcrbkey_bv
      846        WHERE r~gjahr = t_mcrbkey_bv-gjahr AND
    Thnks in advance

  • XL Reporter Error While Executing Report

    Dear All,
    I am getting error while running xl reports:-
    A Required COM add-in program for XL Reporter has not been loaded and probhitis Microsoft excel from running.
    Thanks & Regards,
    Pankaj Sharma

    Dear Pankaj Sharma,
    You may check this thread:
    Regarding XL Reporter
    Thanks,
    Gordon

Maybe you are looking for

  • Firefox won't let me open extra tabs at all

    When I try to hit the "Divided by" sign beside the one tab that is open, it does nothing. It won't let me do it manually under the file menu either. The only way I can search multiple web pages at the same time is by opening new windows, which is not

  • There is no disk in the drive--please insert a disk into drive F & more

    Hey, I've been having a problem with my ipod shuffle (2nd gen) for the past couple of weeks. Everything is okay until I try to eject the ipod. I click the eject button and the following errors pop up: "There is no disk in the drive--please insert a d

  • My Network Preferences obstinately refuses to change the remembered password to a network, even though it's wrong!

    I am having trouble connecting to my school's wireless network. Initially I couldn't connect at all, but someone helped me by going into the Network Preferences and changing the password stored there (it was trying to use an earlier one that was used

  • My iPod wont play any song!!!

    One day, my iPod got wet it stopped working, and i had to let it dry....After it was "dry", it started working again. But, No song will play. I have tried resetting, resoreing, and updating......I am running out of options. is there a way to fix this

  • IPad2 not down loading mail with photos

    My iPad2 downloads mostly emails but it is not down loading all of them especially one which had a photo in it. How can I get it to download all emails? Thanks for you help. Vernon