Why  i always get this exception

i have one table and i use custom renderer to format the number value inside the table to 2 decimal points and when user click on a particular cell it will pop up a dialog also with a table and display detail value correspond to the value that user click, but the problem is i always get this exception anyone knows why?
java.lang.ArrayIndexOutOfBoundsException: 3 >= 3
     at java.util.Vector.elementAt(Vector.java:431)
     at javax.swing.table.DefaultTableModel.getValueAt(DefaultTableModel.java:618)
     at net.devicesworld.common.ui.SortableTableModel.getValueAt(SortableTableModel.java:56)
     at javax.swing.JTable.getValueAt(JTable.java:1771)
     at javax.swing.JTable.prepareRenderer(JTable.java:3724)
     at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:1149)
     at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1051)
     at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:974)
     at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
     at javax.swing.JComponent.paintComponent(JComponent.java:541)
     at javax.swing.JComponent.paint(JComponent.java:808)
     at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4795)
     at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
     at javax.swing.JComponent._paintImmediately(JComponent.java:4692)
     at javax.swing.JComponent.paintImmediately(JComponent.java:4495)
     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
     at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

actually i already check for the row and column index this is what i do for the getvalueat method inside the table model
public Object getValueAt(int row, int col) {
int rowIndex = row;
if (indexes != null && row < indexes.length && row >=0) {
rowIndex = indexes[row];
if(rowIndex < 0){
return null;//super.getValueAt(0, col);
}else if(rowIndex >= super.getRowCount()){
return super.getValueAt(getRowCount() - 1, col);
}else if(col >= super.getColumnCount()){
return super.getValueAt(rowIndex, super.getColumnCount()-1);
}else
return super.getValueAt(rowIndex >= getRowCount() ? getRowCount() - 1 :
rowIndex,
col >= getColumnCount() ? getColumnCount() - 1 :
col);
}

Similar Messages

  • Why do i get this exception?

    Hi,
    i have a CompanyVO class, wich also has members such AddressVO, UserVO. As you can see, i have some other value objects inside CompanyVO.
    When i do this:
    CompanyVO companyVO = new CompanyVO();
    BeanUtils.copyProperties(companyVO, customCompanyVO);CustomCompanyVO is an object that has only "direct" properties of CompanyVO, stuff like companyName, companyID, companyType (basically all of them are String).
    But when i do this.
    CompanyVO companyVO = new CompanyVO();
    BeanUtils.copyProperties(companyVO, customCompanyVO);
    BeanUtils.copyProperties(companyVO.getAddressVO(), addressVO);I get the following excetion just on the third line (note the addressVO contain the values to be transfered to AddressVO, wich a VO inside the CompanyVO, as i said).
    java.lang.IllegalArgumentException: No destination bean specified
    at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:220)
    at ltcmelo.session.RegisterCompanyBean.saveCompanyAddressInfo(RegisterCompanyBean.java:157)
    So, if i already initialize the companyVO doesn't the addressVO and the userVO memers have to be initialized too ???
    This way i'm force to do such thing.
    CompanyVO companyVO = new CompanyVO();
    BeanUtils.copyProperties(companyVO, customCompanyVO);
    AddressVO auxAddressVO = new AddressVO();
    BeanUtils.copyProperties(auxAddressVO, addressVO);
    companyVO.setAddressVO(auxAddressVO);Is there a better option????

    No, no, no....
    There's a misunderstanting here! Sorry, it's my fault!
    addressVO is already initialized and populated with data.
    BUT, the addressVO that is a member of companyVO is NOT !!!
    Using BeanUtils, i'm trying to populate what's FROM addressVO (wich contains data) TO companyVO.getAddressVO (wich has not been initializes).
    So, i thought the i could initialize companyVO.getAddressVO in the way, but as i get the exception, it seems that it's not possible.
    My question is WHY is it not possible??? It seems ok to me to copy addressVO to companyVO.getAddressVO in that way.

  • Why am I getting this exception???

    Every once in a while I get the following exception when starting my app, and I can't figure out why... Why??
    java.lang.NullPointerException
         at javax.swing.SwingUtilities.computeIntersection(SwingUtilities.java:369)
         at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:404)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    This is actually a very hard question. Swing is designed to be fast so it is not thread safe. That means if you do something to a swing component while its being painted, you get this type of exception. Notice how it does not mention your own code anywhere in the stack trace. The "Event Dispatcher Thread' is trying to paint something and you are probably changing its size, setting its visibility to false, removing it form its container, moving it, changing the data in its model, etc. Your code is doing something to the component at the exact moment its being painted, and this exception is thrown.
    There are two general strategies for dealing with this problem:
    1) When you modify swing components, use SwingUtilities.invokeLater() to make the event dispatcher thread do the work.
    2) Do your work in a synchronized block, something that looks like this (say you are removing rows from a table):
    synchronized ( table.getTreeLock() ) {
      // do work here...
    }Either of these strategies will prevent this type of error from happening. It's a tought problem, since it can happen anywhere, is usually hard to reproduce, and difficult to verify it's actually fixed.

  • Why I keep getting this exception?

    I try to introduce JSTL into my current work. I keep getting the following error
    The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this applicationAfter searching this issue on the internet, I place the standard jstl 1.1.2 in our library direction under the WEB-INF. It doesn't go away however. The container is WebSphara Community Edition with jdb 1.5.
    What is missing here?

    What version of Websphere?
    What servlet spec does it support? You can find out with this JSP snippet:
    Working with server: <%= application.getServerInfo() %><br>
    Servlet Specification: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> <br>
    JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>
    Java Version: <%= System.getProperty("java.version") %><br>You have the files
    - jstl.jar
    - standard.jar
    both in the WEB-INF/lib directory?
    Restarted the server?
    Are you sure it is JSTL1.1.2?
    Open the file standard.jar in something like winzip.
    Take a look at the manifest.mf file to check version.
    Does standard.jar contain all the necessary tld files? c.tld - c-1_0.tld, c1_0-rt.tld

  • Why I always get the error(ORA-00600)?

    Why I always get the error(ORA-00600)?
    My database Oracle 9.2.0.1.0 I installed Oracle Jdeveloper 9i on my computer.
    OS:windows2000
    My program:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con =java.sql.DriverManager.getConnection("jdbc:oracle:thin:@server:1521:db","developer","12345");
    java.sql.Statement stmt=con.createStatement();
    java.sql.ResultSet rs=stmt.executeQuery("select task_title from task");
    while (rs.next()){              
         //getInformation
         String fjbh=rs.getString("task_title");
    If I use this in a common java program(like MyParser.java). It will work well:
    D:\JavaApp> java MyParser
    but If I put the code into a JSP file . It will not work.I tried several times.
    I find that the statment:
         java.sql.ResultSet rs=stmt.executeQuery("select task_title from task");
    will throw the exception.It seemd that I can connect to the database ,
    but can not execute some sql statment.
    If I execute this sql statment:
         select sysdate from dual ;
         or
         select task_ID from task ; --task_id is a column with the type NUMBER(10)
    it will work.
    but if I execute :
         select Task_Title from task where task_id=1; --Task_Title is a column with the type VARCHAR(50)
         or
         select t.task_text.getCLOBVal() task_Text from task t where task_ID=1;
                   --task_text is a column with the type XMLTYPE, I use this column save XMLFile.
    it will not work.
    the detail error information as follow:
    java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], []

    It is a database bug (an ORA-0600 almost always is). In this case it is bug# 1725012. You can see the details from MetaLink. There are some patches (by platform) available you should see which may apply to you.

  • Why do I get this error when specifying a parameter from the URL?

    Hello,
    I am trying to "install" a parameter in a page, so that it's value can be specified in the URL and a VO updated according to this value.
    Here's is the page definition file, with an executable and a binding to a method call:
    <executables>
    <invokeAction Binds="prepareMainMenuView1" id="invokeQuery"
    Refresh="prepareModel"/>
    </executables>
    <methodAction id="prepareMainMenuView1"
    InstanceName="AppModuleDataControl.dataProvider"
    DataControl="AppModuleDataControl" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="prepareMainMenuView1"
    IsViewObjectMethod="true">
    <NamedData NDName="param" NDValue="#{param.root_menu}"
    NDType="java.lang.String"/>
    </methodAction>
    if I run the MyMenu application with:
    http://127.0.0.1:7101/MyMenu-ViewController-context-root/faces/menu?root_menu=anything
    then I get this exception:
    ADF: Adding the following JSF error message: String index out of range: -1
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    Do you know why? Where do I fail?
    I followed the isntruction here:
    http://www.jasonsdevelopercorner.com/?p=65
    So far I have not been able to read a parameter in a way, do you have any example on how can I use parameters from URL from within a single page in an unbounded task flow?
    I worked all the day on this, but with no luck.
    Thanks

    I solved the problem. The invoked method was not part of the VO, but was part of the AM.

  • Why do i get this error?

    Hi
    When i run my code i get this exception,
    java.lang.ClassCastException: java.lang.Integer
    at has33.main(has33.java:29)
    Why is it that i get this exception?
    And could some help me so that i doun't get this Exception?
    thanks
    nicky
    import java.io.*;
    import java.lang.*;
    import java.util.*;
    public class has33{
    public static void main(String[] args) {
    Hashtable ht = new Hashtable();
    //Add vector to store results
    Vector results = new Vector();
    Object value = null;
    int keys[] = {1,2,3,4,5,6,7,8,9,10};
    //System.out.println(keys);
    String values[] = {"ben", "ben", "alex", "alex", "matt","matt", "mum", "mum", "dad", "matt"};
    // First, map keys to values in a hashtable
    Hashtable hash = new Hashtable();
    // the code matches values one by one for each of the keys
    for(int i = 0; i < keys.length; i++) {
    hash.put(new Integer(keys), values[i]);
    // Then we find each value and remove it from the hashtable
    for(int j = 0; j < values.length; j++) {
    ht = (hash);
    value = (values[j]);
    Vector v = new Vector();
    String token = null;
    StringTokenizer st = null;
    if( ht.containsValue( value )) {
    Enumeration e = ht.keys();
    while (e.hasMoreElements()) {
    String tempkey = (String)e.nextElement();
    String tempvalue = (String)ht.get(tempkey);
    if (tempvalue.equals(value)) {
    v.add(tempkey);
    ht.remove(tempkey);

    No i mean to put then strings and Integers in hashtable like this
                             hash.put(new Integer(1), ben);
                             hash.put(new Integer(2), ben);
                             hash.put(new Integer(3), alex);
                             hash.put(new Integer(4), alex);
                             hash.put(new Integer(5), matt);
                             hash.put(new Integer(6), matt);
                             hash.put(new Integer(7), ben);
                             hash.put(new Integer(8), matt);
                             hash.put(new Integer(9), dad);
                                            hash.put(new Integer(10), dad);thanks
    nicky

  • Why am I getting this error?

    Hello,
    I am trying to call my Java class from a JSP page. I am getting this error:
    Generated servlet error:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\em\jsp\Test_0005fSummarySBU_0005fscreen$jsp.java:82: Wrong number of arguments in constructor.
    strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
    I don't understand why I am getting this error as I pass three paramters to the Java class, and I accept three parameters in the constructor.
    JSP:
    <!-- META TAG is necessary to ensure page recompiles--------------->
    <META Http-Equiv="Expires" Content="0">
    <META Http-Equiv="Pragma" Content="no-cache">
    <HTML>
    <!-- The two Java Classes used to build the AlphaBlox query -->
    <%@ page import="com.home.tool.reporting.*" %>
    <%@ page errorPage="run_error.jsp" %>
    <%@ page import="java.util.List,
                     java.util.Collection,
                java.net.URLDecoder" %>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    <TITLE>Economic Model - Summary SBU Report</TITLE>
    <!--Run the onload here, re-retrieve params BM and Breport, pass to onload---------->
    <BODY bgcolor=#ffffff>
    <%
                    Collection strQuery = null;
                    String strEssUser = "test";
                    String strProcessingMonth = "JUL";
                    String strProcessingYear = "2002";
                    strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
                    System.out.println(strQuery);
    %>
    </BODY>
    </HTML>Java class:
    package com.home.tool.reporting;
    import java.net.URL;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    public class ListReturn extends ReportQueryBuilder
            public void ListReturn()
            public Collection ListReturn(String userID, String pMonth, String pYear)
                throws ReportQueryBuilderException
                //declare Collection store Value-Object pairs
                Collection c = new ArrayList();
                //declare and initialize variables
                CallableStatement cs = null;
                ResultSet rs = null;
                // declare call for stored procedure to pass in three parameters
                String pass = "{Call dbo.p_rep_srSbuList(?, ?, ?)}";
                try
                    //open CallableStatement using JDBC connection to SQL database
                    cs = con.prepareCall(pass);
                    //set IN parameters
                    cs.setString(1, userID);
                    cs.setString(2, pMonth);
                    cs.setString(3, pYear);
                    //execute call and return result set
                    rs = cs.executeQuery();
                    //loop through result set storing each record as a Value-Object pair
                    while(rs.next())
                        c.add(new ListBoxValueObjects(rs.getString(1), rs.getString(2)));
                catch (SQLException sqle)
              throw new ReportQueryBuilderException(replaceToken("Problems executing query: "+sqle.getMessage(), "'", "\\'"));
                finally
                    try
                        //close the Result Set and CallableStatement
                        rs.close();
                        cs.close();
                    catch(Exception e)
                        System.out.print("\nFATAL   : " + e);
                        System.out.print("\nFATAL   : " + e);
                return c;
    }Does anyone see whay I am getting this error??
    I can't figure out the problem!

    change this:
    <%
         Collection strQuery = null;
         String strEssUser = "test";
         String strProcessingMonth = "JUL";
         String strProcessingYear = "2002";
         strQuery=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
         System.out.println(strQuery);
    %>To this:
    <%
         Collection strQuery=null;
         String strEssUser="test";
         String strProcessingMonth="JUL";
         String strProcessingYear="2002";
         lr=new ListReturn(strEssUser, strProcessingMonth, strProcessingYear);
         System.out.println(lr.getQuery())
    %>Then make a new public method in your Java called getQuery()
    public Collection getQuery();Do what you need to do to process it and return the value in getQuery. You will also probably need to make private variables in you declaration to do the processing on.

  • Why did I get this stupid emails about missing payment of my Adobe CC ???

    Hi, I have get this email from Adobe:
    what we have here payment for your account could not be loaded. So there will be no interruptions in your use of the Creative Cloud , please update your billing information shortly .
    account Management
    If you have decided not to renew your subscription , no further action is required on your part. You have until the end of the current billing period unlimited access to your Creative Cloud membership. Then your paid membership in a free Creative Cloud membership is converted . If you use this time more than 2 GB Creative Cloud storage , you may not be able to access some of your files . In this case it is recommended to delete some files, so you are below the memory limit of 2 GB , which is included in a free Creative Cloud membership.
    If you change your mind , we are always happy to activate your paid subscription again .
    Thank you for your confidence.
    The Creative Cloud Team
    Why did I get this stupid email, because my banking dates are the same as before and creditcard is everytime paying ??????? So what's going on?

    Hi.  I checked on the order and it says the order is currently being processed and I should check back tomorrow. I'm mostly just concerned because I got an email saying the order was on hold, and I want to make sure it actually does go through and I'm not just waiting for a delivery that's not going to come. I'm still confused as to why I'd get an email saying I had to call the fraud department only to be told I shouldn't have called the fraud department.

  • TS1702 "The feature you are trying to use is on a network resource that is unabailable" Why am I getting this message when I try to updaate itunes or quicktime?

    The feature you are trying to use is on a network resource that is unabailable" Why am I getting this message when I try to updaate itunes or quicktime?

    Before trying the update again, use Microsoft's Fix it solution at http://support.microsoft.com/mats/Program_Install_and_Uninstall. Use it to uninstall iTunes and Quicktime. It bypasses this not uncommon problem. When the solution finishes, the selected program will be uninstalled. It can take several minutes and I have seen as much as half an hour.
    After iTunes & Quicktime are uninstalled, try the update again.

  • I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?

    In relation to my previous inquiry regarding inability to view a pdf file using Safari...
    Is it possible that I can view other online bills from other website but not this particular bill from one specific website?
    Sorry if I missed any important point in this article -->Apple Safari 5.1 and Adobe Reader/Acrobat Advisory
    Thanks again!

  • Why do I get this error message when I open Organizer in Photoshop Elements 11 "Elements Organizer has stopped working"? My only option is to Close Program so I am effectively locked out of my photo catalogue.  I have reinstalled the program to no avail.

    Why do I get this error message when I open Organizer in Photoshop Elements 11 "Elements Organizer has stopped working"? My only option is to Close Program so I am effectively locked out of my photo catalogue. I have tried reinstalling the program but it made no difference to the error message.
    Could someone help please?  Steph

    Hi,
    Please give a try to Photoshop Elements (PSE) knowledge base. steps mentioned on this and see if it works.
    Regards
    Kishan

  • Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.

    I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.

  • I received an error "iTunes requires 64-bit mode" says to go into my iTunes application and 'uncheck' the 'open in 32-bit mode' checkbox - i went into the application and the box was not checked anyway so why am i getting this prompt?  Never happened b4

    i received an error message "iTunes requires 64-bit mode" says to go into my iTunes application and 'uncheck' the 'open in 32-bit mode' checkbox - i went into the application and the box was not checked anyway so why am i getting this prompt?  Never happened before. yesterday did the sofware update for maverick.

    Thank you for your response, Chris. But I'm afraid I have to disagree. There are native 64 bit versions of iTunes available for OSX and Windows.
    In a 64 Bit Windows environment native 64 Bit Applications install the DLL's in a directory called "Program Files" and a directory called "Program Files (x86)" (32 Bit applications only use the ladder).
    iTunes 9 is consistent with this behavior - and it identified itself to the system as a 64 bit application (meaning it's process appears without a "*32" tag on it).

  • When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?

    When I receive calls I always get the option to remind me later, but only certain times I get the option to respond with text.  Is there a setting I need to update to always get this option?  Also i can't use location reminders.  Is this because my calendar is in Outlook?

    The only known way to make it work on an external drive is by first installing Windows onto an internal drive, then cloning the install to an external Thunderbolt drive. Thunderbolt is seen as an extension of the internal bus, so Windows doesn't see it as an external device.

Maybe you are looking for