当我尝试使用带有java 1.6.0_05的startup.bat运行Tomcat 7时,它正在运行。如果我将版本更改为jdk1.6.0_45或jdk1.7.0_65,则表示错误。这似乎是java版本的问题,但我无法弄清楚可能的原因。
C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\bin>java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)
This is working fine.
But in case I change the jdk to jdk1.6.0_45 or jdk1.7.0_65.
C:\Users\test>java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
**Tomcat 7 is no more starting. It is giving exception.**
Jul 15, 2014 11:21:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8.
Jul 15, 2014 11:21:09 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1g 7 Apr 2014)
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-apr-7733"]
org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.
at org.apache.tomcat.jni.Socket.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
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:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-7733]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-7733]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
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:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.
at org.apache.tomcat.jni.Socket.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
... 13 more
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:10 PM org.apache.coyote.AbstractProtocol init
SEVERE: Failed to initialize end point associated with ProtocolHandler ["ajp-apr-8009"]
org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.
at org.apache.tomcat.jni.Socket.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
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:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService initInternal
SEVERE: Failed to initialize connector [Connector[AJP/1.3-8009]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:813)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
at org.apache.catalina.startup.Catalina.load(Catalina.java:663)
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:280)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:454)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:980)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: org.apache.tomcat.jni.Error: 730106: The requested service provider could not be loaded or initialized.
at org.apache.tomcat.jni.Socket.create(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:420)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:640)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:434)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:978)
... 13 more
Jul 15, 2014 11:21:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2310 ms
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 15, 2014 11:21:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Jul 15, 2014 11:21:10 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\docs
Jul 15, 2014 11:21:12 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [739] milliseconds.
Jul 15, 2014 11:21:12 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\docs has finished in 1,618 ms
Jul 15, 2014 11:21:12 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\examples
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\examples has finished in 977 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\host-manager
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\host-manager has finished in 112 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\manager
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\manager has finished in 114 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\ROOT
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Programs\apache-tomcat-7.0.54-windows-x64\apache-tomcat-7.0.54\webapps\ROOT has finished in 90 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3007 ms
Jul 15, 2014 11:21:13 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
at java.net.ServerSocket.createImpl(ServerSocket.java:308)
at java.net.ServerSocket.getImpl(ServerSocket.java:257)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:426)
at org.apache.catalina.startup.Catalina.await(Catalina.java:777)
at org.apache.catalina.startup.Catalina.start(Catalina.java:723)
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.start(Bootstrap.java:321)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:13 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-7733"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
Jul 15, 2014 11:21:13 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]
这个问题的可能原因是什么?我查看了许多论坛,但没有得到任何解决方案。