stack trace due to: ExceptionInInitializerError
"java.util.MissingResourceException: Can't find javax.faces.LogStrings bundle from"
where call to currentUserName() brings in ImpersonatedUserHolder and ultimately its proxy results in going down a code path to attempt to bring in JSF:
this class is part of
referenced by both isis-commons and isis-applib.
first attempt to solve this was to exclude the JSF classes. However, as they are part of the overall javaee-api jar file (for JavaEE v8), this is suprisingly difficult to do ... that is not a simple aggregator of the respective specs in the JavaEE. And that approach increases the maintenance effort.
And in any case, it just moved the exception but didn't completely resolve it ... the exception was being thrown in a static initializer of a proxy for `ImpersonatedUserHolderWithSession`, as this latter class is annotated as `@RequestScoped` but was called outside of an http request.
The fix I've used is to remove that annotation and instead to use RequestContextHolder that can check if there's a thread-local that contains an HttpRequest. This allows us to keep the dependency on javaee-api.