简体   繁体   English

eclipse EE juno:java.net.bind异常

[英]eclipse EE juno: java.net.bind exception

i am a newbie and just started to work in jsp, i installed the pre-requisites and created a Dynamic Web Project in Eclipse Juno, and to test if the configuration is working well, i have created a dummy jsp page named index.jsp and tried to run it. 我是一名新手,刚开始在jsp中工作,我安装了必备软件并在Eclipse Juno中创建了一个Dynamic Web Project,并且为了测试配置是否正常,我创建了一个名为index.jsp的虚拟jsp页面,并试图运行它。 but i am getting error, the details are below: 但我遇到错误,详细信息如下:

    Jun 26, 2013 5:20:24 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:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Ruby200-x64\bin;C:\Python33\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;C:\Program Files\Java\jdk1.7.0_21\bin;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files (x86)\Windows Live\Shared;.
Jun 26, 2013 5:20:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DemoWebApp1' did not find a matching property.
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 755 ms
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:24 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 489 ms
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]: 
java.net.BindException: Address already in use: JVM_Bind
    at java.net.DualStackPlainSocketImpl.bind0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
    at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
    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:427)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:766)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
    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:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)

Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:27 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jun 26, 2013 5:20:27 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:28 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:30 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:30 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

i cannot figure out what am i doing wrong, or what is NOT properly configured in my system. 我无法弄清楚我在做什么错,或者系统中没有正确配置什么。 thanx in advance :) i really want to start learning JSP as soon as possible, but this is stopping me. 提前感谢thanx :)我真的很想尽快开始学习JSP,但这阻止了我。 HELP!! 救命!!

first you should try to uninstall tomcat and re-install it again by giving proper privileges. 首先,您应该尝试卸载tomcat并通过提供适当的权限再次将其重新安装。 it should work for you. 它应该为您工作。 it worked for me. 它为我工作。

重新安装eclipse和具有root特权的tomcat并重新配置IDE。

You have another process running already which occupies port 8005. 您已经运行另一个占用端口8005的进程。

This typically happens for 8005 when you try to start Tomcat, and it has been started already. 当您尝试启动Tomcat且已经启动时,通常会在8005上发生这种情况。 Either by you elsewhere (another Eclipse debug session) or by having started Tomcat as a service when installing Tomcat. 您可以在其他任何地方(另一个Eclipse调试会话),也可以通过在安装Tomcat时将Tomcat作为服务启动。

By general principle you should not use an installer to get Tomcat up and running when wanting to run it from inside Eclipse, but a zip file. 通常,如果要从Eclipse内部运行Tomcat,则不应使用安装程序来启动和运行Tomcat,而应使用zip文件。

If you are brand new to Java programming, I would suggest Netbeans instead (after uninstalling Tomcat). 如果您是Java编程的新手,我建议您改用Netbeans(在卸载Tomcat之后)。 Their download generally works better out of the box for web development. 他们的下载通常可以更好地用于Web开发。

The port is already being used. 该端口已被使用。 You can do a quick check by changing the port here in this file %CATALINA_HOME%\\conf\\server.xml and running the program again. 您可以通过更改此文件%CATALINA_HOME%\\conf\\server.xml的端口并再次运行该程序来进行快速检查。

您应该使用www.sysinternals.com上的tcpview来找出哪个进程占用了端口8005。如果无法摆脱该进程,则可以尝试在Tomcats server.xml配置备用端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM