This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I am facing ArrayIndex out of bound issue while marshaling a xml request. It works sometimes and sometimes it does not work and throws exception. If i am sending a single request it works but when it is running in a a part of parallel threads it throws exception.
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
Occasional errors which happen only when you have multiple threads running? That almost certainly means that you're sharing an object between two (or more) threads, and that object isn't threadsafe. In other words, it isn't designed to be used by more than one thread at a time.
So go through your code and make sure you aren't doing that. For a start make sure that each thread uses its own marshaller, and if that doesn't fix the problem then you'll have to look more closely.