openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "michael.couck" <>
Subject Memory leak
Date Tue, 24 Aug 2010 08:07:21 GMT


I am an avid fan of OpenJpa, been using it for years, no problems at all,
good work! Nice error messages, had a look at the code too, also good and
the documentation has no drivel, just to the point. However I have to
mention that I have found a memory leak, reproducable of course.

I am using no caching. Windows, Java 1.6, Spring, Bitronix, OpenJpa,
BirtonixPoolingDataSource, DB2. I am inserting several million records in a
table, at about 100 per second, but every second one of the objects that get
inserted doesn't get collected, the real object, in this case it is an
Event, and the enhanced object something like xxx*xxx*xxx*Event.

I saw the leak and it is immediately apparent where it is, but I didn't
believe it, so I tried for days to find the meak in my own code. Couldn't
because the objects are allocated on the stack, so once the method exists
they get collected. So I reluctently switched to Hibernate, took about an
hour to do the changes. And the meak disappeared completely, so I can only
conclude that the leak is in OpenJpa.

I profiled with VisualVM and CodePro, with the same results. I could switch
back to OpenJpa (have the configuration already of course) and profile again
and save the snapshots, in both OpenJpa and Hibernate for comparison if

Anyone else seen this?

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message