| Summary: | NPE caused by concurrent usage of Query.setHint on named query with join-fetch/batch | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Sven Hoffmann <sven.hoffmann> | ||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | critical | ||||||||||
| Priority: | P2 | CC: | andrei.ilitchev, tom.ware | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Other | ||||||||||
| OS: | other | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Sven Hoffmann
Created attachment 207346 [details]
Stacktrace of NullPointerException
Please describe the level of concurrency (i.e. what is shared between threads?) Is it the EntityManager? The EntityManagerFactory? The query? (In reply to comment #2) > Please describe the level of concurrency (i.e. what is shared between threads?) > > Is it the EntityManager? The EntityManagerFactory? The query? The application (stateful session bean) shares none of these. James in http://www.eclipse.org/forums/index.php/mv/msg/262488/758040/#msg_758040 > The issue is although the hint causes different queries to be used, the same expression is still used, causing the concurrency issue. As far as I understood James in the related post the expression of the named query is internally shared between threads. Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next. Created attachment 212173 [details]
Suggested patch (for trunk)
The patched checked into both trunk and 2.3.3. Created attachment 212300 [details]
Test fix - the test should not run on app. server
The patched checked into both trunk and 2.3.3. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |