Openam中的Java.lang.NullPointerException(在配置期间)

时间:2018-04-26 07:04:38

标签: java tomcat single-sign-on openam forgerock

我是openam的新手,我正在尝试在现有的OpenAM部署中创建和部署新的OpenAM Tomcat实例。

已完成并且工作正常的事情:

1.Tomcat已安装。(我可以ping Apache Tomcat主页。)
Tomcat版本:7.0.62
放置openam.war文件(版本:13.5.0 )并放入tomcat的webapps文件夹中。
3.能够在我的浏览器中点击openam。
4.处理新配置并填写所有配置存储和用户存储详细信息以及其他详细信息。
5.Created配置......弹出此错误。
NullPointerException 我的第一次工作一切都很顺利,但我在领域搞砸了一些东西,所以我删除了我的 openam 文件夹和 .openamcfg 文件夹并重新启动了Tomcat服务器并得到了错误< / p>

  

显示java.lang.NullPointerException

用Google搜索,这次我从tomcat / webapps中删除了openam文件夹并重新启动了服务器并完成了上述步骤,这次我收到错误:

  

AdminTokenAction:FATAL ERROR:无法获取应用程序SSO令牌

现在我得到null异常, 我的Install.log文件如下所示:

    Checking license acceptance...License terms accepted.
License, legal-notices/license.txt, has been accepted.
License Hash: a5GIoWOZQaGncrUaRgtjo5kmm7g=.
Checking configuration directory /home/admin/openam....Success.
Reinitializing system properties....Done
Configuring server instance....Done
Setting up monitoring authentication file.AMSetupServlet.processRequest: errorjava.lang.NullPointerException
        at java.net.URLEncoder.encode(URLEncoder.java:204)
        at com.sun.identity.setup.BootstrapCreator.getBootStrapURL(BootstrapCreator.java:189)
        at com.sun.identity.setup.BootstrapCreator.update(BootstrapCreator.java:104)
        at com.sun.identity.setup.BootstrapCreator.updateBootstrap(BootstrapCreator.java:82)
        at com.sun.identity.common.configuration.ServerConfigXMLObserver.update(ServerConfigXMLObserver.java:108)
        at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:517)
        at com.sun.identity.config.wizard.Wizard.createConfig(Wizard.java:301)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
        at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
        at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
        at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
        at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
        at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
        at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
        at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
        at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
        at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
        at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:123)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.forgerock.openam.audit.context.AuditContextFilter.doFilter(AuditContextFilter.java:51)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)


Dumping all configuration parameters...

Request Parameters:
acceptLicense = true
actionLink = createConfig
ADMIN_CONFIRM_PWD = #########
ADMIN_PWD = #########
AM_ENC_KEY = #########
AMLDAPUSERPASSWD = #########
AMLDAPUSERPASSWD_CONFIRM = #########
BASE_DIR = /home/admin/openam
COOKIE_DOMAIN = 
DATA_STORE = dirServer
DIRECTORY_ADMIN_PORT = -1
DIRECTORY_JMX_PORT = -1 ...
...

编辑:我在工作中删除了openam文件夹/ Catalina / localhost /还删除了openam文件夹和openamcfg并再次重启了所有内容。我还在,

  

显示java.lang.NullPointerException

我在网上做了我的研究,但无法弄清楚可能的原因是什么。请帮忙。

1 个答案:

答案 0 :(得分:1)

看起来您正在使用AM实例的外部配置存储。在尝试第二次安装AM之前,应确保从目录服务器中删除以前的配置数据,或者至少应使用不同的根后缀。