-
Notifications
You must be signed in to change notification settings - Fork 582
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
jakarta.el.ELException: The class [...] must be public, in an exported package, non-abstract and not an interface #25135
Comments
I'm not too sure about this one and the the specification could be more explicit about interfaces ( mostly because docs just says "static field". The closest text I found is the restrictions section: Looking over https://jakarta.ee/specifications/platform/10/apidocs/jakarta/el/package-summary (specifically the ImportHandler - importStatic:
Package description mentions concrete classes specially: Access restrictions:
There's also the StaticFieldELResolver, but I think the class has to be imported first to be found. I don't think the EL is meant to handle this situation where a static field from an interface is imported. This also applies to abstract classes (as the error indicates) I think this also explains why the en masse import also fails: #24182 It seems like it could handle this situation though, but it would need to be fixed via the API. It is possible to the field: for example:
However, I don't see much use for this scenario. If no one has asked for this then it's probably not worth pursuing. |
Assigning to @chungngoops Edit: Name doesn't show up here? |
…d-test #25135 fix static imports from interfaces in JSPs via EL
Describe the bug
An ELException occurs when a JSP imports static field from an interface.
Steps to Reproduce
A JSP using the pages 3.1 feature imports a static field via an interface.
For example:
<%@ page import = "static io.openliberty.pages31.fat.misc.other.SomeInterface.DEFAULT" %>
Expected behavior
No errors should occur.
Diagnostic information:
Additional context
Also reported in Tomcat: https://bz.apache.org/bugzilla/show_bug.cgi?id=66582
The text was updated successfully, but these errors were encountered: