0

I have an openAM application running on Tomcat 7. On my JBoss server, which has an application protected by OpenAM, I get the following error message when accessing any protected resource:

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

This class belongs to the Web Policy agent that I installed on my Jboss which created a jboss module which declares these dependencies:

    <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>

But I've checked my jboss/modules directory for these dependencies and they're all there.

In my Web Policy agent's log file, I see this being logged every minute:

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)
Henrique Ordine
  • 3,337
  • 4
  • 44
  • 70

1 Answers1

1

The problem was that when I created my default configuration after installing openAM, I had accessed the openAM server via localhost:8181 instead of openam.example.com:8181.

So openAM automatically created a Server configuration with the name localhost:8181/openam. These configurations can be found on the admin console under Configuration > Servers and sites.

Henrique Ordine
  • 3,337
  • 4
  • 44
  • 70
  • 1
    You should never install OpenAM with "localhost", at least you should fake an FQDN for it using /etc/hosts entries. – Peter Major Jan 26 '15 at 09:57
  • Can you tell me where does OpenAM store its configuration? I think I'm in a similar situation (and I can't access the UI). – watery Oct 26 '18 at 08:52