0

我有一個運行在Tomcat 7上的openAM應用程序。 在我的JBoss服務器上有一個受OpenAM保護的應用程序,訪問任何受保護資源時出現以下錯誤消息:openam J2EE策略代理 - ServerEntryNotFoundException:找不到服務器ID

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.identity.agents.filter.AmFilterManager 
    at com.sun.identity.agents.filter.AmAgentBaseFilter.initializeFilter(AmAgentBaseFilter.java:270) [agent.jar:4.0.0-SNAPSHOT - 20140502-0259] 
    ... 16 more 

此類屬於我在我的Jboss它創造了一個jboss module安裝Web策略劑聲明這些依賴關係:

<dependencies> 
     <module name="javax.servlet.api" /> 
     <module name="javax.api" /> 
     <module name="javax.xml.bind.api" /> 
     <module name="javax.ejb.api" /> 
     <module name="org.picketbox" /> 
    </dependencies> 

但我檢查我的jboss/modules這些依賴關係的目錄,他們都在那裏。

在我Web Policy agent's日誌文件中,我看到這是記錄每分鐘:8181:

ERROR: WebtopNaming.getServerId():serverId null for server: http://openam.example.com:8181/openam 
amNaming:12/04/2014 03:55:37:027 PM CET: Thread[SystemTimer,5,main] 
ERROR: WebtopNaming.getServerId() 
com.iplanet.services.naming.ServerEntryNotFoundException: Cannot find server ID. 
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:757) 
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:654) 
    at com.iplanet.services.naming.WebtopNaming$SiteMonitor.checkAvailableSiteList(WebtopNaming.java:1738) 
    at com.iplanet.services.naming.WebtopNaming$SiteMonitor.runCheckValidSite(WebtopNaming.java:1713) 
    at com.iplanet.services.naming.WebtopNaming$SiteMonitor.run(WebtopNaming.java:1706) 
    at com.sun.identity.common.TimerPool$WorkerThread.run(TimerPool.java:434) 

回答

1

的問題是,當我安裝openAM後創建了默認的配置,我已經通過本地主機訪問openAM服務器而不是openam.example.com:8181

因此,openAM自動創建一個服務器配置,名稱爲localhost:8181/openam。這些配置可以在管理控制檯的配置>服務器和站點下找到。

+1

你不應該使用「localhost」安裝OpenAM,至少你應該使用/ etc/hosts條目爲它僞造一個FQDN。 – 2015-01-26 09:57:53

+0

是的,所以我明白了。 – 2015-01-26 10:23:54