aspose file tools*
The moose likes Tomcat and the fly likes SSL and Tomcat problems - ClassNotFoundException: TLS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "SSL and Tomcat problems - ClassNotFoundException: TLS" Watch "SSL and Tomcat problems - ClassNotFoundException: TLS" New topic
Author

SSL and Tomcat problems - ClassNotFoundException: TLS

Ed James
Greenhorn

Joined: Feb 10, 2010
Posts: 7
Hi all,

I've been reading and debugging through a number of documents but I cannot seem to get SSL working on my Tomcat server. Here is what I have done (in order) as per Tomcat documentation:

1. Installed JDK 1.5
2. Installed Tomcat (no Native DLL)
3. Generated KeyStore/KeyPair
4. Generated CSR
5. Imported root CA
6. Imported Certificate (as generated by my own CA).
7. Checked Keystore contents - all looks good.
8. Stopped/started Tomcat.

When tomcat start, I get this error at the top of the catalina log:

Feb 10, 2010 4:46:32 PM org.apache.catalina.connector.Connector <init>
SEVERE: Protocol handler instantiation failed: java.lang.ClassNotFoundException: TLS

To me, it looks like it cannot find a particular JAR file?

Can someone please offer up some advice? I'm deperate to get this running!!!

Thank you!

Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Ed James wrote:
1. Installed JDK 1.5
2. Installed Tomcat (no Native DLL)
3. Generated KeyStore/KeyPair
4. Generated CSR
5. Imported root CA
6. Imported Certificate (as generated by my own CA).
7. Checked Keystore contents - all looks good.
8. Stopped/started Tomcat.


Have you configured SSL Connector in server.xml?

Ed James wrote:When tomcat start, I get this error at the top of the catalina log:


Could you elaborate what do you mean by "tomcat starts". Does it work perfectly, but you are worried about an error in the catalina.log or you are trying to access some URL and it doesn't work?
Ed James
Greenhorn

Joined: Feb 10, 2010
Posts: 7
Hi Misha,

Yes, I have configured a Connector in the server.xml file as per Tomcat documentation.

Tomcat server is starting and I'm able to load http pages - however, https pages do not load and a "The requested page could not be found" error is returned. When I looked into the log file I noticed this error I mentioned right at the very top of my log file. To me, this indicates that the I'm missing a component that the TLS protocol requires. I recall reading an article online that referred to 4 .JAR files that would be present after installing JSSE but for the life of me, I can't fine it any more.

Here is my complete log file:

Feb 11, 2010 1:48:18 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-80
Feb 11, 2010 1:48:18 PM org.apache.catalina.connector.Connector pause
SEVERE: Protocol handler pause failed
java.lang.NullPointerException
at org.apache.catalina.connector.Connector.pause(Connector.java:1032)
at org.apache.catalina.core.StandardService.stop(StandardService.java:489)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Feb 11, 2010 1:48:19 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Feb 11, 2010 1:48:20 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-80
Feb 11, 2010 1:48:20 PM org.apache.catalina.connector.MapperListener destroy
WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:173)
at org.apache.catalina.connector.Connector.stop(Connector.java:1138)
at org.apache.catalina.core.StandardService.stop(StandardService.java:519)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
at org.apache.catalina.startup.Catalina.start(Catalina.java:577)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Feb 11, 2010 10:27:13 PM org.apache.catalina.connector.Connector <init>
SEVERE: Protocol handler instantiation failed: java.lang.ClassNotFoundException: TLS
Feb 11, 2010 10:27:14 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.5.0_21\bin
Feb 11, 2010 10:27:14 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Feb 11, 2010 10:27:14 PM org.apache.catalina.connector.Connector initialize
SEVERE: Error registering connector
java.lang.NullPointerException
at org.apache.tomcat.util.IntrospectionUtils.getProperty(IntrospectionUtils.java:377)
at org.apache.catalina.connector.Connector.getProperty(Connector.java:302)
at org.apache.catalina.connector.Connector.createObjectName(Connector.java:970)
at org.apache.catalina.connector.Connector.initialize(Connector.java:998)
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Feb 11, 2010 10:27:15 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 11, 2010 10:27:15 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.28
Feb 11, 2010 10:27:15 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 11, 2010 10:27:17 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Feb 11, 2010 10:27:17 PM org.apache.catalina.connector.Connector start
INFO: Cannot register MBean for the Protocol
Feb 11, 2010 10:27:17 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.NullPointerException
at org.apache.catalina.connector.Connector.start(Connector.java:1097)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Feb 11, 2010 10:27:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2774 ms

Here is my Connector configuration:

<Connector port="443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" protocol="TLS"
keystoreFile="../webapps/ROOT/myks.jks" keystorePass="Password"/>

Cheers
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Sounds like something with certificate keystore itself. Perhaps you may need to recreate it. Also I would suggest to go with a standard setting first time like not changing default SSL port and keeping the keystore file you created is the default place that Tomcat expects.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL and Tomcat problems - ClassNotFoundException: TLS