Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 找不到有效的证书路径,jboss 5.1.0_Java_Soap_Cmd_Ssl Certificate_Jboss5.x - Fatal编程技术网

Java 找不到有效的证书路径,jboss 5.1.0

Java 找不到有效的证书路径,jboss 5.1.0,java,soap,cmd,ssl-certificate,jboss5.x,Java,Soap,Cmd,Ssl Certificate,Jboss5.x,当我试图从本地环境调用需要通过HTTPS进行基本身份验证的SOAP webservice.wsdl时,我得到了SSLHandShakeException 首先,我从Chrome浏览器下载了certificate Cert.cer,并按照以下步骤操作 1) keytool -genkey -dname "CN=localhost:8080, OU=Group Name, O=Company Name,L=City Name, S=State, C=IN" -alias "key_alias" -k

当我试图从本地环境调用需要通过HTTPS进行基本身份验证的SOAP webservice.wsdl时,我得到了SSLHandShakeException

首先,我从Chrome浏览器下载了certificate Cert.cer,并按照以下步骤操作

1) keytool -genkey -dname "CN=localhost:8080, OU=Group Name, O=Company Name,L=City Name, S=State, C=IN" -alias "key_alias" -keyalg RSA -keypass changeit -keystore server.keystore 

2) copy server.keystore C:\Work\jboss-5.1.0.GA\server\default\conf

3) keytool -export -alias "key_alias" -file Cert.cer -keystore C:\Work\jboss-5.1.0.GA\server\default\conf\server.keystore

4) copy Cert.cer C:\Work\jboss-5.1.0.GA\server\default\conf

5) keytool -printcert -v -file C:\Work\jboss-5.1.0.GA\server\default\conf\Cert.cer

6) keytool -import -alias "key_alias" -file Cert.cer -keystore "C:\Program Files (x86)\Java\jdk1.6.0_03\jre\lib\security\cacerts"
在C:\Work\jboss-5.1.0.GA\server\default\deploy\jbossweb.sar\server.xml中
那有什么不对?有人能帮我找到吗???

当您指定了错误的信任存储路径,并且您的应用程序找不到有效的密钥/信任存储时,会出现此异常。我们可以在哪里找到错误的信任存储路径,以及如何找到错误的信任存储路径,是否有任何命令…??我能够看到证书,我已导入密钥存储库的内容,通过命令提示符在/security文件夹的cacerts文件中的证书列表中。
<!-- SSL/TLS Connector configuration using the admin devl guide keystore-->
  <Connector name="https" protocol="HTTP/1.1" SSLEnabled="true" 
       port="8443" address="${jboss.bind.address}" keyAlias="key_alias"
       scheme="https" secure="true" clientAuth="false" 
       keystoreFile="C:\Work\jboss-5.1.0.GA\server\default\conf\server.keystore"
       keystorePass="changeit" sslProtocol = "TLS" />
2013-12-04 12:31:14,841 ERROR [STDERR] (http-127.0.0.1-8443-6) AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode: 
faultString: 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
faultActor: 
faultNode: 
faultDetail: 
{http://xml.apache.org/axis/}stackTrace: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