openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raimund Klein <>
Subject Occasional IllegalArgumentException (Illegal Capacity) inside ManagedCache
Date Tue, 14 Apr 2015 11:30:28 GMT
Hi all,

We are using OpenJPA 2.2.0 as part of our JBoss Fuse installation. Every couple of months
we run into a stack trace such as this one:

Caused by: <openjpa-2.2.0-r422266:1244990 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
Illegal Capacity: -12
at org.apache.openjpa.kernel.BrokerImpl.detachAll(
at org.apache.openjpa.kernel.DelegatingBroker.detachAll(
at org.apache.openjpa.persistence.EntityManagerImpl.clear(
at org.apache.aries.jpa.container.impl.EntityManagerWrapper.clear(
at org.apache.aries.jpa.container.context.transaction.impl.SynchronizedEntityManagerWrapper.clear(
at org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.createNamedQuery(

... 90 more
Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -12
at java.util.ArrayList.<init>([:1.7.0_55]
at org.apache.openjpa.kernel.ManagedCache.copy(
at org.apache.openjpa.kernel.BrokerImpl.getManagedStates(
at org.apache.openjpa.kernel.BrokerImpl.detachAllInternal(
at org.apache.openjpa.kernel.BrokerImpl.detachAll(
... 101 more

Once this has occurred, the only way to recovery is a platform restart.

Our impression is that this is a multithreading issue inside OpenJPA. Hoping for the best,
we've upgraded to 2.2.2 just now and will test with this one, but I'd just like to know if
anyone has encountered this before and maybe can help us with an idea what's going here? We
scanned the recent release notes, but haven't found anything like this mentioned.

Kind regards

Raimund Klein
Technical Architect

t. +44 (0)203 657 0481<>



This message contains confidential and proprietary information of the sender, and is intended
only for the person(s) to whom it is addressed. Any use, distribution, copying, disclosure
or taking of any action in reliance upon it by any other person is strictly prohibited. If
you have received this message in error, please notify the e-mail sender immediately, and
delete the original message without making a copy. Monitise accepts no liability if this email
harms any systems or data of the recipient (including as a result of software virus infection
or where this e-mail is modified or amended in any way during or following transmission) or
if this email is accessed by anyone other than the person(s) to whom it is addressed.

The Monitise group includes Monitise plc (Reg. No. 6011822), Monitise Group Limited (Reg.
No. 5590897), Monitise International Limited (Reg. No. 5556711), Monitise Europe Limited (Reg.
No. 4831976) and Mobile Money Network Limited (Reg. No. 7153130). These companies are registered
in England and Wales and their registered office address is 95 Gresham Street, London, EC2V
7NA United Kingdom.

This email message has been delivered safely and archived online by Mimecast.
For more information please visit 
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message