Solved

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

Posted on 2013-10-29
1
377 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
A short article about a problem I had getting the GPS LocationListener working.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

734 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