我们正在尝试创建一个具有JEE8安全应用编程接口的wildfly 16高可用集群。项目作为独立的应用程序工作得很好,但不能作为集群!我们得到了一个Ininfispan型的NotSerializableException。
我们有一个包含jsf 2.3、CDI 2.0和Soteria的wildfly 16独立应用程序。作为独立运行,它运行良好。现在,我们希望将此配置作为独立的wildfly-cluster运行。野蝇们都过来了,他们彼此都认识。
但是,当我们调用我们的应用程序时,我们得到了以下异常: org.infinispan.commons.marshall.NotSerializableException::java.lang.IllegalArgumentException org.glassfish.soteria.servlet.RequestData
如果需要,我们可以发布整个堆栈跟踪。
如果我们从web.xml中删除“可分发的”,它将毫无例外地工作,但是我们不能在实例之间共享会话。
我们是否遗漏了一些配置?还是我们还有另一个误会?
谢谢你的帮助
@AutoApplySession
@LoginToContinue(loginPage = "/login.xhtml", errorPage = "", useForwardToLogin = true)
@ApplicationScoped
public class CustomAuthenticationMechanism implements HttpAuthenticationMechanism {
@Inject
private CustomIdentityStore identityStore;
...
}
@Model
public class LoginBean implements Serializable {
public void login() {
FacesContext context = FacesContext.getCurrentInstance();
Credential credential = new CustomCredential(username, password);
AuthenticationStatus status = securityContext.authenticate(
(HttpServletRequest) externalContext.getRequest(),
(HttpServletResponse) externalContext.getResponse(),
withParams()
.credential(credential)
.newAuthentication(false)
.rememberMe(true)
);
...
}
}
web.xml:
...
distributable
...从2019年7月3日开始编辑:
正如我现在所看到的,问题出在Soteria Impementation中。我在github上找到了以下提交:"https://github.com/eclipse-ee4j/soteria/commit/fd9a29c4452f99b426dabc296ec759d36766a56f“。对我来说,现在的问题是,什么时候才能实现?要实现对资源的基于角色的访问并将未经身份验证的用户重定向到自定义登录页面,有哪些替代方案?
发布于 2019-07-02 21:36:13
似乎需要在集群的多个实例之间复制org.glassfish.soteria.servlet.RequestData类型的对象。复制的工作方式是在一端序列化对象,在另一端再次反序列化它。这解释了代码在非集群环境中工作的原因。
然而,这个类似乎没有实现java.io.Serializable。您是否在任何会话作用域的对象中使用RequestData?
https://stackoverflow.com/questions/56853545
复制相似问题