-
Notifications
You must be signed in to change notification settings - Fork 99
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
ExceptionInInitializerError in Keycloak: error found in ResourceLoader #79
Comments
@MoreDreadd Are you also using Android with zxcvbn4j? |
@vvatanabe no, I am running the program on Windows 10 |
@MoreDreadd In this case, ClassLoader.getSystemResourceAsStream(path) in the 12th line is executed, is it also null? |
Fix a ExceptionInInitializerError in Keycloak: error found in ResourceLoader #79
@MoreDreadd I fixed it and released 1.3.2. Please check it! |
@vvatanabe I just checked and unfortunately it still doesn't work. |
@MoreDreadd
|
fallback in the process of getting the resource as a stream (#79)
@MoreDreadd I released 1.3.3 include #81. Please check it! |
Hi team,
I wanted to use this library to create a Keycloak extension checking for the strength of the password.
But everytime I tried calling the
zxcvbn.measure()
method, I got ajava.lang.ExceptionInInitializerError
.After debugging I was able to locate the error: in
matchers/ResourceLoader.java
in line 8, you are usingThread.currentThread().getContextClassLoader().getResourceAsStream(path)
to get the files from the resources folder. As it turned out, this isnull
when using Keycloak.But: using
getClass ().getClassLoader ().getResourceAsStream (path)
works great!Is there a reason you are using the Thread-version here? Otherwise it might be nice to replace this line with the Class-version to ensure compatibility with software like Keycloak (I don't know if this problem also appears with other projects).
The text was updated successfully, but these errors were encountered: