wood burning stoves 2.0
The moose likes XML and Related Technologies and the fly likes Error in FOP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Error in FOP" Watch "Error in FOP" New topic

Error in FOP

Ananth Venugopal

Joined: May 31, 2006
Posts: 2
Hi All,

I'm supposed to generate PDFs out of Data in XML. I use Apache FOP for the same. I'm generating whole bunch of PDFs through a batch script on an AIX machine. This is working fine without any issues.
However, now i'm supposed to do the same with a web application that runs on WebSphere Application Server on the same AIX machine.
My code looks like this:

When I try to run it on the server, it gives out an exception saying

java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[Servlet.Engine.Transports : 0,5,main]

on the line where i'm instantiating the "Driver" class in the Code extract mentioned above.

Here's the StackTrace of the Exception:

Can anybody please Explain and help me out of this?

-- Ananth
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037

Means that one thread is trying to modify a collection while another thread is iterating through it - see the Javadocs for that exception. I suspect either:
1. Multiple requests are simultaneously trying to use "Driver" code that is not ThreadSafe.
2. Objects used in one request have not been properly cleaned up when the next request arrives.
I agree. Here's the link: http://aspose.com/file-tools
subject: Error in FOP
It's not a secret anymore!