3

I have been working for a java project. I am getting the following error when I deploy the app, also the error was not consistently identified.

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
    is the class/jar that contains the class added to the buildpath? Look at jarfinder.com/index.php/java/info/… to see what jar you might be missing in the buildpath Commented Aug 26, 2013 at 10:56
  • the required libraries are not available. Check WEB-INF/lib if you include all needed jars. Commented Aug 26, 2013 at 10:59
  • "Unresolved compilation problems" usually means, that your code has compile errors. Check your code and fix the issues. And maybe disable your IDE (eclipse?) to automagically start a program if compile errors exist. Commented Aug 26, 2013 at 10:59
  • Isn't it pretty obvious that an attempt has been made to run Java code that has compilation errors. The OP is one lucky dude who not only got away from being downvoted but actually gained votes. Commented Aug 26, 2013 at 12:09

1 Answer 1

2

Check if the jsse.jar file is present on your classpath. The javax.net.ssl.HostnameVerifier class is referenced by an other dependency of your project but is not available on the tomcat server.

I think the JSSE has been bundled with the JDK since 1.4

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.