2013-08-26 56 views
3

我一直在为一个java项目工作。当我部署应用程序时,出现以下错误,并且错误未被一致地识别。Tomcat无法部署我的应用程序。它失败,出现以下错误。

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 
+1

是包含添加到构建路径的类的类/ jar吗?查看http://www.jarfinder.com/index.php/java/info/javax.net.ssl.HostnameVerifier,查看构建路径中可能缺少的jar文件。 –

+0

所需的库不可用。如果包含所有需要的罐子,请检查WEB-INF/lib。 –

+0

“未解决的编译问题”通常意味着,您的代码有编译错误。检查你的代码并解决问题。如果存在编译错误,也许可以禁用IDE(eclipse?)以自动启动程序。 – Matthias

回答

2

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

我认为JSSE已经与JDK捆绑在一起1.4

相关问题