[
https://issues.apache.org/jira/browse/OPENJPA-2507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056409#comment-14056409
]
Kevin Sutter edited comment on OPENJPA-2507 at 7/9/14 4:15 PM:
---------------------------------------------------------------
No plans currently. We're working through some issues with Java 7, Java 8,
ASM, and Serp on trunk (2.4.0)... Once these items get addressed, then we
could entertain a possible 2.4.0 release. To be honest, if you require this
change in a formal release, you might want to pursue this fix in one of the
service streams and pushing for a service release. Thanks.
was (Author: kwsutter):
No plans currently. We're working through some issues with Java 7, Java 8,
ASM, and Serp... Once these items get addressed, then we could entertain a
possible 2.4.0 release. To be honest, if you require this change in a formal
release, you might want to pursue this fix in one of the service streams and
pushing for a service release. Thanks.
> Weird EmptyStackException in CriteriaQueryImpl
> ----------------------------------------------
>
> Key: OPENJPA-2507
> URL: https://issues.apache.org/jira/browse/OPENJPA-2507
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.2.0, 2.3.0, 2.4.0
> Environment: openjpa 2.2.0 & 2.3.0, spring-data-jpa up to 1.4.2
> Reporter: Ioannis Alexandrakis
> Assignee: Kevin Sutter
> Priority: Minor
> Labels: criteria_api, openjpa
> Fix For: 2.4.0
>
> Attachments: OPENJPA-2507-Wrap-ContextStack-in-ThreadLocal.patch,
> exceptions.txt, openjpa-exception-demo.zip
>
>
> Using spring-data-jpa with openjpa, I sometimes encounter a strange error
> (not all the times, but under heavy load it makes its appearance, sparsely
> though):
> ....
> Caused by: java.util.EmptyStackException
> at java.util.Stack.peek(Stack.java:<arbitrary line>)
> at
> org.apache.openjpa.persistence.criteria.CriteriaQueryImpl.ctx(CriteriaQueryImpl.java:<arbitrary
> line>
> ....
> I do not know which behaviour triggers it, however I think it would be an
> improvement to change (I did not know where exactly to file it, because it is
> both an improvement and a bug in my opinion), in
> org.apache.openjpa.persistence.criteria.CriteriaQueryImpl, method: Context
> ctx(), this:
> return _contexts == null || _contexts.isEmpty() ? null : _contexts.peek();
> to something like this:
> try {
> return _contexts == null || _contexts.isEmpty() ? null :
> _contexts.peek();
> } catch (EmptyStackException e) {
> return null;
> }
> , in order to prevent a case where multiple threads modify the "_contexts"
> between the evaluation of the inline "if".
> I am not able to reproduce it all the time, thus I can't create a useful
> test, neither have I created a patch due to the simplicity of the 'fix'.
> However I believe it is a harmless fix which could be considered a minor
> improvement.
--
This message was sent by Atlassian JIRA
(v6.2#6252)