Solved

URGENT:: Why do I get this thread exception in Java?

Posted on 2013-10-29
1
376 Views
Last Modified: 2013-10-29
Hi,
I have a code in Java which creates a GUI and this GUI runs a command line tool and it processes the output to visualize the results.

While doing that I create a work thread and do the other CLI operations on this thread so that the GUI does not freeze during this time.

However, I sometimes get the following exception:

Exception in thread "Thread-1" java.util.ConcurrentModificationException
        at java.util.ArrayList.writeObject(Unknown Source)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
        at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
        at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
        at java.io.ObjectOutputStream.writeObject0(Unknown Source)
        at java.io.ObjectOutputStream.writeObject(Unknown Source)
        at com.something.CSFilteringCheckBoxes.s
etTableDataInitialData(CSFilteringCheckBoxes.java:399)
        at com.something.RunPerl.runMtcheck(RunP
erl.java:202)
        at com.something.ToolBarListener$1.run(T
oolBarListener.java:278)
        at java.lang.Thread.run(Unknown Source)

Open in new window



Why do I sometimes get this exception and how can I prevent this happen?

I put urgent in the title because I need to fix this problem by the end of today. Sorry about it.
0
Comment
Question by:Tolgar
1 Comment
 
LVL 18

Accepted Solution

by:
Steven Harris earned 500 total points
ID: 39610256
Check the following:

CSFilteringCheckBoxes line 399;
RunPerl line 202;
ToolBarListener line 278
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Selenium docs api java index 3 64
Generate Unique ID in VB.NET 21 100
wild fly 8 startup error 2 37
AvlTree-Node Data type 4 22
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question