jssecacerts文件应放在Mac上的哪个位置?

时间:2014-12-18 09:09:48

标签: active-directory jvm ssl-certificate osx-yosemite ldapconnection

我正在尝试将在Mac上运行Tomcat 7.0.34的Web应用程序(OS / X 10.10(Yosemite))连接到安全的AD服务器。我收到这个错误:

org.springframework.ldap.CommunicationException: qlty-test-ad:636; nested exception is javax.naming.CommunicationException: qlty-test-ad:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:100)
at org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:266)
at org.springframework.ldap.core.support.AbstractContextSource.getContext(AbstractContextSource.java:106)
at org.springframework.ldap.core.support.AbstractContextSource.getReadOnlyContext(AbstractContextSource.java:125)
at org.springframework.ldap.core.LdapTemplate.executeReadOnly(LdapTemplate.java:792)
at org.springframework.ldap.core.LdapTemplate.lookup(LdapTemplate.java:822)
at org.springframework.ldap.core.LdapTemplate.lookupContext(LdapTemplate.java:1315)
at com.enonic.cms.ee.ldap.LdapConnector.lookup(LdapConnector.java:261)
at com.enonic.cms.ee.ldap.LdapRemoteUserStorePlugin.verifyConnection(LdapRemoteUserStorePlugin.java:489)
... 87 more

所以,我错过了服务器证书。我用InstallCert下载了它并获得了jssecacerts文件,据我所知,我只需要将它放在我的JVM可以找到并使用它的文件夹中。首先我尝试,直接在jdk:

/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/lib/

描述表明应该有一个"安全"文件夹内部" lib",但没有。我尝试创建一个,然后将jssecacerts文件放在这里,但它没有帮助。

然后,我找到了对此文件夹的引用:

/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security/

它已经包含了" cacerts"文件,所以我以为我接受了一些事情,但放置" jssecacerts"这里也没有帮助。还有

/Library/Java/Home/lib/security

包含两个文件的符号链接(" cacerts"和" jssecacerts")。

有人知道我应该把jssecacerts放在哪里吗?

1 个答案:

答案 0 :(得分:0)

您可以在此处找到有关StackOverflow的相关文章:How to obtain the location of cacerts of the default java installation?

在Java 1.8上,它应该放在这个文件夹下:

/Library/Java/JavaVirtualMachines/jdk1.8.0_xx.jdk/Contents/Home/jre/lib/security

我没有在JDK下找到任何安全目录,但我认为它使用与JRE相同的安全目录。

在Mac上查找Java:

/usr/libexec/java_home -v 1.8

相关问题