myeclipse常见问题
myeclipse中启动不了tomcat,之前关联好了并且启动正常,后来不知怎么搞的就启动不了,以下为部分截取信息
2012-2-28 16:09严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind 严重: Failed to initialize connector [Connector[HTTP/1.1-8080]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]] Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind 严重: Failed to initialize end point associated with ProtocolHandler ["ajp-bio-8009"] java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind 严重: Failed to initialize connector [Connector[AJP/1.3-8009]] org.apache.catalina.LifecycleException: Failed to initialize component [Connector[AJP/1.3-8009]] Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed at org.apache.catalina.connector.Connector.initInternal(Connector.java:958) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102) ... 12 more Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind 严重: StandardServer.await: create[localhost:8005]: java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at org.apache.catalina.core.StandardServer.await(StandardServer.java:427) at org.apache.catalina.startup.Catalina.await(Catalina.java:727) at org.apache.catalina.startup.Catalina.start(Catalina.java:673) 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.start(Bootstrap.java:322) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
满意回答
追问
好像真的可以呀,我去关了,然后再打开就可以启动了!能解释一下为什么?谢谢啦
回答
那个javaw.exe有好几个,一个是myeclipse,还有一个是java虚拟机的,最后一个就是tomcat的进程,有时候你程序运行出现线程时也会出现几个.只要javaw.exe属于tomact那个没有关掉那么tomcat启动时就会去检查他,如果存在的进程端口正好和你将要启动的端口相同它就会通知你这端口被占用就是你上面那一堆异常. 让你关了myeclipse就是让不属于tomcat的进程结束,myeclipse关闭后还存在的就是tomcat的进程了
回答
这个正常,看myeclipse设置问题了,有的设置是红色,有的是蓝色也有黑色的,这个到无所谓,能调的.要避免这种情况再次发生最好方法就是熟悉myeclipse的操作,不要做非法操作,在myeclipse运行tomcat时不要去运行或者测试其他非web工程的方法和程序.想要做测试你可以同事安装myeclipse和eclipse,用myeclipse运行tomcat 用eclipse去做一些简单的方法测试.