3

我一直在为一个java项目工作。部署应用程序时出现以下错误,并且该错误未得到一致识别。

Caused by: java.lang.Error: Unresolved compilation problems: 
The type javax.net.ssl.HostnameVerifier cannot be resolved. It is indirectly
referenced from required .class files
  The import javax.net.ssl.HostnameVerifier cannot be resolved
  The import javax.net.ssl.KeyManager cannot be resolved
  The import javax.net.ssl.KeyManagerFactory cannot be resolved
  The import javax.net.ssl.SSLSession cannot be resolved
  The import javax.net.ssl.TrustManager cannot be resolved
  The import javax.net.ssl.TrustManagerFactory cannot be resolved
  TrustManagerFactory cannot be resolved to a type
  KeyManagerFactory cannot be resolved to a type
  TrustManagerFactory cannot be resolved to a type
  TrustManagerFactory cannot be resolved
  TrustManagerFactory cannot be resolved to a type
  KeyManagerFactory cannot be resolved to a type
  KeyManagerFactory cannot be resolved
  KeyManagerFactory cannot be resolved to a type
  The type javax.net.ssl.SSLContext cannot be resolved. It is indirectly referenced  
  from required .class files
  The type javax.net.ssl.SSLSocketFactory cannot be resolved. It is indirectly 
  referenced from required .class files
  KeyManager cannot be resolved to a type
  KeyManagerFactory cannot be resolved to a type
  TrustManager cannot be resolved to a type
  TrustManagerFactory cannot be resolved to a type
  HostnameVerifier cannot be resolved to a type
  HostnameVerifier cannot be resolved to a type
  SSLSession cannot be resolved to a type
4

1 回答 1

2

检查jsse.jar文件是否存在于您的类路径中。该类javax.net.ssl.HostnameVerifier被项目的其他依赖项引用,但在 tomcat 服务器上不可用。

我认为 JSSE 自 1.4 以来就与 JDK 捆绑在一起

于 2013-08-26T11:29:57.503 回答