1. ホーム
  2. java

[解決済み] プロトコルハンドラの初期化に失敗しました。

2022-02-24 09:35:15

質問

Tomcat 6.0を起動しようとすると、このようなエラーが発生します。

ということで、この件に関して何か解決策を教えてください。

Mar 9, 2011 5:29:00 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Java/jre6/bin/client;C:/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Java\jdk1.5\bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Liquid Technologies\Liquid XML Studio 2009\XmlDataBinder7\Redist7\cpp\win32\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\MySQL\MySQL Server 5.0\bin
Mar 9, 2011 5:29:00 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
Mar 9, 2011 5:29:00 PM org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore
SEVERE: Failed to load keystore type JKS with path C:\Documents and Settings\sanjay.prajapati/.keystore due to C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130)
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
    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(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:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Mar 9, 2011 5:29:00 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130)
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
    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(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:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Mar 9, 2011 5:29:00 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
    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(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:260)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
Mar 9, 2011 5:29:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 506 ms
Mar 9, 2011 5:29:00 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 9, 2011 5:29:00 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
Mar 9, 2011 5:29:00 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Mar 9, 2011 5:29:00 PM org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore
SEVERE: Failed to load keystore type JKS with path C:\Documents and Settings\sanjay.prajapati/.keystore due to C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130)
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
    at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
    at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
    at org.apache.catalina.connector.Connector.start(Connector.java:1087)
    at org.apache.catalina.core.StandardService.start(StandardService.java:534)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    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:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Mar 9, 2011 5:29:00 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:347)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:269)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:482)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:419)
    at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:130)
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
    at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
    at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
    at org.apache.catalina.connector.Connector.start(Connector.java:1087)
    at org.apache.catalina.core.StandardService.start(StandardService.java:534)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    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:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Mar 9, 2011 5:29:00 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.io.FileNotFoundException: C:\Documents and Settings\sanjay.prajapati\.keystore (The system cannot find the file specified)
    at org.apache.catalina.connector.Connector.start(Connector.java:1094)
    at org.apache.catalina.core.StandardService.start(StandardService.java:534)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    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:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Mar 9, 2011 5:29:00 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 302 ms

どのように解決するのですか?

tomcat keystore のエラーを解除するには、以下の操作を行うだけです。 取り除く server.xml の以下のエントリ。

SSL の設定を管理するための関連リンク リンクス

Tomcat 3.2用シンタックス :

<Connector className="org.apache.tomcat.service.PoolTcpConnector"> 
<Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/> 
<Parameter name="port" value="8443"/> 
<Parameter name="socketFactory" value="org.apache.tomcat.net.SSLSocketFactory" /> 
<Parameter name="keystore" value="/var/tomcat/conf/keystore" /> 
<Parameter name="keypass" value="mynewpass"/> 
<Parameter name="clientAuth" value="false"/> 
</Connector>

Tomcat 3.3用シンタックス :

<Http10Connector 
  port="8443" 
  secure="true" 
  keystore="/var/tomcat/conf/keystore" 
  keypass="mynewpass" 
  clientauth="false" />

tomcatを再起動すると、エラーが表示されなくなるはずです。