JTable causing ArrayIndexOutOfBounds exception on Linux

I have an application which defines a TableModel so that data retreived from our mainframe application can be displyed in a JTable.
The following problem occurs on Linux (Redhat version 7.3 and 8.0) but not on Windows (XP)
I retrieve some data from a table with 20 columns and then browse around and happen to leave one of the last few columns present on the screen. I then choose to view data from a second table (rerunning a JDBC query). This table only has 12 columns. As the JTable redraws (because of the data change) multiple arrayOutOfBoundsExceptions are thrown. The table eventually refreshes and the application continues but I would like to avoid all these error message being dumped to the console.
If the first table is displaying a column less than the number of columns in the second table then no problem occurs.
Any ideas or is this a bug?
Thanks
Ian Jones

My guess would be that the method getColumnCount() in
the tablemodel is returning the wrong numberI have added a println statement to just before it returns the columnCount. It returns the correct value. However, all of the errors have been created by the time it has called the getColumnCount() method. It appears that after I call fireTableStructureChanged(), the JTable starts to redraw before calling the getColunmnCount() method. This means it must be using the previous value of the columnCount which is incorrect and too high.
Below is the output from some debugging statements:
Column Count: 0
Firing table changed event
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Column Count: 24
Firing table changed event
java.lang.ArrayIndexOutOfBoundsException: 2
aColumn: 2
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 3
aColumn: 3
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 4
aColumn: 4
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 5
aColumn: 5
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 6
aColumn: 6
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 7
aColumn: 7
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 8
aColumn: 8
row length: 2
java.lang.ArrayIndexOutOfBoundsException: 9
aColumn: 9
row length: 2
Column Count: 2
Column Count: 2
Column Count: 2
It shows when getColumnCount is called and what it returns. It shows when structurechanged event is fired and the error messages. From the ordering you can see that the error messages are printed before the column count is queried
Is there any way to enforce the querying of the column count? It all appears to work correctly on windows.
Thanks again
Ian Jones

Similar Messages

  • JTable causing ArrayIndexOutOfBounds exception

    I created the JTable like this
    int allRows = I calculate this before I create the below object
    int allCols = 5 which is constant
    Object colNames [ ] = {pkg1,pkg2,pkg3,pkg4,pkg5};
    Object [ ][ ] obj= new Object[allRows][allCols];
    then I start inserting rows in obj by
    obj[rows][1] = ....
    obj[rows][2] = ....
    obj[rows][3] = ...
    obj[rows][4] = ...
    obj[rows][5] = ...
    Then I create the Jtable
    new JTable(obj,colNames);
    But when I add the rows to obj[ ] [ ] the no of rows might exceed the allrows value. So I am not able to change the value for allRows once it is created.
    Is there anyway I can increase the no of rows in obj before inserting values.
    I would appreciate If some one could help me out in this.
    Thanks
    Sushma.

    Here's a simple example for increasing the size of an array:
    final int TOTAL_ELEMENTS = 5;
    final int ADD_ELEMENTS = 3;
    int[] myArray = new int[TOTAL_ELEMENTS];
    for (int j = 0; j < TOTAL_ELEMENTS; j++)
    {  myArray[j] = j;  }
    int[] tempArray = new int[TOTAL_ELEMENTS + ADD_ELEMENTS];
    for (int j = 0; j < TOTAL_ELEMENTS; j++)
    {  tempArray[j] = myArray[j];  }
    myArray = tempArray;
    // Positions from TOTAL_ELEMENTS to
    //(TOTAL_ELEMENTS + ADD_ELEMENTS - 1) are not
    //set, but they now exist.
    tempArray = null;Of course, this is working with a simpler array than the one you're using, but, basically what you do is:
    1. Create a new (temporary) array with the new amount of elements you need.
    2. Copy each element from the smaller array into the new, larger array.
    3. Set the old array equal to the new array.
    4. Set the new array to null and forget about it.
    5. All the old elements are in their original places and you have a new array with more elements.
    Of course, this is pretty slow if you do it with large arrays or often, so it may not be the best idea.

  • Java Help Exception in Linux

    Hi all, I have a piece of code that initializes Java help on windows perfectly but the same code causes an exception in Linux. below is the exception I am getting in Linux. because of this, the applications help is not appearing in Linux. Does anybody know why this happens only in Linux / has come across this or a fix for this earlier?
    Also I am working on Linux for the first time and I noticed that when i gave a couple of System.outs in the code to find out what was happening, they appeared allright in windows, but did not appear in Linux !! (then even the exception below disappeared, and that did not load help either !!)
    java.lang.NullPointerException
    at javax.help.HelpSet.parseInto(HelpSet.java:567)
    at javax.help.HelpSet.<init>(HelpSet.java:129)
    at com.mysoftware.util.MyJavaHelp.<init>(MyJavaHelp.java:52)
    at com.mysoftware.util.MyJavaHelp.getInstance(MyJavaHelp.java:64)
    Parsing failed for null
    Got an IOException (null)
    An answer to this will be highly appreciated...

    At present I am not sure if I can post code. I am trying to find that out. However, can u tell me what u mean by a Windows - window? I will try to figure that out...
    Thanks a lot..

  • JSP causes strange ArrayIndexOutOfBounds exception

    Hello.
    I'm having a jsp, that outputs some information (this part is not important).
    I'm using Tomcat 5.0
    Sometimes it happens that that jsp throws ArrayIndexOutOfBounds: 45, and Tomcat starts to throw OutOfMemory exception.
    This would be not so strange if I had any array in the jsp. However, I do not. And furthermore, the line shown in the stacktrace log contains...a closing bracket.
    Also, I cannot reproduce this - it happens to some of my users.
    My suspection is, that someone is making an attack via the input parameters.
    I use Integer.parseInt to get the numeric values of the request parameters.
    Is there any vulnerability, or any way that Integer.parseInt throw an "ArrayIndexOutOfBounds" Exception, or I should look for something else. Thanks

    Hello.
    I'm having a jsp, that outputs some information (this part is not important).
    I'm using Tomcat 5.0
    Sometimes it happens that that jsp throws ArrayIndexOutOfBounds: 45, and Tomcat starts to throw OutOfMemory exception.
    This would be not so strange if I had any array in the jsp. However, I do not. And furthermore, the line shown in the stacktrace log contains...a closing bracket.
    Also, I cannot reproduce this - it happens to some of my users.
    My suspection is, that someone is making an attack via the input parameters.
    I use Integer.parseInt to get the numeric values of the request parameters.
    Is there any vulnerability, or any way that Integer.parseInt throw an "ArrayIndexOutOfBounds" Exception, or I should look for something else. Thanks

  • The niFPui.mxx plug-in caused an exception in the CmxAggregateItemUI::InvokeCommand function in the NIMax process. When saving *.iak file in MAX4.6

    The niFPui.mxx plug-in caused an exception in the CmxAggregateItemUI::InvokeCommand function in the NIMax process. When saving *.iak file in MAX4.6
    Hi There,
    The subject header just about says it all. This is the first action I took with MAX - it is a fresh install. The file I wanted to save was still written and the FP seems to be working ok. However, I need to know what happened.
    I can't post the whole log file due to the amount of characters allowed on this post. I can cut and paste sections if there is a specific part of the file you need. Below is the first section and last section.
     Context where exception was caught:
    Func:
    CmxAggregateItemUI::InvokeCommand Args: plugin=niFPui.mxx Item=0107EAB1
    cmdID.cmdId={4A36174B-EC0C-4D73-A23D-F15D164542DE} cmdID.index=0
    Application   : C:\Program Files\National Instruments\MAX\NIMax.exe
    User Name     : slaney
    OS Version    : 5.1.2600 (Service Pack 3)
    Exception Code: C000001E
    Exception Addr: 457BC448
    Return Address: 457BC448
    Function Name : nNIFPServer::tFpLinearScaleRange::`vftable'
    Module Name   : FieldPoint71
    Parameters    : F001008E 7800FDDD C5100DFC EC0107EA
    Source File   : (not available)
    Return Address: 481000C3
    Function Name : (not available)
    Module Name   : (not available)
    Parameters    : 00000000 00000000 00000000 00000000
    Source File   : (not available) 

    Hi,
    I did a research on your error message and it seems this problem was introduced with MAX 4.6. This version switched to a new error reporting mechanism and reports even errors that are which are not critical to your task.
    These errors typically show up as "unexpected" and if your error falls into this category have a look to this KB for further assistance.
    If it doesn't fall into this category, your could try to go back to the MAX 4.5 or 4.4.. Of course you would need to reinstall some components and might not be able to use newer drivers at all.
    Let me know.
    DirkW

  • Error in crawl log "Error while crawling LOB contents. ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException The shim execution failed unexpectedly - The method or operation is not implemented..; SearchID "

    Hi 
    I get the following error in my crawl logs
    "Error while crawling LOB contents. ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException The shim execution failed unexpectedly - The method or operation is not implemented..; SearchID "
    Because of this i suspect, the search results are not including those aspx pages marked as "Hide physical urls from search".
    This error is not available in the another environment where the aspx pages are coming in the results.
    Thanks
    Joe

    Hi Joe,
    Greetings!
    Reset the index and re-crawl. That usually clears it
    If you are using NTLM authentication, then make sure that you specified the PassThrough authentication for crawling
    Probably you need to debug the BDC code that underlies the external content types.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/41a86c43-151d-47cd-af73-967a4c940611/lotus-notes-connector-error-while-crawling-lob-contents?forum=sharepointsearch
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Error while crawling LOB contents (Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException)

    Everytime when I perform a Full Crawl on the Central Administraion page, this error will appear and the crawl process will run into an infinite loop and nothing crawl success. I have tried delete and re-create the crawling content sources, start/stop
    the search services but this error still appear.
    Please help. Thanks a lot.
    Error Message:
    topicpages://
    Error while crawling LOB contents.
    ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException
    The shim execution failed unexpectedly - Exception has been thrown by the target of an invocation..:
    System.Net.WebException The request failed with HTTP status 404: Not Found.;
    SearchID = EFE3FAA4-12C3-40AD-B410-51D6189FC720 )

    Tried scheduled an incremental every 10 minutes
    Still getting error on crawling LOB contents. The incremental crawl ran into an infinite loop and nothing crawl success
    Thanks for help.
    Error Message:
    topicpages://(servername)
    Error while crawling LOB contents.
     ( Error caused by exception: Microsoft.BusinessData.Infrastructure.BdcException
    The shim execution failed unexpectedly - Exception has been thrown by the target of an invocation..:
    System.Net.WebException The request failed with HTTP status 404: Not Found.;
    SearchID = B801BC11-8138-453F-AB4D-AA4BE4F5B57A )

  • Underscore causing an exception in a toolbar

    //  I'm using Netbeans 7.4 release candidtate 2
    //  1)  Start the JavaFx Ensemble program - thank you very much.  It has saved me many hours.
    //  2)  In Ensemble Click on "Hidden Split Pane".
    //  3)  Click the "Source Code" tab.
    //  4)  Click the "Save Netbeans project".
    //  5)  Replace HiddenSplitPaneSample.java with this code (see below).
    //  6)  After starting: click the "double arrow" twice (maybe three times) to display the options in the center pane.
    //  7)  The second time you should get the exception.  (See Netbeans output window.)
    //  8)  You get the double arrow because dividerPositions() is set too small; but that may be the way some user
    //      would have things "split".
    //  Why this is important to me.  I included a phony getWord() method (see below).  In my app getWord() will
    //  actually go to disk and get a word, in the human language that the user has selected somewhere else.
    //  Example:    if they have English selected then getWord( "Add_One" ) will return "Add One" and display it as the buttons text.
    //              if they have Chinese selected then getWord( "Add_One" ) will return "Chinese equivalent of Add One" and display it as the buttons text.
    //              If there is no replacement in the file then getWord( "Add_One" ) will return "Add_One".
    //  The question is why does the underscore cause an exception?  I could easily replace the under score with
    //  a dash (see below) because that doesn't cause the exception. But that begs the question what will happen
    //  when I'm using Chinese, Japanese, or Hindi?  Is there a stray character here and there that will cause
    //  this exception?
    //  Notice also that it has removed my underscore: "Add_One" becomes "AddOne".
    * Copyright (c) 2008, 2012 Oracle and/or its affiliates.
    * All rights reserved. Use is subject to license terms.
    import javafx.application.Application;
    import javafx.geometry.HPos;
    import javafx.geometry.VPos;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ScrollPane;
    import javafx.stage.Stage;
    import javafx.scene.control.SplitPane;
    import javafx.scene.control.SplitPaneBuilder;
    import javafx.scene.control.ToolBar;
    import javafx.scene.control.ToolBarBuilder;
    import javafx.scene.layout.Pane;
    import javafx.scene.layout.RegionBuilder;
    import javafx.scene.layout.VBox;
    public class HiddenSplitPaneSample extends Application {
        ToolBar     standardToolbar     = null;
        ScrollPane  scrollPane          = new ScrollPane    ();
        class MyPane extends Pane   {
            @Override
            protected void layoutChildren() {
                super.layoutChildren   ();
                double  w   = getWidth  ();
                double  h   = getHeight ();
                double  ph  = standardToolbar.getHeight();
                layoutInArea    ( standardToolbar,  0,  0,  w, ph,    0,  HPos.CENTER,    VPos.CENTER );
                layoutInArea    ( scrollPane,       0,  0+ph,   w, h-ph,    0,  HPos.LEFT,    VPos.CENTER );
        private String  getWord ( String wordToGet )    {
            return  wordToGet;
        private void init(Stage primaryStage) {
            MyPane  pane1   = new MyPane    ();
                    pane1   .setPrefWidth   ( 400 );
                    pane1   .setPrefHeight  ( 400 );
            standardToolbar = ToolBarBuilder.create().build();
                standardToolbar     .setPrefHeight      ( 30 );
                standardToolbar     .setMinHeight       ( 30 );
                standardToolbar     .setMaxHeight       ( 30 );
                pane1.getChildren() .add( standardToolbar );
                Button  addOneButton    = new Button    ( getWord( "Add_One"    ) );
                Button  addTwoButton    = new Button    ( getWord( "Add_Two"    ) ); 
                Button  addThreeButton  = new Button    ( getWord( "Add_Three"  ) );
                Button  addFourButton   = new Button    ( getWord( "Add_Four"   ) ); 
                //Button  addOneButton    = new Button    ( getWord( "Add-One"    ) );
                //Button  addTwoButton    = new Button    ( getWord( "Add-Two"    ) ); 
                //Button  addThreeButton  = new Button    ( getWord( "Add-Three"  ) );
                //Button  addFourButton   = new Button    ( getWord( "Add-Four"   ) ); 
                standardToolbar .getItems().add ( addOneButton      );
                standardToolbar .getItems().add ( addTwoButton      );
                standardToolbar .getItems().add ( addThreeButton    );
                standardToolbar .getItems().add ( addFourButton     );
            VBox    vbox    = new VBox  ();
            scrollPane  .setContent     ( vbox );
            scrollPane  .setFitToWidth  ( true );
            pane1   .getChildren().add     ( scrollPane );
            Group root = new Group();
            primaryStage.setScene(new Scene(root));
            String hidingSplitPaneCss = HiddenSplitPaneSample.class.getResource("HiddenSplitPane.css").toExternalForm();
            final SplitPane splitPane = SplitPaneBuilder.create().id("hiddenSplitter").items(
                    RegionBuilder.create().styleClass("rounded").build(),
                    pane1,//RegionBuilder.create().styleClass("rounded").build(),
                    RegionBuilder.create().styleClass("rounded").build()).dividerPositions(new double[]{0.33, 0.50}).build();
            splitPane.getStylesheets().add(hidingSplitPaneCss);
            root.getChildren().add(splitPane);
        @Override public void start(Stage primaryStage) throws Exception {
            primaryStage.setX      ( 0 );
            primaryStage.setY      ( 0 );
            primaryStage.setWidth  ( 500 );
            primaryStage.setHeight ( 500 );
            init(primaryStage);
            primaryStage.show();
        public static void main(String[] args) { launch(args); }

    The underscore is being parsed as an indicator that the next character should be a mnemonic, and the underscore is then stripped. This happens by default on Buttons, but not on Labels.
    See the API in the Labeled class. You can either turn parsing off, or you can use two underscores to represent one underscore.

  • MAX error, niGPIBsys.dll plug-in caused an exception

    Trying to connect to hardware via the local network to send ASCII strings. I can ping the static IP address successfully, but can't get anything from it in LabVIEW.
    VISA resource at the moment is TCPIP0::xxx.xxx.xxx.xxx::INSTR, which I think is right.
    MAX returns this error on startup:
    The niGPIBsys.dll plug-in caused an exception in the CmxSysExpertManager::FinalizeExpert function in the NIMax process.
    See these files for details:
    C:\ProgramData\National Instruments\MAX\Logs\20130709_091257-NIMax-00001848.log
    C:\ProgramData\National Instruments\MAX\Logs\20130709_091257-NIMax-00001848.dmp
    Then won't make new devices.
    VISA and 488 have both been reinstalled, and the nearest error I could find was number 6 here:
    http://digital.ni.com/public.nsf/allkb/6CA56E2DDBCCA06086257591006141EE?OpenDocument
    ... but PAE is definitely not enabled.
    Thanks in advance for any suggestion.
    (LabVIEW version 11.0 32-bit, windows 7, hardware is a Votsch Industrial Oven with static IP address)

    Sorry, I'm confused myself.
    LabVIEW communication with one instrument works when I manually entered TCPIP0::xxx.xxx.xxx.xxx::INSTR, so over the local network. It also worked when I connected it to my computer with a USB cable because the USB::<something> option came up in the drop down list of the VISA resource name panel straight away.
    With the other instrument, it has both USB and ethernet sockets, I couldn't get a response using the same TCPIP format as above, even though I know the IP address (and I tried all combinations of w/ wout/ INSTR) and I could ping it. Haven't been able to plug it into anything with USB directly as I can't get a computer near it at the moment. Tried LabVIEW's VISA serial read write example programme... does that not make sense then? I got error -1073807343.
    So I tried to use MAX according to tutorials and encountered the above problems. I suspect the MAX problem is seperate to my VISA connection problems. Can MAX not be used to find and configure connections both USB (is this the same as GPIB?) and TCPIP?

  • Adobe Photoshop Elements 6 causes an exception

    I installed APE 6 on my Windows Vista computer and it works ok but now when I open some other programs it causes an exception.  These are important programs too, my EOS Utility program for Remote Capture from my camera, gone.  My program for transferring data to my calculator, gone.  My Monopoly game, gone.  What happened and how can I fix this?

    This may have happened due to insufficient RAM. Try running these programs on a system with greater RAM.

  • Adding new constant value to an 'enum' used in a field causes an exception

    We are using the DPL. I added a new constant to an enum that is used as a field on an entity called Booking (this field is not a key). This seems to cause an exception during onForeignKeyDelete when we delete an object from a related entity. The constraint is a "NULLIFY" on a "MANY_TO_ONE" relationship, so the effect should be just to nullify the Booking foreign key, but for some reason the fields are being checked and causing this exception. Shouldn't it be possible to add a new constant value to an enum without having to do some sort of migration? The stack is below. Note that the two types mentioned in the exception message are in fact the same (this is the enum). For the moment we can truncate our database, because we are still in development, but this would present a problem in production.
    IllegalArgumentException: Not a subtype of the field's declared class com.chello.booking.model.BookingStatus: com.chello.booking.model.BookingStatus
    at com.sleepycat.persist.impl.RawAbstractInput.checkRawType(RawAbstractInput.java:142)
    at com.sleepycat.persist.impl.RecordOutput.writeObject(RecordOutput.java:75)
    at com.sleepycat.persist.impl.RawAccessor.writeField(RawAccessor.java:232)
    at com.sleepycat.persist.impl.RawAccessor.writeNonKeyFields(RawAccessor.java:148)
    at com.sleepycat.persist.impl.ComplexFormat.writeObject(ComplexFormat.java:528)
    at com.sleepycat.persist.impl.PersistEntityBinding.writeEntity(PersistEntityBinding.java:143)
    at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKeyInternal(PersistKeyCreator.java:170)
    at com.sleepycat.persist.impl.PersistKeyCreator.nullifyForeignKey(PersistKeyCreator.java:137)
    at com.sleepycat.je.SecondaryDatabase.onForeignKeyDelete(SecondaryDatabase.java:1082)
    at com.sleepycat.je.ForeignKeyTrigger.databaseUpdated(ForeignKeyTrigger.java:37)
    at com.sleepycat.je.Database.notifyTriggers(Database.java:2016)
    at com.sleepycat.je.Database.deleteInternal(Database.java:800)
    at com.sleepycat.je.Database.delete(Database.java:714)
    at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:133)
    at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
    at com.sleepycat.persist.BasicIndex.delete(BasicIndex.java:124)
    at com.sleepycat.persist.PrimaryIndex.delete(PrimaryIndex.java:206)
    Kind regards
    James Brook

    James,
    I've started investigating this and at first look it does appear to be a DPL bug. Over the next few days I'll look more deeply and report back here with what I find. If it is indeed a bug, we'll fix this for the next JE 4.0.x release and I'll make the fix available to you.
    You are correct that adding enum values is allowed without a conversion of any kind. The only change you should have to make, other than adding the enum value, is to bump the version of the containing entity in the @Entity annotation. I'm suspect you've already done that, but if you hadn't, it wouldn't cause the problem you're seeing.
    We have tested the addition of enum values, but not in combination with foreign key deletion and the NULLIFY constraint, I'm afraid.
    If I'm correct about it, the bug is specific to adding enum values and deleting a secondary key with the NULLIFY constraint, prior to re-writing the entity in some other way. So if the entity is updated (written) before the secondary key is deleted, then the problem should not occur. Therefore, one workaround is to call EntityStore.evolve after adding the enum value, and before using the store in other ways.
    Thanks for reporting this, and I hope this is not blocking your development.
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • [Solved] Updating everything except the Linux kernel

    Hello,
    Since a few weeks, wicd has problems with recent versions of kernel on my computer. Is there a way to update everything except the linux package?
    Thanks in advance.
    Last edited by Marin M. (2012-05-02 14:20:52)

    You can hold any package from updating by uncommenting the IgnorePkg option on your pacman.conf and listing said package(s) there.
    https://wiki.archlinux.org/index.php/Pa … g_upgraded

  • Toplink Exception: caused by EXCEPTION [TOPLINK-125]

    Hi,
    Sorry i can't provide much info at the moment, but this has just been passed on from a colleague at work.
    The following error has occurred now that we have temporarily set all descriptors to use noIdentityMap().
    It does not happen when caching is switched on.
    Jul 01, 2003 06:32:36 PM com.aon.ame.quotation.ejb.QuotationBean updateSectionQuotation
    INFO: Toplink Exception: caused by EXCEPTION [TOPLINK-125] (3.6.4 (build 245)): TOPLink.Public.Exceptions.DescriptorException
    EXCEPTION DESCRIPTION: The mapping for the attribute [underwritingCompany] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
    MAPPING: TOPLink.Public.Mappings.OneToOneMapping[underwritingCompany]
    DESCRIPTOR: Descriptor(com.aon.ame.entities.UnderwritingBranch --> [DatabaseTable(AME2DATA.UNDERWRITING_BRANCH)]):
    EXCEPTION DESCRIPTION: The mapping for the attribute [underwritingCompany] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
    MAPPING: TOPLink.Public.Mappings.OneToOneMapping[underwritingCompany]
    DESCRIPTOR: Descriptor(com.aon.ame.entities.UnderwritingBranch --> [DatabaseTable(AME2DATA.UNDERWRITING_BRANCH)])
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-125] (3.6.4 (build 245)): TOPLink.Public.Exceptions.DescriptorException
    EXCEPTION DESCRIPTION: The mapping for the attribute [underwritingCompany] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
    MAPPING: TOPLink.Public.Mappings.OneToOneMapping[underwritingCompany]
    DESCRIPTOR: Descriptor(com.aon.ame.entities.UnderwritingBranch --> [DatabaseTable(AME2DATA.UNDERWRITING_BRANCH)])
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.<init>(Compiled Code)
         at java.lang.Exception.<init>(Compiled Code)
         at java.lang.RuntimeException.<init>(Compiled Code)
         at TOPLink.Public.Exceptions.TOPLinkException.<init>(Compiled Code)
         at TOPLink.Public.Exceptions.ValidationException.<init>(Compiled Code)
         at TOPLink.Public.Exceptions.DescriptorException.<init>(DescriptorException.java:176)
         at TOPLink.Public.Exceptions.DescriptorException.<init>(DescriptorException.java:183)
         at TOPLink.Public.Exceptions.DescriptorException.valueHolderInstantiationMismatch(DescriptorException.java:1363)
         at TOPLink.Private.Indirection.BasicIndirectionPolicy.validateAttributeOfInstantiatedObject(Compiled Code)
         at TOPLink.Public.Mappings.ForeignReferenceMapping.getAttributeValueFromObject(Compiled Code)
         at TOPLink.Public.Mappings.ForeignReferenceMapping.buildClone(Compiled Code)
         at TOPLink.Private.Descriptors.ObjectBuilder.populateAttributesForClone(Compiled Code)
         at TOPLink.Public.PublicInterface.UnitOfWork.cloneAndRegisterObject(Compiled Code)
         at TOPLink.Public.PublicInterface.UnitOfWork.checkExistence(Compiled Code)
         at TOPLink.Public.PublicInterface.UnitOfWork.internalRegisterObject(Compiled Code)
         at TOPLink.Public.PublicInterface.UnitOfWork.registerObject(Compiled Code)
         at com.aon.ame.quotation.ejb.QuotationBean.updateSectionQuotation(Compiled Code)
         at com.aon.ame.quotation.ejb.EJSRemoteQuotation.updateSectionQuotation(EJSRemoteQuotation.java:2418)
         at com.aon.ame.quotation.ejb._Quotation_BaseStub.updateSectionQuotation(_Quotation_BaseStub.java:4146)
         at com.aon.ame.quotation.ejb._Quotation_Stub.updateSectionQuotation(Compiled Code)
         at com.aon.ame.quotation.struts.action.ViewSpecialEndorsementsAction.doUpdateBrokerSpecialEndorsement(Compiled Code)
         at com.aon.ame.quotation.struts.action.ViewSpecialEndorsementsAction.doUpdateWording(ViewSpecialEndorsementsAction.java:551)
         at com.aon.ame.quotation.struts.action.ViewSpecialEndorsementsAction.amePerform(ViewSpecialEndorsementsAction.java:127)
         at com.aon.ame.struts.action.AmeBaseAction.aonPerform(AmeBaseAction.java:48)
         at com.aon.struts.action.BaseAction.perform(Compiled Code)
         at org.apache.struts.action.ActionServlet.processActionPerform(Compiled Code)
         at org.apache.struts.action.ActionServlet.process(Compiled Code)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(Compiled Code)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(Compiled Code)
         at com.ibm.servlet.engine.webapp.IdleServletState.service(Compiled Code)
         at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(Compiled Code)
         at com.ibm.servlet.engine.webapp.ServletInstance.service(Compiled Code)
         at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(Compiled Code)
         at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(Compiled Code)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(Compiled Code)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(Compiled Code)
         at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(Compiled Code)
         at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(Compiled Code)
         at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(Compiled Code)
         at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(Compiled Code)
         at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(Compiled Code)
         at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(Compiled Code)
         at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(Compiled Code)
         at com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(Compiled Code)
         at com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(Compiled Code)
         at com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(Compiled Code)
         at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.notifyService(Compiled Code)
         at com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRunnable.run(Compiled Code)
         at com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run(Compiled Code)
         at java.lang.Thread.run(Compiled Code)
    Jul 01, 2003 06:32:36 PM com.aon.struts.action.BaseAction perform
    SEVERE: com.aon.ame.quotation.struts.action.ViewSpecialEndorsementsAction.aonPerform() threw an exception: RemoteException occurred in server thread; nested exception is:
         com.ibm.ejs.container.UncheckedException: ; nested exception is:
         EXCEPTION [TOPLINK-125] (3.6.4 (build 245)): TOPLink.Public.Exceptions.DescriptorException
    EXCEPTION DESCRIPTION: The mapping for the attribute [underwritingCompany] uses indirection, and so must be initialized to a new ValueHolder. Currently the value is: [null].
    Can anyone shed any light on why this might have happened?
    Many thanks.

    I don't see how caching is affected by this, but the exception is complaining that you have a relationship that uses indirection and have not instantiated the value holders.
    I.e.,
    Customer has 1-1 to Address, and you're using ValueHolderInterface for the type. Either in the constructor or in the declaration of the attribute, you need to init the value holder. You should do the same for 1-M's also (unless you're using transparent indirection) For example:
    public class Customer {
    String name;
    String title;
    ValueHolderInterface address = new ValueHolder();
    ValueHolderInterface orders = new ValueHolder(new Vector());

  • Help with ArrayIndexOutOfBounds Exception

    Hi all,
    I am very new to programming in general and Java in particular. I'm working on a program from a book that is supposed to read 72 hourly readings of voltage and then print the mean voltage over that time period and any hours where the voltage varies from the mean by more than ten percent.
    I have an array set up that should have 72 elements created randomly, between 12000-14000. I'm getting an ArrayIndexOutOfBounds Exception when I try to run the program. So far as I understand, this means that somewhere in the program I'm trying to reference an array index that doesn't exist. I just can't see where that is! I've tried a couple different things to see if they've worked but have had no luck.
    I'm sure this is just a simple thing, but I'm feeling a little under the weather and I think my brain is pickled from looking at this code for too long. Any suggestions or ideas are gladly welcomed! I'll paste the code below to take a look at. Sorry if it's ugly or messy... I'm just figuring this stuff out still!
    Thanks so much-
    Heather
    import java.lang.*;
    import java.util.*;
    class VoltageReport {
    VoltageReport () throws IOException {
    System.out.println("Welcome to the voltage meter program!");
    //int place = 0;
    int MeterReadings[] = new int [71];
    int place = 0;
    for (int i = 0; i <= 71; i++) {
    //if (place == 72) break; thought this would do it, but it doesn't.
    MeterReadings[place] = (int) (Math.random()*2000+12000);
    place++;
    place = 0;
    int VoltageMean;
    VoltageMean = 0;
    for (int i = 0; i <= 71; i++) {
    VoltageMean = VoltageMean + MeterReadings[place];
    place++;
    place = 0;
    VoltageMean = VoltageMean / 72;
    for (int i = 0; i <= 71; i++) {
    if (MeterReadings[place] < (.9 * VoltageMean)) {
    System.out.println("Hour " + place + " is more than 10% lower than the " + "mean of " + VoltageMean + " .");
    else if (MeterReadings[place] > (.9 * VoltageMean)) {
    System.out.println("Hour " + place + " is more than 10% higher than the " + "mean of " + VoltageMean + " .");
    place++;
    System.out.println("That's all the information I have. Goodbye!"); }
    public static void main (String [] args) throws IOException {
    new VoltageReport();
    }

    if (MeterReadings[place] < (.9 * VoltageMean))
        System.out.println("Hour " + place + " is more than 10% lower than the " + "mean of " + VoltageMean + " .");
    else if (MeterReadings[place] > (.9 * VoltageMean))
        System.out.println("Hour " + place + " is more than 10% higher than the " + "mean of " + VoltageMean + " .");The problem lies in the else-if. You are checking if the voltage is over 90% of the mean. I think you want to check if it is over 110% of(10% over) the mean.
    else if(MeterReadings[place] > (1.1 * VoltageMean))
    ....And a few other things.
    Arrays
    int[] temp = new int[5]; // you have indexes (indices?) 0, 1, 2, 3 & 4 is the last one
    // Count them, there is 5 there.  Since we always start at 0, the last one is always 1 less than the length.
    // Never do temp[temp.length], this will ALWAYS end in IndexOutOfBoundsException.
    // temp[temp.length-1] is the way to get the last element.
    Posting code
    Since you were unusually nice, no one has cut sick at you, but in the future when you post code, put it between [ code ] and [ /code ] tags (I added spaces so the forum doesn't recognize them, but you get the idea).
    Cheers,
    Radish21

  • ArrayIndexOutofBound exception, PLEASE HELP

    I am trying to validate my xsd file but when it tries to execute the following line:
    org.apache.xerces.parsers.SAXParser p = new org.apache.xerces.parsers.SAXParser();
    it throws the ArrayIndexOutOfBound exception.
    Anyone has any idea on it?
    thanks in advance...
    faisalk

    Are you sure that's the line that's throwing the error?
    I just compiled and ran the following:
    public class TestMain{
         public static void main(String args[]){
              org.apache.xerces.parsers.SAXParser p = new org.apache.xerces.parsers.SAXParser();
              System.out.println(p.toString());
         }     //end main()
    }     //end class TestMain

Maybe you are looking for

  • Multiple users for the Authentication ?

    Hi Guys, we have multiple users who process their credit card requests through xi and we need to issue certificates which will be unique for every user. where i need to maintain all these certificates and how a particular user is validated when he se

  • How to recover backed up photos from mbp hard drive

    I'll try to make this short. Basically I had a late 2006 macbook pro 15", it died on me about 2 weeks ago, hard drive failure I think. Just getting the white screen when I started it up, tried a few things and no luck, so I decided it was time to upg

  • Lightroom can't find external disk by itself

    Since uprgrading to Lightroom 2 (currently 2.2) I'm having this strange problem (this is on a Macbook Pro (OSX 10.5.6). I keep my photo's and my catalog on an external SATAlink harddrive. Often when I start Lightroom, it tells me that it can't find m

  • HT201272 How to convert "protected" songs

    How can I convert my "protected" songs to "unprotected"?  I thought maybe re-downloading them would work, but on my purchased list, these show up as already "downloaded", so apparently that's not the answer.  I see articles on here talking about upgr

  • Report Layout Variant - transaction S_AHR_61016503 - Staff Assignments

    Hi, One of our users has created a layout variant in the above report. Some other users can view and choose the layout but one cannot. Is there an authorisation object missing? If not, does anyone have any ideas why this one person cannot view it. Th