Setting property 'keystoreFile' did not find a matching property. No Certificate file specified or invalid file format


I encountered this weird exception on X server even after configuring the Tomcat  configuration file properly same as i did for other server  Y where it is working fine.
Solution is mentioned after the exception log:

May 24, 2011 5:23:45 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystoreFile' to 'C:\Program Files\Java\jdk1.6.0_25\keystore\.keystore' did not find a matching property.
May 24, 2011 5:23:45 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'keystorePass' to 'changeit' did not find a matching property.
May 24, 2011 5:23:45 PM org.apache.catalina.startup.SetAllPropertiesRule begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'clientAuth' to 'false' did not find a matching property.
May 24, 2011 5:23:46 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 24, 2011 5:23:46 PM org.apache.coyote.http11.Http11AprProtocol init
SEVERE: Error initializing endpoint
java.lang.Exception: No Certificate file specified or invalid file format
                at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
                at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:720)
                at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
                at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
                at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
                at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
                at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
                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:597)
                at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
                at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
May 24, 2011 5:23:46 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.lang.Exception: No Certificate file specified or invalid file format
Solution:
Update the server.xml file as follows:
 <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"               maxThreads="150" scheme="https" secure="true" keystoreFile="C:\Program Files\Java\jdk1.6.0_25\keystore\.keystore" keystorePass="changeit"           clientAuth="false" sslProtocol="TLS" />

Please note that i changed the protocol from "HTTP/1.1"  to "org.apache.coyote.http11.Http11NioProtocol" 
This should fix the problem.

Comments

Mateusz Matela said…
Thankyou so much, it worked! Any idea why something like this happens? It's very strange...
pk said…
thanks, it worked :)
Anonymous said…
awesome its working fine..
Anonymous said…
thank you so much. this fix solved my issue
Anand said…
Thanks and Its helps me!
Anonymous said…
Thanks a lot. Fixed my issue!!
Anonymous said…
Thnaks mate, I owe you one!
Tom said…
Great! Thanks for sharing - saved me a lot of time!
Unknown said…
Yea, this works for me also. Thx
Unknown said…
it works good for me, thx
Rob Levine said…
I was getting this error when configuring JetBrains YouTrack to use https (which uses Tomcat). This solved it, thank you!
Anonymous said…
Thank you so much! It worked!

Popular posts from this blog

Load data from CSV into HIVE table using HUE browser

Gitlab change project visibility from private to internal