Tomcat 当我的应用程序在JBOSS EAP 7.0中运行时,无法将WSO2用作标识服务器
我正在尝试使用WSO2 5.3.0作为识别服务器 我的应用程序运行在JBOSS EAP 7.0中,WSO2运行在随附的Tomcat中 我在ws02中遵循了这一点,并且能够在示例应用程序在tomcat中运行时成功地执行SSO。但是,当我将同一个应用程序部署到JBOSS EAP 7.0时,当我点击应用程序URL时,就会出现这个错误 错误[io.undertow.request](默认任务-2)UT005023:异常处理请求到/travevlocity.com:java.lang.IllegalStateException:UT010041:servlet上下文已初始化,您只能从ServletContainerInitializer或ServletContextListener调用此方法 在io.undertow.servlet.spec.ServletContextImpl.EnsureRenotinizated(ServletContextImpl.java:778) 位于io.undertow.servlet.spec.ServletContextImpl.addListener(ServletContextImpl.java:653) 位于io.undertow.servlet.spec.ServletContextImpl.addListener(ServletContextImpl.java:632) 位于org.wso2.carbon.identity.sso.agent.SSOAgentFilter.init(SSOAgentFilter.java:57) 在WSO2中,这里是SSOAgentFilter的init方法Tomcat 当我的应用程序在JBOSS EAP 7.0中运行时,无法将WSO2用作标识服务器,tomcat,single-sign-on,wso2is,wso2carbon,jboss-eap-7,Tomcat,Single Sign On,Wso2is,Wso2carbon,Jboss Eap 7,我正在尝试使用WSO2 5.3.0作为识别服务器 我的应用程序运行在JBOSS EAP 7.0中,WSO2运行在随附的Tomcat中 我在ws02中遵循了这一点,并且能够在示例应用程序在tomcat中运行时成功地执行SSO。但是,当我将同一个应用程序部署到JBOSS EAP 7.0时,当我点击应用程序URL时,就会出现这个错误 错误[io.undertow.request](默认任务-2)UT005023:异常处理请求到/travevlocity.com:java.lang.IllegalSta
public void init(FilterConfig fConfig)
throws ServletException
{
try
{
SSOAgentConfigs.initConfig(fConfig);
SSOAgentConfigs.initCheck();
samlSSOManager = new SAML2SSOManager();
openIdManager = new OpenIDManager();
fConfig.getServletContext().addListener("org.wso2.carbon.identity.sso.agent.saml.SSOAgentHttpSessionListener");
} catch(SSOAgentException e){
LOGGER.log(Level.SEVERE, "An error has occurred", e);
throw e;
}
}
我认为问题在于JBOSS EAP 7.0,它使用undertow作为servlet api实现。下面是undertow的ServletContextImpl的代码片段
@Override
public void addListener(final Class<? extends EventListener> listenerClass) {
ensureNotInitialized();
ensureNotProgramaticListener();
if (ApplicationListeners.listenerState() != NO_LISTENER
&& ServletContextListener.class.isAssignableFrom(listenerClass)) {
throw UndertowServletMessages.MESSAGES.cannotAddServletContextListener();
}
InstanceFactory<? extends EventListener> factory = null;
try {
factory = deploymentInfo.getClassIntrospecter().createInstanceFactory(listenerClass);
} catch (Exception e) {
throw new IllegalArgumentException(e);
}
final ListenerInfo listener = new ListenerInfo(listenerClass, factory);
deploymentInfo.addListener(listener);
deployment.getApplicationListeners().addListener(new ManagedListener(listener, true));
}
@覆盖
public void addListener(final ClassJBoss EAP 7.0没有像以前的版本那样使用Tomcat作为servlet容器。这可能是不兼容的原因。
但是,使用较新版本的依赖项将解决此问题
<dependency>
<groupId>org.wso2.carbon.identity.agent.sso.java</groupId>
<artifactId>org.wso2.carbon.identity.sso.agent</artifactId>
<version>5.1.3</version>
</dependency>
org.wso2.carbon.identity.agent.sso.java
我也有同样的问题。你有没有得到这方面的提示?