Details
Description
When Tests are executed massivley multithreaded, from time to time a ConcurrentModificationException is thrown when JBehave tries to write a report-file.
Trace:
java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:926) at java.util.HashMap$KeyIterator.next(HashMap.java:960) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:54) at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:229) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:208) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.<init>(AbstractReflectionConverter.java:171) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:116) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:72) at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55) at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:229) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:208) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.<init>(AbstractReflectionConverter.java:171) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:116) at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:72) at com.thoughtworks.xstream.core.TreeMarshaller.convert(TreeMarshaller.java:70) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:895) at com.thoughtworks.xstream.XStream.marshal(XStream.java:884) at com.thoughtworks.xstream.XStream.toXML(XStream.java:857) at com.thoughtworks.xstream.XStream.toXML(XStream.java:844) at org.jbehave.core.reporters.CrossReference.outputFile(CrossReference.java:150) at org.jbehave.core.reporters.CrossReference.outputToFiles(CrossReference.java:123) at org.jbehave.core.reporters.CrossReference$1.afterStory(CrossReference.java:234) at org.jbehave.core.reporters.ConcurrentStoryReporter.afterStory(ConcurrentStoryReporter.java:121) at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:324) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:219) at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:180) at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229) at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
Activity
Rainer Frömming
made changes -
Field | Original Value | New Value |
---|---|---|
Priority | Critical [ 2 ] | Major [ 3 ] |
Which version are you using? Can you provide a sample project that reproduces this behaviour?