Этот код делегирования класса для входа в Apatche Shiro. Показывает ошибку на
Subject subject = this.securityManager.login(this, token);
Ошибка: основной аргумент не может быть нулевым.
result = {AuthenticationException @ 7922} Метод вызвал исключение org.apache.shiro.authc.AuthenticationException. detailMessage = "Ошибка аутентификации для отправки токена [org.apache.shiro.authc.UsernamePasswordToken - 9876534357, RememberMe = true]. Возможная непредвиденная ошибка? (Типичные или ожидаемые исключения при входе должны исходить от AuthenticationException).» причина = {IllegalArgumentException @ 8066} "java.lang.IllegalArgumentException: основной аргумент не может быть нулевым". stackTrace = {StackTraceElement [70] @ 8067} suppressedExceptions = {Collections $ UnmodifiableRandomAccessList @ 7696} size = 0
public void login(AuthenticationToken token) throws AuthenticationException {
this.clearRunAsIdentitiesInternal();
Subject subject = this.securityManager.login(this, token);
String host = null;
PrincipalCollection principals;
if (subject instanceof DelegatingSubject) {
DelegatingSubject delegating = (DelegatingSubject)subject;
principals = delegating.principals;
host = delegating.host;
} else {
principals = subject.getPrincipals();
}
if (principals != null && !principals.isEmpty()) {
this.principals = principals;
this.authenticated = true;
if (token instanceof HostAuthenticationToken) {
host = ((HostAuthenticationToken)token).getHost();
}
if (host != null) {
this.host = host;
}
Session session = subject.getSession(false);
if (session != null) {
this.session = this.decorate(session);
} else {
this.session = null;
}
} else {
String msg = "Principals returned from securityManager.login( token ) returned a null or empty value. This value must be non null and populated with one or more elements.";
throw new IllegalStateException(msg);
}
}
stackTrace = {StackTraceElement[70]@7843}
Этот вопрос не дает подробного контекста, см. https://stackoverflow.com/help/how-to-ask а>