关于java程序的一些问题
由于初学java,对于运行后的错误不理解,麻烦大家指教了,谢谢!
2011-9-18 14:05:48 org.apache.catalina.core.AprLifecycleListener init
严重: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:139)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1002)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
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:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2011-9-18 14:05:48 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:1004)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
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:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
2011-9-18 14:05:48 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 453 ms
2011-9-18 14:05:48 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-9-18 14:05:48 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/5.5.33
2011-9-18 14:05:48 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2011-9-18 14:05:48 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization started
2011-9-18 14:05:48 org.apache.catalina.core.ApplicationContext log
信息: Loading Spring root WebApplicationContext
2011-9-18 14:05:48 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
信息: Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/applicationContext.xml]
2011-9-18 14:05:48 org.springframework.context.support.AbstractRefreshableApplicationContext refreshBeanFactory
信息: Bean factory for application context [Root WebApplicationContext]: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,myDataSource,searchService,searchResultDao]; root of BeanFactory hierarchy
2011-9-18 14:05:48 org.springframework.context.support.AbstractApplicationContext refresh
信息: 4 beans defined in application context [Root WebApplicationContext]
2011-9-18 14:05:49 org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
信息: Loading properties file from class path resource [app.properties]
2011-9-18 14:05:49 org.springframework.context.support.AbstractApplicationContext initMessageSource
信息: Unable to locate MessageSource with name 'messageSource ': using default [org.springframework.context.support.DelegatingMessageSource@edf3f6]
2011-9-18 14:05:49 org.springframework.context.support.AbstractApplicationContext initApplicationEventMulticaster
信息: Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster ': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1acd47]
2011-9-18 14:05:49 org.springframework.ui.context.support.UiApplicationContextUtils initThemeSource
信息: Unable to locate ThemeSource with name 'themeSource ': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@30d82d]
2011-9-18 14:05:49 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
信息: Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,myDataSource,searchService,searchResultDao]; root of BeanFactory hierarchy]
2011-9-18 14:05:49 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for root WebApplicationContext
2011-9-18 14:05:49 org.springframework.web.context.ContextLoader initWebApplicationContext
信息: Root WebApplicationContext: initialization completed in 391 ms
2011-9-18 14:05:49 org.apache.catalina.core.ApplicationContext log
信息: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2011-9-18 14:05:49 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-9-18 14:05:49 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-9-18 14:05:49 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-9-18 14:05:49 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-9-18 14:05:49 org.apache.coyote.http11.Http11BaseProtocol start
严重: Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:313)
at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:151)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:76)
at org.apache.catalina.connector.Connector.start(Connector.java:1075)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2011-9-18 14:05:49 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException: service.getName(): "Catalina "; Protocol handler start failed: java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.catalina.connector.Connector.start(Connector.java:1082)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
2011-9-18 14:05:49 org.apache.catalina.startup.Catalina start
信息: Server startup in 1188 ms
2011-9-18 14:05:49 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(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:363)
at org.apache.catalina.startup.Catalina.await(Catalina.java:616)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
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:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
[解决办法]
8080端口被占用了。。。。
[解决办法]
这个错误应该是你机子的8080端口已经被占用,估计是之前的tomcat之类的服务器没有关闭,通过任务管理器关闭tomcat再启动吧,如果实在解决不了就重启电脑,执行你的程序应该可以了
[解决办法]
你看看你是安装版的Tomcat还是解压版的Tomcat,要是安装版的话,是不是已经在系统里面启动Tomcat的服务了,然后你又在Eclipse里面启动,导致8080端口被占用,然后就没有启动成功。
要是解压版的Tomcat,估计你就是上一个服务没有关闭,然后又在启动Tomcat了。
解决办法很easy。关掉Eclipse。然后在进程里面把所有的javaw.exe给结束掉就行了。
[解决办法]
我遇到过这样的问题,你又QQ管家吗,或者其他的管家也可以,
打开网络流量管理的网络连接,看到有tomcat把它结束掉就可以了。
[解决办法]
那已经是另外一个问题了,这个贴子8080端口被占用问题已经解决了,应该结贴了
你显示不了页面什么背景信息都没有,哪个页面不显示,哪里报错都没有,你也不应该这么不负责任地提问
先结贴再开一个新帖把问题说清楚,必要信息贴出来