[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] java.lang.reflect.InaccessibleObjectException error in webapp
|
On 8/22/2024 5:22 PM, Greg Wilkins via jetty-users wrote:
With previous non-deterministic failures in classloading like this, it
has often walked,quacked and looked like a race... but in the end has
often turned out to be an ordering issue. If an unordered collection is
being used somewhere, then when it is initialized can often affect the
iteration order. Even listing items from the file system can have
strange ordering behaviours.
Little out of my depth here, sorry; do you mean the ordering of the
specific object being iterated over that is returning the
InaccessibleObjectException exception?
In this particular case, the exception is showing up while processing a
spring webflow, specifically the call to hasNext in:
<on-start>
<evaluate
expression="WarningConditionMap.entrySet().iterator()"
result="flowScope.WarningIterator" />
</on-start>
<decision-state id="CheckIterator">
<if test="WarningIterator.hasNext()" then="CheckCondition"
else="proceed" />
</decision-state>
The WarningConditionMap is wired from xml, and in my configuration is:
<alias name="shibboleth.warning.ConditionMap"
alias="WarningConditionMap" />
<util:map id="shibboleth.warning.ConditionMap">
<entry key="expiring-password">
<bean parent="shibboleth.Pair">
<constructor-arg index="0">
<ref bean="check_password_expiration" />
</constructor-arg>
<constructor-arg index="1">
<bean class="java.time.Duration"
factory-method="parse" c:_0="PT12H" />
</constructor-arg>
</bean>
</entry>
</util:map>
I think the default spring util:map is a hash map, which isn't ordered?
And then I only have one object in the map, so it doesn't really matter
how it is ordered as far as which one gets returned first and only :).
Or perhaps you meant some other object initialized someplace else, in
which case I apologize for my confusion.