0
我正嘗試在域模式下爲定製的JBoss門戶設置SSO複製。我做domain.xml中進行以下更改:使用域模式的集羣中的JBoss Portal SSO複製
要屬於公頃輪廓我的服務器組,我說:
<system-properties> <property name="exo.profiles" value="cluster"/> <property name="gatein.jcr.config.type" value="cluster"/> <property name="gatein.jcr.index.changefilterclass" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.LocalIndexChangesFilter"/>
到HA配置文件domain.xml中
複製主要<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> <sso cache-container="web" cache-name="sso"/> </virtual-server> </subsystem>
我有問題,我得到一個NPE,當我嘗試從用戶獲得的信息。這是日誌的一部分。
########### log in @ server1 ########### 11:27:41,430 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.1:8009-4) Registering sso id 'qY0hc42eF1DFFXqtDHzJLse9' for user '[email protected]' with auth type 'FORM'
11:27:41,432 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (ajp-/x.x.x.1:8009-4) Registering SSO qY0hc42eF1DFFXqtDHzJLse9 in clustered cache
########### shutdown @ server1 ########### 11:28:14,794 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003075: Coyote HTTP/1.1 pausing on: http-/x.x.x.1:8080
########### sso update @ server2 ###########
11:27:41,447 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a credentials modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:27:41,462 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-18,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
11:28:15,577 TRACE [org.jboss.as.clustering.web.sso.infinispan.SSOClusterManager] (OOB-20,shared=udp) received a session modified message for SSO qY0hc42eF1DFFXqtDHzJLse9
########### log in @ server2 ########### 11:28:15,578 TRACE [org.jboss.as.web.sso] (OOB-20,shared=udp) Notified that SSO qY0hc42eF1DFFXqtDHzJLse9 is empty
11:28:35,530 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Checking for cached principal for qY0hc42eF1DFFXqtDHzJLse9
11:28:35,532 TRACE [org.jboss.as.web.sso] (ajp-/x.x.x.2:8009-4) Found cached principal 'NULL' with auth type 'FORM'
刷新頁面時,故障轉移後出現錯誤:
11:28:44,054 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[customapp].[jsp]] (ajp-/x.x.x.2:8009-4) JBWEB000236: Servlet.service() for servlet jsp threw exception: java.lang.NullPointerException at org.apache.jsp.WEB_002dINF.jsp.banners.customappbanner_jsp._jspService(customappbanner_jsp.java:148)
這是從這個片段的「其他」部分產生:
<% if(request.getUserPrincipal() == null) {%>
<a href="/portal/login" id="sign-in" class="header-link" rel="nofollow">Login</a>
<% } else { %>
<ul class="header-link">
<li class="hidden-xs"><i class="icons user"></i><%= request.getUserPrincipal().getName().toString() %></li>
任何提示將不勝讚賞。 此外,可分發標籤存在於web.xml中。
謝謝。