装上oracle启动Tomcat时报错

装上oracle后,启动tomcat是所报的错误:

2011-4-13 20:53:21 org.apache.catalina.core.AprLifecycleListener init
信息: 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\jdk1.6.0_12\bin;F:\TomCat\apache-tomcat-6.0.18\bin
2011-4-13 20:53:21 org.apache.coyote.http11.Http11Protocol init
严重: Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind<null>:8080
 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
 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(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)
2011-4-13 20:53:21 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind<null>:8080
 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(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)
2011-4-13 20:53:21 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 579 ms
2011-4-13 20:53:21 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2011-4-13 20:53:21 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
2011-4-13 20:53:22 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2011-4-13 20:53:22 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2011-4-13 20:53:22 org.apache.coyote.http11.Http11Protocol start
严重: Error starting endpoint
java.net.BindException: Address already in use: JVM_Bind<null>:8080
 at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
 at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:519)
 at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
 at org.apache.catalina.connector.Connector.start(Connector.java:1131)
 at org.apache.catalina.core.StandardService.start(StandardService.java:531)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
 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)
2011-4-13 20:53:22 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<null>:8080
 at org.apache.catalina.connector.Connector.start(Connector.java:1138)
 at org.apache.catalina.core.StandardService.start(StandardService.java:531)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
 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)
2011-4-13 20:53:22 org.apache.catalina.startup.Catalina start
信息: Server startup in 1127 ms


这是由于电脑中的数据库端口号8080被占用,我的电脑装了oracle启动tomcat是就出现了个错误。

解决方案:

 oracle端口号修改问题
 如果用户要修改oracle的端口号需要超级管理员进行登录
 登录的口令:sys
 登录的密码:root 是设置的密码
 连接的方式:sysDBA模式

 第一步:获取端口号:
SQL> select dbms_xdb.getHTTPPort from dual;
GETHTTPPORT
-----------
       8080
 第二步:设置端口号:
SQL> exec dbms_xdb.setHTTPPort(8088);
PL/SQL procedure successfully completed
-----------
 第三步:重新获取
SQL> select dbms_xdb.getHTTPPort from dual;
GETHTTPPORT
-----------
       8088   //在这里发现oracle的端口号已经被修改了

 

你可能感兴趣的:(java,apache,oracle,tomcat,sun)