Myeclipse中配置Tomcat出现问题
装的Myeclipse6.5;
之前学习JSP的时候就直接用的Myeclipse自身的tomcat,但是朋友说自身的tomcat功能太少,所以重新装了个apache-tomcat-6.0.18;
jdk没问题,tomcat的安装也是按照步骤来的;
但是当我运行tomcat6.exe和在myeclipse里发布运行一个web project的时候都出现了这样的问题:
严重: Error initializing endpoint
java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
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)
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
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)
严重: StandardServer.await: create[8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
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)
这是什么问题?端口占用?我该怎么做?然后再弱弱的问个问题:安装完tomcat之后,在安装文件里我需要点那个文件启动tomcat,就是显示桌面右下角的tomcat启动图标
[解决办法]
查看端口点击开始->运行->输入cmd 进入dos命令之后 输入netstat -a 查看是那个程序占用了端口(估计是javax.exe)
然后再进程中把应用程序结束掉
另外,LZ找个不用安装就行了,然后用myeclipse自动部署上去 这个很简单吧!
------解决方案--------------------
端口被占用 在任务管理器中结束你的javaw。exe 再试试
[解决办法]
8080一般式tomcat ,是不是你已经启动一个tomcat?
或者你改下端口号,z在conf\server.xml
[解决办法]
端口占用
打开任务管理器,把里面的java.exe,javaw.exe,tomcat.exe(如果有)都结束了。
当然有可能把myeclipse也关了,所以操作前先保存好。然后在重新启动。
或者到tomcat 下的conf文件下的server.xml 把
<Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
改成
<Connector port="8099" protocol="AJP/1.3" redirectPort="8443" />
就OK了
红色端口是自己可以定义的。
[解决办法]