不为失败找借口,只为成功找方法!
分类: Java
2014-07-20 19:03:52
异常如下:
严重: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é????????)????í??
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:646)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:753)
at org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:137)
at org.apache.catalina.connector.Connector.start(Connector.java:1080)
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:593)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2012-8-3 11:36:13 org.apache.catalina.startup.Catalina start
严重: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] ?????????×???(Э?é????????)????í??
at org.apache.catalina.connector.Connector.start(Connector.java:1087)
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:593)
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:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2012-8-3 11:36:13 org.apache.catalina.startup.Catalina start
平时运行的项目挺好的,不过今天一直报异常,启动tomcat就报错。找了半天才找到原因啊。
原因:tomcat端口号被占用。
方法:
开始–运行–cmd进入命令提示符输入netstat –ano|findstr “8080”
可以结束使用端口号的进程,也可以修改tomcat端口。
tomcat 的常规配置方法:
1.Tomcat\conf\server.xml
a.
b.
端口可以根据情况进行设置
2.TOMCAT\webapps\ROOT\WEB-INF\classes\shikong.properties
ccerp.url=jdbc:jtds:sqlserver://ip地址:端口号/gderp;tds=8.0;
lastupdatecount=true;
ccerp.user=用户名
ccerp.password=密码
3.TOMCAT\webapps\ROOT\WEB-INF\classes\ hibernate.cfg.xml
jdbc:jtds:sqlserver://ip地址:端口号/jserp;tds=8.0;
lastupdatecount=true;
net.sourceforge.jtds.jdbc.Driver