Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ELContextCleaner failed because cannot access a member of class javax.el.BeanELResolver with modifiers "private static final" #6980

Closed
olamy opened this issue Oct 12, 2021 · 6 comments · Fixed by #6981
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@olamy
Copy link
Member

olamy commented Oct 12, 2021

Jetty version(s)
10.0.6

stacktrace:

[main] WARN org.eclipse.jetty.servlet.listener.ELContextCleaner - Cannot purge classes from javax.el.BeanELResolver
java.lang.IllegalAccessException: class org.eclipse.jetty.servlet.listener.ELContextCleaner cannot access a member of class javax.el.BeanELResolver with modifiers "private static final"
	at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
	at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
	at java.base/java.lang.reflect.Field.checkAccess(Field.java:1075)
	at java.base/java.lang.reflect.Field.get(Field.java:416)
	at org.eclipse.jetty.servlet.listener.ELContextCleaner.purgeEntries(ELContextCleaner.java:91)
	at org.eclipse.jetty.servlet.listener.ELContextCleaner.contextDestroyed(ELContextCleaner.java:56)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:1047)
@olamy olamy added the Bug For general bugs on Jetty side label Oct 12, 2021
@olamy olamy self-assigned this Oct 12, 2021
@olamy
Copy link
Member Author

olamy commented Oct 12, 2021

even if it's only a warning and do not cause more issues. It simply doesn't work the field use by reflection must be marked as accessible.

olamy added a commit that referenced this issue Oct 12, 2021
@olamy olamy linked a pull request Oct 12, 2021 that will close this issue
@janbartel
Copy link
Contributor

@olamy what jvm was this using?

@olamy
Copy link
Member Author

olamy commented Oct 13, 2021

Java version: 11.0.12, vendor: Eclipse Foundation, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
I discovered this by implementing jetty-10 support for Arquillian.
arquillian/arquillian-container-jetty#71

@charlieslade
Copy link

Having the same problem when stopping embedded jetty server.

Is this problem with my code or jetty specific?

jetty version: 10.0.5
jvm version (openjdk): 11.0.10

@joakime
Copy link
Contributor

joakime commented Oct 14, 2021

@charlieslade this is a flaw in the EL API code that Jetty is attempting to work around.

We've filed an issue about this with the Jakarta EL group at jakartaee/expression-language#171
Our attempted work around is currently buggy in Jetty 10 and Java 9+ (which changed the reflection rules).
PR #6981 is the fix we need.

@charlieslade
Copy link

Got it, thanks!

olamy added a commit that referenced this issue Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants