在OpenAM初始配置的JVM中找不到x509.CertAndKeyGen

时间:2014-09-04 04:36:52

标签: jvm single-sign-on x509 openam

在OSX Mavericks,OpenAM 10.1.0,Tomcat8和JDK8的组合中, OpenAM初始GUI配置没有成功,导致错误:

  

[Click] [error] handleException:java.lang.RuntimeException:调用公共方法时出错:public boolean com.sun.identity.config.wizard.Wizard.createConfig()        在org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3335)        在org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)        在org.apache.click.control.AbstractControl $ 1.onAction(AbstractControl.java:228)        在org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)        在org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)        在org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)        在org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)        在org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)        在org.apache.click.ClickServlet.processPage(ClickServlet.java:559)        在org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)        在org.apache.click.ClickServlet.doGet(ClickServlet.java:276)        在javax.servlet.http.HttpServlet.service(HttpServlet.java:617)        在javax.servlet.http.HttpServlet.service(HttpServlet.java:723)        在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        在org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)        在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        在com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:99)        在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)        在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)        在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)        在org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)        在org.apache.coyote.http11.Http11Protocol $ Http11ConnectionHandler.process(Http11Protocol.java:606)        在org.apache.tomcat.util.net.JIoEndpoint $ Worker.run(JIoEndpoint.java:489)        在java.lang.Thread.run(Thread.java:745)   引发者:java.lang.ExceptionInInitializerError:由于以下原因,在此JVM中找不到安全类:sun.security.x509.CertAndKeyGen        在org.opends.server.util.Platform $ PlatformIMPL。(Platform.java:127)        在org.opends.server.util.Platform。(Platform.java:80)        at org.opends.server.util.CertificateManager.generateSelfSignedCertificate(CertificateManager.java:283)        at org.opends.server.admin.AdministrationConnector.createSelfSignedCertifIfNeeded(AdministrationConnector.java:698)        在org.opends.server.admin.AdministrationConnector.initializeAdministrationConnector(AdministrationConnector.java:181)        at org.opends.server.core.ConnectionHandlerConfigManager.initializeAdministrationConnectorConfig(ConnectionHandlerConfigManager.java:350)        在org.opends.server.core.DirectoryServer.initializeAdministrationConnector(DirectoryServer.java:2898)        在org.opends.server.core.DirectoryServer.startServer(DirectoryServer.java:1401)        at org.opends.server.util.EmbeddedUtils.startServer(EmbeddedUtils.java:88)        at com.sun.identity.setup.EmbeddedOpenDS.startServer(EmbeddedOpenDS.java:545)        在com.sun.identity.setup.EmbeddedOpenDS.setup(EmbeddedOpenDS.java:364)        at com.sun.identity.setup.AMSetupServlet.setupEmbeddedDS(AMSetupServlet.java:813)        在com.sun.identity.setup.AMSetupServlet.setupSMDatastore(AMSetupServlet.java:869)        在com.sun.identity.setup.AMSetupServlet.configure(AMSetupServlet.java:945)        at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:628)        在com.sun.identity.config.wizard.Wizard.createConfig(Wizard.java:294)        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)        在java.lang.reflect.Method.invoke(Method.java:483)        在org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)        ......还有30多个

我还将JDK更改为7或将Tomcat更改为7,这是没用的。

  

由于以下原因,在此JVM中找不到安全类:sun.security.x509.CertAndKeyGen

我知道JBoss似乎已经修复了这个错误,但我不知道如何在我的环境中克服。

2 个答案:

答案 0 :(得分:1)

CertAndKeyGen类问题实际上是OPENDJ-1142,当配置程序尝试设置嵌入式OpenDJ(它还不支持JDK8)时会发生这种情况。即便如此,OpenAM还没有在JDK8上运行(目前甚至没有编译 - 主要是因为OPENAM-141),所以你肯定需要使用JDK7和一个在JDK7上运行良好的容器。

实际上支持JDK7和Tomcat 7设置,因此您可能希望提供有关安装尝试失败的原因以及操作方式的更多信息。

答案 1 :(得分:0)

我们需要为openam部署准备jboss,方法是将以下内容添加到jboss-deployment-structure.xml中:

<exclude-subsystems>
      <subsystem name="jaxrs" />
      <subsystem name="webservices" />
    </exclude-subsystems>

    <dependencies>
        <module name="sun.jdk" >
            <imports>
                <exclude-set>
                    <path name="com/sun/org/apache/xml/internal/security/transforms/implementations"/>
                </exclude-set>
            </imports>
        </module>
      <system>
        <paths>
          <path name="sun/security/x509" />
          <path name="com/sun/org/apache/xpath/internal" />
          <path name="com/sun/org/apache/xerces/internal/dom" />
          <path name="com/sun/org/apache/xml/internal/utils" />
        </paths>
      </system>
    </dependencies>