java.io.IOException: TLS SSLContext not available

Hi all,

I'm new to https and SSL. I had my eclipse configured for non-ssl mode and working fine. now I'm trying to change my tomcat to HTTPS.

I created a new certificate using the keytool and gave the password changeit. I found the .keystore file in my user home directory.

I added the following lines to my%TOMCAT_HOME%/conf/server.xml

<Connector port="443"

maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

enableLookups="false" disableUploadTimeout="true"

acceptCount="100" debug="0" scheme="https" secure="true"

clientAuth="false" sslProtocol="TLS" />

And the following line to%TOMCAT_HOME%/conf/web.xml

<security-constraint>

<web-resource-collection>

<url-pattern>/*</url-pattern>

</web-resource-collection>

<user-data-constraint>

<transport-guarantee>CONFIDENTIAL</transport-guarantee>

</user-data-constraint>

</security-constraint>

I copied both jce.jar and jsse.jar to %TOMCAT_HOME%/common/lib

When I try to start my tomcat using eclipse tomcat plugin, It is giving me the following error

java.io.IOException: TLS SSLContext not available

at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)

at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)

at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)

at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)

at org.apache.catalina.connector.Connector.initialize(Connector.java:928)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)

at org.apache.catalina.startup.Catalina.load(Catalina.java:490)

at org.apache.catalina.startup.Catalina.load(Catalina.java:509)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)

Jun 22, 2007 10:35:38 AM org.apache.catalina.startup.Catalina load

SEVERE: Catalina.start

LifecycleException: Protocol handler initialization failed: java.io.IOException: TLS SSLContext not available

at org.apache.catalina.connector.Connector.initialize(Connector.java:930)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)

at org.apache.catalina.startup.Catalina.load(Catalina.java:490)

at org.apache.catalina.startup.Catalina.load(Catalina.java:509)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)

Can any one help me to resolve this issue

[3639 byte] By [Arun_P_Johnya] at [2007-11-27 8:30:23]
# 1
It should work unless there is something broken in that version of Tomcat. Are you able to specify "SSL" instead of "TLS"?
ejpa at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2

No. I tried to give

<Connector port="443"

maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

enableLookups="false" disableUploadTimeout="true"

acceptCount="100" debug="0" scheme="https" secure="true"

clientAuth="false" sslProtocol="SSL" />

then it is giving the following error

java.io.IOException: SSL SSLContext not available

at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)

at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)

at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)

at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)

at org.apache.catalina.connector.Connector.initialize(Connector.java:928)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)

at org.apache.catalina.startup.Catalina.load(Catalina.java:490)

at org.apache.catalina.startup.Catalina.load(Catalina.java:509)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)

Jun 22, 2007 12:14:05 PM org.apache.catalina.startup.Catalina load

SEVERE: Catalina.start

LifecycleException: Protocol handler initialization failed: java.io.IOException: SSL SSLContext not available

at org.apache.catalina.connector.Connector.initialize(Connector.java:930)

at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)

at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)

at org.apache.catalina.startup.Catalina.load(Catalina.java:490)

at org.apache.catalina.startup.Catalina.load(Catalina.java:509)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)

Arun_P_Johnya at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 3
What JRE are you running? If it's 1.3, either find and install JSSE or upgrade.
ejpa at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 4
> What JRE are you running? If it's 1.3, either find> and install JSSE or upgrade.I'm using jre 1.5.0_06
Arun_P_Johnya at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 5
I suggest you remove and reinstall it. There is something seriously wrong somewhere. Both TLS and SSL are available in the standard JRE from 1.4 onwards.
ejpa at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 6
I reinstalled my Java. It worked fine. Thank you
Arun_P_Johnya at 2007-7-12 20:20:58 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...