I have a hard-to-diagnose problem. I have a web app that uses JPA and JAXB
as standalone components -- i.e., not part of EJB. The app is running at a
customer site on Tomcat 5.5.23 and Java 6u1 on Windows Server 2003.
After over a month of successful running, suddenly an
ArrayIndexOutOfBoundsException began occurring during a call to
Marshaller.marshal(). Obviously, something that I'm passing to marshal()
must be somehow corrupted, but it's not at all clear what or how. This
section of code has been hit thousands of times without errors. The customer
claims that no changes have been made anywhere (heard that before? :-)
Once the AIOOBE started happening, it continued to happen each time through
this section of code -- each time that a client hit the server in a way that
exercised the problem code, which is hundreds or thousands of times a day.
Not surprisingly, I'm unable to reproduce the customer conditions and see
the error on my development network.
One more thing. Restarting the server fixes the problem. No other changes.
Just restart Tomcat and wait for the clients to hit the server, which will
happen almost instantly, and all is well.
The JAXB version in use would be whatever shipped with Java 6u1.
Any ideas what could be wrong or how to diagnose it? I could obviously more
heavily instrument the code around the problem area, but I might have to
wait another month to see any data. And who's to say it will happen again in
one more month? Could be sooner. Could be longer. It doesn't look like a
thread collision issue that finally showed up under heavy load, but I guess
anything is possible. I have been cognizant of thread safety during
development of the server, but that's not to say I made no errors.
Thanks for any ideas.
Johnny S. Tolliver
Oak Ridge National Laboratory
tolliverjs_at_ornl.gov, 865-574-1305