“No subject alternative names present” 異常解決
前段時間嘗試在自己本機訪問https 資源,一直困於“No subject alternative names present”這個錯誤。
Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://IP:8443/security/2.0?wsdl. It failed with:
java.security.cert.CertificateException: No subject alternative names present.
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:151
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:133)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:217)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:165
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)
at javax.xml.ws.Service.<init>(Service.java:56)
因為之前專案吃緊,只好在公司已經配置好的平臺上開發,把這個問題擱置了下來。隨著第一個版本的成功釋出,得了些空閒時間再次來研究這個問題。
I read that the problem usually appears when the "cn" in the certificate does not match the address of the server.
The "CN" in my certificate is "PRESS44"
The server address that was given to me is an ip.
難道不能用IP地址,必須要用主機名?先查查伺服器端的配置。找到伺服器端的keystore 檔案
/usr/java/jdk1.6.0_15/bin/keytool -list -v -keystore -list -v -keystore server.keystore
一查果然CN用的是主機名,複製過來替換原來URL的IP地址。先在測試的Java類裡跑跑看,“No subject” 問題是過了,又報如下的錯:
Exception in thread "main" javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://hostname:8443/security/2.0?wsdl. It failed with:
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:151)
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:133)
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:254)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:217)
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:165)
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)
at javax.xml.ws.Service.<init>(Service.java:56)
訪問WSDL也需要安全認證,真是麻煩啊!突然想起前段時間做調研時,JBoss裡似乎可以設定一個叫 ignoreHttpsHost 的引數。反正最後也要部署到JBoss,不妨就試試看,設定好三個引數:
System.setProperty("javax.net.ssl.trustStore", "C:\\test\\jssecacerts");
System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("org.jboss.security.ignoreHttpsHost", "true");
啟動JBoss,跑SoapUI測試用例,三秒之後,成功返回結果。
相關推薦
“No subject alternative names present” 異常解決
前段時間嘗試在自己本機訪問https 資源,一直困於“No subject alternative names present”這個錯誤。 Exception in thread "main" javax.xml.ws.WebServiceException: Fail
SSLHandshakeException: No subject alternative names matching IP address found
一、異常日誌 javax.net.ssl.SSLHandshakeException: Caused by: java.security.cert.CertificateException:
java.io.IOException: No FileSystem for scheme: hdfs異常解決
Configuration conf = new Configuration(); conf.set("fs.hdfs.impl",org.apache.hadoop.hdfs.DistributedFileSystem.class.getName()); fs =
java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result異常的解決方法
add syn ati contain 無限循環小數 報錯 ref 情況 sca JAVA程序異常:java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representabl
更新MySQL數據庫( java.sql.SQLException: No value specified for parameter 1) 異常 解決方法
lex eal on() cut list data ram ast 圖片 package com.swift; import java.io.File; import java.sql.Connection; import java.sql.PreparedState
spring配置 no matching editors or conversion strategy found 異常解決方案
spring 配置中遇到該問題,可以通過注入的方式解決,程式碼如下: <tx:annotation-driven transaction-manager="myTxManager" proxy-target-class="true"/> 總結:Spring注入的是介面,關
springboot java.util.NoSuchElementException: No value present 異常處理
當通過jap通過id查詢時,使用 findById(id).get(),當id不存在當,也就是資料庫沒有對應當id資料時,就回報上面當異常 後來檢視原始碼,發現: public T get() { if (value == null) { throw n
Sqoop異常解決ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No
問題詳情如下: 解決辦法 這個是由於mysql-connector-java的bug造成的,出錯時我用的是mysql-connector-java-5.1.10-bin.jar,更新成mysql-connector-java-5.1.32-b
解決 Creating Server TCP listening socket *:6379: bind: No such file or directory 異常
問題描述 Creating Server TCP listening socket *:6379: bind: No such file or directory 解決思路 我這邊檢查之後發現Redis服務已經啟動了 redis-cli 去看是否能連線上,進的
redis異常解決:jedis.exceptions.JedisDataException: ERR Client sent AUTH, but no password is set
專案中用到了redis做快取伺服器,今天一次重啟後報出下面的異常,經過各種排查,定位原因如下,作記錄以備忘。 異常如下: redis.clients.jedis.exceptions.JedisConnectionException: Could not get a re
No CurrentSessionContext configured!" 異常解決方案
hibernate 老說沒有配方言 <property name="dialect">org.hibernate.dialect.MySQLDialect</property>這句話明明就寫在了配置檔案裡面,可老是沒有寫錯誤如下:Exception i
關於vmware11下安裝centOS6.5出現eth0 no link present問題解決方法
在vmware11下安裝centOS6.5,在啟動後進行網絡卡新增,步驟如下: setup 出現介面1此時選擇network configuration 出現介面2選擇device configur
ActiveMQ之【Connection refused: no further information】異常解決
最近多次遇到啟動程式時連線ActiveMQ出現如下報錯: 一開始以為是MQ沒有啟動成功,但是啟動的命令視窗並沒有報錯,網頁的控制檯也能正常訪問。後來才發現,是MQ中/conf目錄下的activemq.
dubbo異常:Failed to check the status of the service . No provider available for the service 解決
dubbo配置的時候需要一個註冊中心 這個註冊中心主要起的作用為服務做配置 每當一個服務生產者去註冊服務時候 會把這個生產者的ip跟埠號丟上去註冊中心 而服務的消費方就會從註冊中心拿到服務的ip跟埠號 放在本地檔案中 底層呼叫netty訪問服務 昨天跟同事一塊調程式 他開服
No qualifying bean of type...found for dependency:expected at least 1 bean which qualifies... 異常解決方案
ssm框架,maven管理,idea開發,搭建過程中遇到以下問題: No qualifying bean of type ... found for dependency: expected at
bash: ./make_ext4fs: No such file or directory 錯誤解決方法
nodes tor for locks exec ++ 能夠 ipp option 一般出現該錯誤是因為應用程序是32位導致的,能夠使用file命令來查看: [email protected]/* */:~/Desktop$ file make_ext4fs
MyBatis參數格式化異常解決方式:MyBatisSystemException:
clas note gen system http runnable reflect aop chain MyBatis參數格式化異常解決方式:MyBatisSystemException: 問題:今天使用MyBatis開發查詢功能時,
Maven常見異常解決《二》
inf 項目 orb solved update nsf nap ips transfer 下面是一些Maven工程的常見異常: 1.ReasonPhrase: Forbidden: |--- 1.註意用戶的權限以及角色role的設置,通常是沒有權
Qt編譯錯誤“GL/gl.h:No such file or directory”的解決方法
導致 安裝 egl 新版 工具 ubunt 沒有 一個 -o 備註:1)操作系統:Ubuntu-14.04或12.042)Linux用戶:root3)Qt版本:qt-linux-opensource-5.2.0-x86 為了迎接Qt的新紀元(從諾基亞移居到
Java異常解決之--java.lang.NullPointerException
null 異常 bsp ray lan 判斷 常常 類型 對象 1、java.lang.NullPointerException【空指針異常】一般報java.lang.NullPointerException的原因有以下幾種 :一般常常都是你引用了一個未 new 變量 或者