我装了1.6的JDK,配置了环境变量,可以正常运行JAVA程序,我也装了最新版的SDK,然后我装了TOMCAT 6.0和ECLIPSE,然后我对TOMCAT 6.0设置了环境变量,刚装好的时候,可以正常启动TOMCAT,也有图标,然后我重启电脑后,就启动不起来,说是unable to open the service tomcat6,但是测试页面可以打开.JSP网页可以运行,但是tomcat 就是启动不起来,屏幕的右下角也没有图标.
我用的是VISTA系统,我从昨天晚上搞到现在,就指着各位大侠指条活路,,,,在线等!!!!!!!!
谢谢!!!
还有,我在ECLIPSE中启动TOMCAT时,有如下错误:
2007-10-16 18:33:07 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_03\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.6.0_03\jre\bin;C:\Program Files\Java\jdk1.6.0_03\bin\..\jre\bin\client;C:\Program Files\Java\jdk1.6.0_03\bin\..\jre\bin;.;C:\Program Files\Java\jdk1.6.0_03\bin;.;C:\Program Files\Java\jdk1.6.0_03;\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Sun\SDK\bin;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin
2007-10-16 18:33:08 org.apache.coyote.http11.Http11Protocol init
严重: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
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.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2007-10-16 18:33:08 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792)
at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
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.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2007-10-16 18:33:08 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 667 ms
2007-10-16 18:33:08 org.apache.naming.NamingContext lookup
警告: Unexpected exception resolving reference
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:582)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans
严重: Exception processing Global JNDI Resources
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat-users.xml.old
at org.apache.naming.NamingContext.lookup(NamingContext.java:805)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:113)
at org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:137)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:109)
at org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:81)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:703)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2007-10-16 18:33:08 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.14
2007-10-16 18:33:08 org.apache.naming.NamingContext lookup
警告: Unexpected exception resolving reference
java.io.IOException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat-users.xml.old
at org.apache.catalina.users.MemoryUserDatabase.save(MemoryUserDatabase.java:582)
at org.apache.catalina.users.MemoryUserDatabaseFactory.getObjectInstance(MemoryUserDatabaseFactory.java:104)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.catalina.realm.UserDatabaseRealm start
严重: Exception looking up UserDatabase under key UserDatabase
javax.naming.NamingException: Cannot rename original file to C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat-users.xml.old
at org.apache.naming.NamingContext.lookup(NamingContext.java:805)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:253)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException: No UserDatabase component found under key UserDatabase
at org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:261)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1037)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.catalina.startup.Catalina start
信息: Server startup in 205 ms
2007-10-16 18:33:08 org.apache.catalina.core.StandardServer await
严重: 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(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:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:630)
at org.apache.catalina.startup.Catalina.start(Catalina.java:590)
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:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2007-10-16 18:33:08 org.apache.coyote.http11.Http11Protocol pause
信息: Pausing Coyote HTTP/1.1 on http-8080
2007-10-16 18:33:08 org.apache.catalina.connector.Connector pause
严重: Protocol handler pause failed
java.lang.NullPointerException
at org.apache.jk.server.JkMain.pause(JkMain.java:679)
at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)
at org.apache.catalina.connector.Connector.pause(Connector.java:1074)
at org.apache.catalina.core.StandardService.stop(StandardService.java:563)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:616)
at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:659)
[此贴子已经被作者于2007-10-16 18:54:13编辑过]
----------------解决方案--------------------------------------------------------
呵呵,什么都是最新的~~
那请看一下在系统服务里的apeche那一项服务有没有自己启动啊?如果没有就设置为自启动吧。
不过我从你所贴出来的异常可以看到啊 java.net.BindException: Address already in use: JVM_Bind:8080
这个意思说你的java虚拟机的端口已经被绑定了,所以在启动Eclipse之前要确保 TOMCAT是关闭的。明白吗?
意思是说在启动Eclipse之前要把 Eclipse 以外的tomcat 关闭,然后再启动eclipse 和与 eclipse 所关联的tomcat
如果不是,就会发生端口冲突了.
----------------解决方案--------------------------------------------------------
楼上说得不错.
不过我个人建议不要在eclipse 中启动tomcat.有时候会倒致不可预知的麻烦.
----------------解决方案--------------------------------------------------------