Concurrency error causes `IllegalStateException` on `BeanPropertyMap`
See original GitHub issueHi, I suspect a concurrency error maybe similar to Issue #1578. It appears randomly on fresh tomcat startup, with first REST calls through CXF jaxrs. I was not able to reproduce on development environment.
BeanPropertyMap.java - line 728:
throw new IllegalStateException("Illegal state: property '"+prop.getName()+"' missing from _propsInOrder");
Somewhere _hashArea
and _propsInOrder
are losing the correlativity objects they own.
The only clue:
Debugging I have seen in both arrays an “@Id” ObjectIdValueProperty
bean but different objects in memory,
so that
if (_propsInOrder[i] == prop) {
miserably fails 😦
(BeanPropertyMap.java - line 724)
Files attached:
-
StackTraceError.log error.log
-
The JSON received. (It is always the same json and the same java model.) response.json.log
-
The Customized ObjectMapper we use CustomObjectMapper.java.log
I hope your help, thank you very much
Sorry for my English!!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Ok. One possible source of problem was mutability of
BeanPropertyMap
, in one specific case (when adding a new property). I changed that to make a proper full copy, just like javadocs claimed should already have been done. I don’t have a way to verify whether this solves the problem but it seems like it should help. For now I assume this does solve the problem; change will be in2.9.6
. If not, may be reopened if verified against2.9.6
once that is released (it is not yet out), or against build from2.9
branch.For what it is worth, code in
master
(for 3.0) already had rewritten version of this class, which should have same problem.No, there are no static references to it anywhere; every
ObjectMapper
has its own separate copy. I try very hard not to have any static singletons that could leak state across mappers and this cache definitely would be problematic.