1
votes

I am getting the below error in the tomcat logs after i installed the Tomcat policy agent for OpenAM and now I am not not able to start the Tomcat, so obviously cannot view the OpenaAM Console in browser.

org.apache.tomcat.util.digester.Digester startElement SEVERE: Begin event threw error java.lang.ExceptionInInitializerError at com.sun.identity.agents.arch.Manager.(Manager.java:675) at com.sun.identity.agents.tomcat.v6.AmTomcatRealm.(AmTomcatRealm.java:67) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl. java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:145) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser. java:501) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXM LDocumentParser.java:179) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLD ocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver .next(XMLDocumentFragmentScannerImpl.java:2756) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.j ava:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocum entFragmentScannerImpl.java:511) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java: 808)

Due to this error I can't able to view the OpenAM Console. Please help to reslove this issue.

Thanks, Karthick

3

3 Answers

0
votes

You can not deploy OpenAM and OpenAM J2EE agent in the same Tomcat instance

0
votes

I also faced this situation in my setup and found that placing a "setenv.sh" in the /usr/share/tomcat7/bin directory with the following contents and restarting the tomcat server seems to have cleared the issue

#!/bin/sh
JAVA_OPTS="$JAVA_OPTS -Dopenam.agents.bootstrap.dir=/web_agents/tomcat_v6_agent/Agent_001/config/"
0
votes

First of all, you need a separate tomcat to deploy only openAM. all you need to do is, keep OpenAM.war in tomcat's webapps folder. you need to configure servevr.xml file in conf folder, if you wish to use different port, otherwise skip it. start tomcat. then you can access openAM web console on your web browser at: https://localhost:8080/openam

you need another tomcat server to deploy your webapp which you want to protect with openAM policy agent. at first, you have to create an agent profile on OpenAM web console. then you need to install a policy agent on you webbapp's tomcat.

you can get some ideas here:

Getting Started With OpenAM

Configuring Policy Agent Profiles

Installing the Apache Tomcat Policy Agent