Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSL Configuration for Apache Tomcat 5.5 Servlet/JSP Container

Status
Not open for further replies.

Leonard888

Vendor
Oct 30, 2015
1
0
0
ZA
Good Day
[ignore][/ignore]
I am trying to configure SSL following the instructions from
Firstly I hope the quick start would work, issuing the minimal command:
keytool -genkey -alias ALISNAME -keyalg RSA (with changeit password)
and un-commenting the default SSL connector in the server.xml.

When this does not work, I am creating the keystore with the more details using the command:
keytool -genkey -alias ALISNAME -keyalg RSA -keystore /bin/KEYSTOREFILE.jks -keysize 2048] (with the custom password)
The following snippet is added to the server.xml:
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" cceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="bin/KEYSTOREFILE.jks" keystorePass="CUSTOM_PASSWORD" keyAlias="ALISNAME"/>


On both occasions the following error occurs:
Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.compat.JdkCompat.getUnboundSocket(Ljavax/net/ServerSocketFactory;)Ljava/net/ServerSocket;


java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.NoSuchMethodError: org.apache.tomcat.util.compat.JdkCompat.getUnboundSocket(Ljavax/net/ServerSocketFactory;)Ljava/net/ServerSocket;
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.checkConfig(JSSESocketFactory.java:393)
at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:127)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:96)
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:293)
at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:139)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1002)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)


I will so much appreciate an advise what am I doing wrong !

Thank you
Leonard
 
Looks like a Java version problem to me. Assuming you're using Tomcat 5.5, I'd verifiy that the JAVA_HOME variable is pointing to a compatible version of Java.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top