weird java error - java.lang.reflect.InaccessibleObjectException?
Paul B. Henson
henson at cpp.edu
Thu Aug 22 00:40:00 UTC 2024
I restarted one of my idp's earlier today, which I generally do all of the time with no problems (other than the expected rush of NoSuchFlowExecutionException errors right after from those poor people who had loaded the login page but not yet submitted it or were otherwise in the middle of a webflow session).
Today though immediately after restarting, I started seeing ELException errors (which were passed through to clients as a runtime error message on their web browser), basically saying that it could not call WarningIterator.hasNext() due to a java.lang.reflect.InaccessibleObjectException because "module java.base does not "opens java.util" to unnamed module @4eb45fec". It only seemed to be affecting some authentications though, in the midst of all of the errors I did see some successful user logins?
That object is defined in flows/intercept/warning-flow.xml:
<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>
but I have no idea why all the sudden it couldn't be called? Everything I could see about this particular error recommends either "fixing your code" or adding the "--add-opens" jvm argument to work around security restrictions in the jvm.
Neither of those seems to apply? It's the same code that was always running, and after looking at it for a bit and having no idea why it was doing that, I restarted it again and the issue went away, so it was the same code that was successfully running again.
I guess a solar flare hit a memory DIMM at just the wrong time and screwed up some internal jvm state while it was starting? Very weird and very disconcerting not knowing why it happened or if it might happen again out of the blue at some point...
2024-08-21 16:28:10,012 - 2620:df:8000:4702:0:2:800d:1bab/node0z14eizolsvyr15dii518s9huc11 - ERROR [net.shibbo
leth.idp.profile.interceptor:35] - Uncaught runtime exception
org.springframework.binding.expression.EvaluationException: An ELException occurred getting the value for expression 'WarningIterator.hasNext()' on context [class org.springframework.webflow.engine.impl.RequestControlContextImpl]
at org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:104)
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1029E: A problem occurred when trying to execute method 'hasNext' on object of type 'java.util.LinkedHashMap$LinkedEntryIterator': 'Problem invoking method: public final boolean java.util.LinkedHashMap$LinkedHashIterator.hasNext()'
at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:159)
Caused by: org.springframework.expression.AccessException: Problem invoking method: public final boolean java.util.LinkedHashMap$LinkedHashIterator.hasNext()
at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:146)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make public final boolean java.util.LinkedHashMap$LinkedHashIterator.hasNext() accessible: module java.base does not "opens java.util" to unnamed module @4eb45fec
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
--
Paul B. Henson | Operating Systems and Network Analyst
henson at cpp.edu | California State Polytechnic University Pomona
More information about the users
mailing list