Runtime exception when continuously updating a JList

Hello,
my program has a JList to display some information and updates the content of this JList while the program is running. The JList is put in a JScrollPane and uses DefaultListModel to store its elements(the elements are all String objects).
Initially the JList is empty. After the program starts, new elements will be continuously added into DefaultListModel with the addElement(Object obj) method. Once there are 50 elements in the JList, the program removes the first element (index=0) before adding a new element to the JList.
The program seems to work fine, except it randomly generates ArrayIndexOutOfBoundsException at runtime, which is really annoying. Can someone help me to solve this problem? Many thanks.
Part of the program is listed below:
DefaultListModel tupleListModel=new DefaultListModel();
JList tupleList=new JList(tupleListModel);
JScrollPane sp1=new JScrollPane(tupleList);
for(int i=0;i<50;i++)
        tupleListModel.addElement(op.nextTuple().toString());
while(true){
         tupleListModel.remove(0);
         tupleListModel.addElement(op.nextTuple().toString());
}One of the runtime error message is:
java.lang.ArrayIndexOutOfBoundsException: 49 >= 49
at java.util.Vector.elementAt(Vector.java:431)
at javax.swing.DefaultListModel.getElementAt(DefaultListModel.java:70)
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1147)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1098)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:281)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1275)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
at java.awt.Container.layout(Container.java:1020)
at java.awt.Container.doLayout(Container.java:1010)
at java.awt.Container.validateTree(Container.java:1092)
at java.awt.Container.validate(Container.java:1067)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:353)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:116)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
The other one is:
java.lang.ArrayIndexOutOfBoundsException: 49
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1155)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1098)
at javax.swing.plaf.basic.BasicListUI.getPreferredSize(BasicListUI.java:281)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1275)
at javax.swing.JList.getScrollableTracksViewportWidth(JList.java:2147)
at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:786)
at java.awt.Container.layout(Container.java:1020)
at java.awt.Container.doLayout(Container.java:1010)
at java.awt.Container.validateTree(Container.java:1092)
at java.awt.Container.validate(Container.java:1067)
at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:353)

It's removing an item in the middle of trying to figure out what the preferred size of the jlist is. I would be that BasicListUI.updateLayoutState() has code in it something like thisint numItems = model.getSize();
for (int i=0; i<numItems; i++) {
String text = model..getElementAt(i).toString();  // bad time for the size to change
}If the size changes, the loop will still iterate to what used to be the size. Try using SwingUtilities.invokeLater() when to update the list so that the changes will happen on the event thread.

Similar Messages

  • Runtime exception when processing target-fieldmapping

    Hi guys,
    Mine is a scenario from ECC to MDM. I have to trigger INFORECMASS Idoc through Transaction ME18. It's working fine and I am able to see the correct output in  the appropriate folder in MDM.
    I gotta new requirement. Now it's triggering one Idoc for one record and we want an xml for about say 1000 records or may be even 1500 records. Using Transaction MDM_CLNT_EXTR we trigger an Idoc that has many segments, mainly over a range, and then I get the following error in SXMB_MONI
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_INFRECMASS_ECC_to_MDM_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_INFRECMASS_Receiver/INFREC_Receiv~<
    This is the error that I get. The strange thing is that even now when I trigger using ME18, I am getting the correct output. Why am I getting this error when I trigger the other way around ?
    Regards
    Harish Babu

    Hi Baskar,
    I changed the mapping. I removed the ABS function. It's still throwing the same error. Now when I copy the payload from SXMB_MONI and test in Mapping in ESR, it's working fine. But the same source file throws error in SXMB_MONI. The xml that works in Test tab should certainly work in SXMB_MONI also, shouldn't it?
    So I guess it is a different error.
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_INFRECMASS_ECC_to_MDM_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_INFRECMASS_Receiver/INFREC_Receiver
    I must add that the INFREC_Receiver is the root node of the target file and I have kept it 0..unbounded and fields 0...1. But the source has many segements of the Idoc, so should I change them ?
    Harish Babu

  • ADS : Soap runtime exception when using MEDRUCK_PO

    Hello,
    I want to use standard PDF form MEDRUCK_PO instead of Sapscript MEDRUCK for editing PO for output type NEU.
    I have make changes in NACE for Application EF/Output type NEU :
    Program  : SAPFM06P
    FORM routine : ADOBE_ENTRY_NEU
    PDF Form : MEDRUCK_PO
    Type : PDF
    Layout Module : ME_READ_PO_FOR_PRINTING.
    Then I have create a purchase order in ME21N with NEU message.
    When I try "Print Preview", I have an error : ADS : Soap runtime exception: CSoapExceptionTransport(100101).
    Message number : FPRUNX001.
    My form is not printed.
    Does anybody have an idea to solve this problem ?
    Thanks.

    Hello,
    To use that form you need to configure ADS in your system.
    I sugest you to read the ADS configure manual and the troubleshooter note: SAP Note Number: 944221

  • Help,runtime exception when using oracle ses 11g

    development environment is myeclipse 8.5 , jdk1.6 , oracle ses 11g is installed on centos .
    I use the query web service example in oracle ses 11g administrator's guide to test ses 11g.
    I added wseeclient.jar,ant.jar and search_client.jar to my projects .
    the project is compiled successfully, however, A runtime exception occured when runing the project :
    Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/descriptor/DescriptorManager
         at oracle.search.query.webservice.client.OracleSearchService.<clinit>(OracleSearchService.java:58)
         at client.SESClient.main(SESClient.java:8)
    Caused by: java.lang.ClassNotFoundException: weblogic.descriptor.DescriptorManager
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    The code is listed blow :
    package client;
    import oracle.search.query.webservice.client.*;
    public class SESClient {
         public static void main(String[] args) throws Exception {
              // runtime exception occured : java.lang.ClassNotFoundException: weblogic.descriptor.DescriptorManager
    // when create the object OracleSearchService
              OracleSearchService stub = new OracleSearchService();
              stub.setSoapURL("http://59.77.132.154:7777/search/query/OracleSearch");
              OracleSearchResult result = stub.doOracleSearch("fzu site:www.fzu.edu.cn", 1,
                        Integer.MAX_VALUE, Boolean.TRUE, Boolean.TRUE, null, "zh",
                        "zh", Boolean.TRUE, null, null, null);
              int estimatedHitCount = result.getEstimatedHitCount().intValue();
              if (estimatedHitCount == 0)
                   System.out.println("No Result!");
              else {
                   ResultElement[] resElemArray = result.getResultElements();
                   for (int i = 0; i < resElemArray.length; ++i) {
                        System.out.println(resElemArray.getTitle() + ":"
                                  + resElemArray[i].getUrl());
                        System.out.println("-----------------------------------------------------------");

    I have a reason to believe that my anti virus scanner is modifying the jar file.
    I had initially downloaded the jar file from sourceforge. It had the com.iwss.... package.
    Now i dowloaded the file in zip format and that package is not there in the zip file. But i have a new problem now.
    My eclispe just crashed with the following error message.
    JVM terminated. Exit code=1
    D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\javaw.exe
    -Xms40m
    -Xmx256m
    -jar C:\eclipse\startup.jar
    -os win32
    -ws win32
    -arch x86
    -launcher C:\eclipse\eclipse.exe
    -name Eclipse
    -showsplash 600
    -exitdata 1bc_74
    -vm D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\javaw.exe
    -vmargs
    -Xms40m
    -Xmx256m
    -jar C:\eclipse\startup.jar

  • Uncaught exception when I update window

    Hi All,
    I want to show a progress bar while executing script.
    and i am using the following code for that:
    var win = new Window("palette", "SnpCreateProgressBar", [150, 150, 600, 260]);
    win.pnl = win.add("panel", [10, 10, 440, 100], "Script Progress");
    win.pnl.progBar = win.pnl.add("progressbar", [20, 35, 410, 60], 0, 100);
    win.pnl.progBarLabel = win.pnl.add("statictext", [20, 20, 320, 35], "0%");
    win.show();
                        while(win.pnl.progBar.value < win.pnl.progBar.maxvalue)
                                  // this is what causes the progress bar increase its progress
                                  win.pnl.progBar.value++;
                win.pnl.progBarLabel.text = win.pnl.progBar.value+"%";
                                  $.sleep(10);
        alert('Done!');
    win.close();
    But I am having following error when I run it:
    Can you please tell me why it is happening....
    Thanks
    Harsh S

    Yaar I am posting my code again on this portal:
    this is terrible because its not working:::
    function artboardToJPGs(size)
    var win = new Window("palette", "SnpCreateProgressBar", undefined, {borderless: true});
    win.pnl = win.add("panel", [10, 10, 440, 100], "Creating JPEG");
    win.pnl.progBar = win.pnl.add("progressbar", [20, 35, 410, 60], 0, 100);
    win.pnl.progBarLabel = win.pnl.add("statictext", [20, 20, 320, 35], "0%");
            win.show ();
    for(i=0; i<10; i++)
        win.pnl.progBar.value+=10;
                win.pnl.progBarLabel.text = win.pnl.progBar.value+"%";
                win.update(); 
            var idx, j, sizes, jpegOpt, doc, docName, dF, artBds, abName, scale, jpgFile, destinationFolder, originalImage;
            jpegOpt = new ExportOptionsJPEG();
            jpegOpt.Optimization = true;
            jpegOpt.QualitySetting = 100;
            jpegOpt.blurAmount=0;
            jpegOpt.artBoardClipping=false;
            dF=new Folder(jpgImageFolder);
            if ( !dF.exists ) dF.create();
            doc = app.activeDocument;
            docName=doc.name;
            artBds = doc.artboards;
            idx = artBds.getActiveArtboardIndex();
            abName = artBds[ idx ].name;
               var w= artBds[ idx ].artboardRect[2] - artBds[ idx ].artboardRect[0] ;
               var h=artBds[ idx ].artboardRect[1] - artBds[ idx ].artboardRect[3];
                var width=  100+ ( (size - w)/w ) * 100;
                var height=  100+ ( ( size - h )/h ) * 100;
                jpgFile = File( dF.fsName + '/' + fileName + size + 'x' + size + '.jpg' );
                jpegOpt.horizontalScale =width;
                jpegOpt.verticalScale = height;
                doc.exportFile( jpgFile, ExportType.JPEG ,jpegOpt );
                win.close();

  • Runtime error when trying update Itunes

    When I try to open iTunes, I get the Microsoft Visual C++ Runtime Library Error R6034.  I tried to repair iTunes, but received the same error.  I uninstalled iTunes and tried to re-install it, but am still receiving the same error code.  How can I fix this error?

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99286)

  • Runtime exception with ADG when compiled with ANT

    Hi,
    We are using Advanced Data Grid in our project and it compiles and produces a correct SWF file when compiled using the licensed FlexBuilder. This work fine for the development environment, but for the testing and staging environments we use ANT to automate the build process of both Flex and Java components.
    When the swf is built using ANT, we get a runtime exception when the page containing the ADG is accessed in web browser. The exception is
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at mx.controls::AdvancedDataGridBaseEx/getSeparator()
    at mx.controls::AdvancedDataGridBaseEx/createHeaderSeparators()
    at mx.controls::AdvancedDataGrid/createHeaderSeparators()
    at mx.controls::AdvancedDataGridBaseEx/drawSeparators()
    at mx.controls::AdvancedDataGridBaseEx/updateDisplayList()
    at mx.controls::AdvancedDataGrid/updateDisplayList()
    at mx.controls.listClasses::AdvancedListBase/validateDisplayList()
    at mx.managers::LayoutManager/validateDisplayList()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()
    at mx.core::UIComponent/callLaterDispatcher()
    Can you please suggest me how to fix this error?
    Thanks in advance.

    On forums of slackware there was a reference towards the program "free" which is being executed from /usr/bin/free whereas the program on slcakware resides in /bin/free or vice versa. Creating a ymlink should solve the problem. Dunnow (yet) if that works
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Heather Connery ([email protected]):
    I have installed Oracle 8.1.7 on Red Hat 6.2.
    When I attempt to create a database using dbassist i get an exception during event dispatching:
    java.lang.NumberFormatException 41%
    at java.lang.RuntimeException.<init>(Compiled Code)
    etc.......
    Does anyone know if this is a JRE bug? Any ideas what could be wrong here?<HR></BLOCKQUOTE>
    null

  • Runtime exception occurred during application mapping "EXCEPTION_DURING_EX"

    Hi Gurus,
    I am getting following error in MONI:
    SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
      <SAP:P1>com/sap/xi/tf/_MM_MDM_CMS_Backfeed_Group_</SAP:P1>
      <SAP:P2>com.sap.aii.mappingtool.tf7.MessageMappingExceptio</SAP:P2>
      <SAP:P3>n: Runtime exception when processing target-field</SAP:P3>
      <SAP:P4>mapping /ns0:BackfeedGroup/group/MasterId; root m~</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MDM_CMS_Backfeed_Group_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:BackfeedGroup/group/MasterId; root m~</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    I have tried to refresh the mapping cache and restart the message but stil this message persists.
    For me it seems an issue with a wrong mapping or some wrong value in the inbound scenario.
    Please suggest if any one of you had come across this error before.
    With Reg,
    Vikash

    Hi Vikash
    Whenever you have a problem in your mapping you will get this kind of error in monitoring
    According to your log the problem is in parameter  /ns0:BackfeedGroup/group/MasterId
    First of all check your mapping. If it is fine than check the value of this parameter from your payload.
    Also try to copy your xml and test the mapping in IR. Check wether you are getting same error there .
    If same error comes than try to manipulate the value of that field and try the same test again
    Regards,
    Shradha

  • Runtime Exception for Transaction MEREP_MON

    Can you please help me solving this problem?
    For last 3 days I am getting runtime exception for Transaction MEREP_MON. Error description is Time limit Exceeded.
    This is coming only for Direction Outbound ( When I chcking OutBound Checkbox) at the top left corner.
    For Inbound and Distribution it is working fine.
    I tried with MEREP_PURGe and purging all inbound and outbound data.

    Hi Baskar,
    I changed the mapping. I removed the ABS function. It's still throwing the same error. Now when I copy the payload from SXMB_MONI and test in Mapping in ESR, it's working fine. But the same source file throws error in SXMB_MONI. The xml that works in Test tab should certainly work in SXMB_MONI also, shouldn't it?
    So I guess it is a different error.
    Runtime exception occurred during application mapping com/sap/xi/tf/_MM_INFRECMASS_ECC_to_MDM_; com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:MT_INFRECMASS_Receiver/INFREC_Receiver
    I must add that the INFREC_Receiver is the root node of the target file and I have kept it 0..unbounded and fields 0...1. But the source has many segements of the Idoc, so should I change them ?
    Harish Babu

  • Runtime exception for other than programming error.

    In a conversation the question arose whether it could be a case of throwing a runtime exception for anything other than a bug. The tutorial on oracle site says "These Usually Indicate programming bugs" leading to think that can be used in situations in which there is no bug.
    Anyone have a practical example of a runtime exception when there is no bug?
    Thanks.

    937643 wrote:
    Ok. But. Do you think that in these cases the use of a runtime exception could be considered a bad practice?That's actually a matter of some debate.
    On the one hand, Java has defined two major kinds of exceptions since the very beginning (unchecked exceptions, which are RuntimeException, Error, and their descendants; and checked exceptions which are everything else). The intended use of those was that checked exceptions should be for things that can normally go wrong in the execution of a program, even without a bug or without a major internal JVM error, such as a failed attempt to persist something or a network connection dropping--stuff that a programmer might normally be expected to deal with; while unchecked exceptions were created for things that a programmer would not normally handle in his code (except possibly at major architectural boundaries), like buggy code or an internal JVM failure.
    With the rule about having to catch or declare checked exceptions, but not unchecked ones, that makes it easy for programmers so say, "Okay, I know exactly what can go wrong here that I might be expected to handle and I can therefore choose what to do with it; there will be no surprises. But I don't have to deal with problems that are outside my normal responsibility, like somebody passing me a null when they shouldn't have." It gives a programmer a nice bit of control, and the ability to know he hasn't missed something, kind of like the type safety provided by a strongly typed language.
    At least that's the theory.
    In practice, most checked exceptions either just get bubbled up to the next layer (via a throws clause), or caught wrapped in a fairly generic layer-appropriate exception and rethrown. There's not a whole lot of use made of what checked exceptions provide, and there's a lot of ugly boilerplate code that doesn't do anything useful for the app but is just there to satisfy the compiler.
    So, some people think that checked exceptions are useless, or mostly useless, and favor unchecked exceptions in most or all cases. I believe that's part of the philosophy of Spring, but I'm not totally sure.
    The idea is that since most of the time you can't do anything about exceptions that might be thrown to you, it's wasteful and pointless to have all that code to catch and rethrow. In this viewpoint, it would be better if, for example, not providing a throws clause at all meant that you could throw any exception. Any given code can still catch specific exceptions that it knows it can handle, but we don't have to write a bunch of code notating something that we're not really doing anything about.
    Personally, I used to be totally in the checked exception camp. However, all the pointless boilerplate is wearing me down. I'm still not completely convinced though, and here's why: If I'm calling a method, I'd like to at least be able to see what might go wrong, so that I can decide how to deal with it. If all exceptions were unchecked, and the throws clause were optional, a conscientious developer could still provide it, and list the unchecked exceptions his method might throw to me, and/or he could document them in the javadoc comments. But a lot of developers won't do that, or even if they start to, as their method evolves, without the compiler to enforce it, they won't keep it up to date.
    So there are advantages to both approaches. I personally would to know that the information will always be available to me, but for the small percentage of the time where I actually use it (like handle one specific exception one way and some other exception differently), I'm not sure if it's worth the overhead.

  • Runtime exceptions - Help!

    Hello, it's little ol' me again with my little ol' password generator applet. It compiles fine, but when I run it, I get all kinds of runtime exceptions when I click on any of the checkboxes. I have pored over this code til I'm blue in the face. I personally see nothing wrong with the code, but I'll post it here in case any of you might spot something suspicious.
    // My Javafied Password Generator
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class PwGenerator extends JApplet
      private String pw;
      private JPanel centerPanel, northPanel, southPanel;
      private JComboBox numchars;
      private JCheckBox lettersUpper, lettersLower, numbers, specialChars;
      private JButton generate, reset;
      private JTextField textfield;
      private static int asciiRange[];
      private String pwLength[] = {"6", "7", "8", "9", "10", "11", "12"};
      private int lengthSelected;
      private JLabel pwLabel, numCharLabel;
      public void init()
        // instantiate widgets
        numCharLabel = new JLabel("Number of characters for password");
        numchars = new JComboBox(pwLength);
        lettersUpper = new JCheckBox("Uppercase letters");
        lettersLower = new JCheckBox("Lowercase letters");
        numbers = new JCheckBox("Numbers");
        specialChars = new JCheckBox("Special characters");
        generate = new JButton("Generate password");
        reset = new JButton("Clear");
        textfield = new JTextField(12);
        pwLabel = new JLabel("Your new password is: ");
        // add widgets to the content pane
        Container c = getContentPane();
        c.setLayout(new BorderLayout());
        centerPanel = new JPanel();
        centerPanel.setLayout(new GridLayout(3, 2));
        centerPanel.add(lettersUpper);
        centerPanel.add(lettersLower);
        centerPanel.add(numbers);
        centerPanel.add(specialChars);
        centerPanel.add(generate);
        centerPanel.add(reset);
        c.add(centerPanel, BorderLayout.CENTER);
        northPanel = new JPanel();
        northPanel.setLayout(new FlowLayout());
        northPanel.add(numCharLabel);
        northPanel.add(numchars);
        c.add(northPanel, BorderLayout.NORTH);
        southPanel = new JPanel();
        southPanel.setLayout(new FlowLayout());
        southPanel.add(pwLabel);
        southPanel.add(textfield);
        c.add(southPanel, BorderLayout.SOUTH);
      }  // end init
      public void start()
      // connect event handlers to the widgets
        numchars.addItemListener(new ItemListener() {
         public void itemStateChanged(ItemEvent e)
           lengthSelected = Integer.parseInt(pwLength[numchars.getSelectedIndex()]);
        CheckBoxHandler handler = new CheckBoxHandler();
        lettersUpper.addItemListener(handler);
        lettersLower.addItemListener(handler);
        numbers.addItemListener(handler);
        specialChars.addItemListener(handler);
        generate.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e)
           pw = generatePw(lengthSelected);
           textfield.setText(pw);
        reset.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e)
           textfield.setText("");
      } // end start---snip---
    private class CheckBoxHandler implements ItemListener
        public void itemStateChanged(ItemEvent e)
          if (e.getSource() == specialChars)
         if (e.getStateChange() == ItemEvent.SELECTED)
           for (int i=33, j=0; i<=47; i++, j++)
             asciiRange[j] = i;
           for (int i=58, j=asciiRange.length; i<=64; i++, j++)
             asciiRange[j] = i;
           for (int i=91, j=asciiRange.length; i<=96; i++, j++)
             asciiRange[j] = i;
           for (int i=123, j=asciiRange.length; i<=126; i++, j++)
             asciiRange[j] = i;
            } // end inner if
          } // end outer if
          if (e.getSource() == numbers)
         if (e.getStateChange() == ItemEvent.SELECTED)
           for (int i=48, j=asciiRange.length; i<=57; i++, j++)
             asciiRange[j] = i;
          if (e.getSource() == lettersUpper) 
         if (e.getStateChange() == ItemEvent.SELECTED)
           for (int i=65, j=asciiRange.length; i<=90; i++, j++)
             asciiRange[j] = i;
          if (e.getSource() == lettersLower)
         if (e.getStateChange() == ItemEvent.SELECTED)
           for (int i=97, j=asciiRange.length; i<=122; i++, j++)
             asciiRange[j] = i;
    }     Your help will be greatly appreciated like before.
    Syster Tara

    And as a prediction, I can see some ArrayIndexOutOfBounds errors in your near future.
    Starting j at j=asciiRange.length
    and then doing asciiRange[j] = i
    Remember an array is numbered from 0 to length-1
    And no, arrays don't grow dynamically.
    Cheers,
    evnafets

  • Runtime exception: nosuchmethoderror Connection.clearCachedStatementInterna

    Hi,
    I have deployed our java ear to a new weblogic server and am getting the below runtime exception when attempting to read from the database.
    The same ear works fine in other weblogic servers.
    My feeling is there is a version mismatch in some jars.
    Which jar file contains the weblogic.jdbc.wrapper.Connection class?
    thanks,
    Brian
    Runtime exception: nosuchmethoderror weblogic.jdbc.wrapper.Connection.clearCachedStatementInternal.

    SocketHostAddressSecurityFilter=127.0.0.1|0:0:0:0:0:0:0:1|*.*.*.*
    #Database Variables
    DatabaseType=oracle
    JdbcDriver=oracle.jdbc.OracleDriver
    JdbcConnectionString=jdbc:oracle:thin:@localhost:1521:ORCL
    JdbcUser=system
    JdbcPassword=managed
    JdbcPasswordEncoding=managed
    DatabasePreserveCase=1
    SystemDatabase:DataSource=CSDS
    SystemDatabase:UseDataSource=true
    #Internet Variables
    HttpServerAddress=OEL5vm.local:16200
    MailServer=mail
    SysAdminAddress=[email protected]
    SmtpPort=25
    HttpRelativeWebRoot=/cs/
    UseSSL=No
    #General Option Variables
    GetCopyAccess=false
    ExclusiveCheckout=false
    IsAutoNumber=true
    AutoNumberPrefix=OEL5vmlocal162
    AuthorDelete=false
    ShowOnlyKnownAccounts=false
    UseAccounts=1
    IsJspServerEnabled=0
    JspEnabledGroups=
    #Additional Variables
    AllowUpdateForGenwww=1
    IdcServerThreadQueryTimeout=180
    DatabaseConnectionKeepAliveInterval=180
    IntradocServerPort=4444

  • BPEL sensor update to BAM: unknown runtime exception

    Hi,
    In my proyect I have a BPEL with several sensors that first insert a data object in BAM 10.1.3.3, and later update it with process stats.
    In a BAM Report I could see the inserted Data Object, but when I am expecting the update information it only appear several "unknown runtime exception" in red text in the foot of the report. But when I make a manual refresh or reopen the report, I could see the dataobject with the updated info OK.
    Also, in the Architect I always see the data object with the info OK.
    I think that are some problem with the Report Engine, but in the log don`t have info about this exception.
    Anybody has any idea about this error?
    thanks

    I think the Report had some problem. I made the report from the scratch with the same data object and the exception disapear.

  • Exception when retreiveing list from JNDI when the list updates at the same time.

    Hi
    I get a Exception when i am retreiving a list from the jndi:
    Start server side stack trace:
    com.sun.java.util.collections.ConcurrentModificationException
    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
    com.sun.java.util.collections.ConcurrentModificationException.<init>(Concurr
    entModificationException.java:48)
    at com.sun.java.util.collections.HashMap$HashIterator.next(Compiled
    Code)
    at
    weblogic.jndi.toolkit.ReadOnlyMapBasedNamingStore$1.nextElement(Compiled
    Code)
    at weblogic.jndi.toolkit.AbstractNamingEnumeration.next(Compiled
    Code)
    at
    weblogic.jndi.toolkit.AbstractNamingEnumeration.nextElement(Compiled Code)
    at
    weblogic.utils.enumerations.BatchingEnumerationBase.nextBatch(Compiled Code)
    at
    weblogic.utils.enumerations.BatchingEnumerationBase_WLSkel.invoke(BatchingEn
    umerationBase_WLSkel.java:66)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled
    Code)
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled Code)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
    5)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    End server side stack trace
    It says in the documentation of the weblogic server that: if the jndi is
    updated while you are retreiving the list from the server, you will only get
    the old list.
    And that is ok for me. But insted i get this exception that interupts the
    list retreiving. And if i just catch this exception an just continue or
    start again, it comes over and over.
    the code that does this, is like this:
    InitialContext context = new InitialContext(env);
    NamingEnumeration list = context.listBindings("sid");
    Vector copy = new Vector(10000,1000);
    log("Initiating copy of JNDI list!");
    try
    while (list.hasMore())
    copy.addElement(list.next());
    catch (Exception e)
    log("Copying interupted:" + e.toString());
    How can i solve this ?
    Is it a configuration of the server problem ?
    Are ther other ways of retreiving the list ?
    -Ståle Tomten

    Be carefull - you read Object two times, so if you
    have only one object you will get null after second
    reading, and NullPointerException as a result if you
    try to do smth with null.
    Wrong:
    while( inputFromServlet1.readObject() != null)
    Object o = inputFromServlet1.readObject();Previous man example is also wrong because you
    cannot declare anything in while
    Sorry for this one... I certainly must have spent too much time on these fora ;-)
    Thanks for the correction, by the way...
    Correct:
    Object o;
    while( (o = inputFromServlet1.readObject()) != null)
    String str = (String)o;
    System.out.println("Got Object");

  • Why Application doesnt stop when a runtime exception occurs

    Hi All,
    When we are writing a program and if it throws a Runtime Exception occurs it halts. Right? But if we are deploying an application in any server and id the app throws a Runrime Exception, the application doesnt halts?
    What is the logic behind this? What must be the appserver playing a role in this situation?
    Regards
    Naveen

    It's up to the programmer. With a simple stand alone program there's generally no point in it continuing past a runtime error, because if there's a runtime error you need to fix the program and try again.
    On the other hand a server is likely to be running a number of fairly independant activities. For example there may be a program error in one servlet, for one web page, but the rest of the site may be fine. So it's more sensible to log the error, report an error to the user, and continue.
    Also with threading a runtime error typically kills only the one thread, not the rest of the application.
    You can chose to catch any kind of exception (except for the very rare JVM errors).

Maybe you are looking for

  • How to add zooming and printing in e-magazine created by indesign?

    Could you please give ma an advise me how to add zooming and printing in e-magazine created by indesign? Many thanks

  • HELP-Incoming messages not seen in Inbox

    It seems after installing 10.6.3 a snet.net (now AT&T) mail account (POP3) stopped displaying new messages. No messages are displayed after April 2 at 10:26am. If I select "Get Mail" it tells me those messages are coming in through incoming mail but

  • BAPI is storing as external user

    Hi We are updating the parked invoice (MIR7) with function module MRM_INVOICE_PARK (This is not an RFC function module, but we created an RFC function module which uses MRM_INVOICE_PARK) from NON-SAP system. Updates happens perfectly without any issu

  • Stacks seem to be a step backwards

    I really don't like the way that Stacks work. You can't get into sub folders without opening a finder window. I used to just drag my Apps folder to the Doc and was able to access everything in it. Including what was in the sub folders. I sure hope th

  • RMI in Linux

    Hi, I have some questions. Hope you can help me..thanks..i have a situation like this: I have built a server and client program using RMI. But, i want to run my server and client program in different operating system. i run my server in Windows envir