ASF Bugzilla – Attachment 23946 Details for
Bug 47499
provide better insight on BindException: Cannot assign requested address
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
tomcat_rfe_47499patch.txt
tomcat_rfe_47499patch.txt (text/plain), 1.84 KB, created by
Ralf Hauser
on 2009-07-08 22:06:49 UTC
(
hide
)
Description:
tomcat_rfe_47499patch.txt
Filename:
MIME Type:
Creator:
Ralf Hauser
Created:
2009-07-08 22:06:49 UTC
Size:
1.84 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P tomcat >Index: connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java >=================================================================== >--- connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java (revision 791795) >+++ connectors/util/java/org/apache/tomcat/util/net/PoolTcpEndpoint.java (working copy) >@@ -281,6 +281,20 @@ > return curThreads - workerThreads.size(); > } > >+ public static class BindExceptionWithCause extends BindException { >+ private Throwable cause = null; >+ public Throwable getCause() { >+ return this.cause; >+ } >+ public BindExceptionWithCause(String message) { >+ super(message); >+ } >+ public BindExceptionWithCause(String message,Throwable causeHere) { >+ super(message); >+ cause = causeHere; >+ } >+ } >+ > // -------------------- Public methods -------------------- > > public void initEndpoint() throws IOException, InstantiationException { >@@ -288,14 +302,16 @@ > if(factory==null) > factory=ServerSocketFactory.getDefault(); > if(serverSocket==null) { >+ String inetForBE = ""; > try { > if (inet == null) { > serverSocket = factory.createSocket(port, backlog); > } else { >+ inetForBE = inet.toString(); > serverSocket = factory.createSocket(port, backlog, inet); > } > } catch ( BindException be ) { >- throw new BindException(be.getMessage() + ":" + port); >+ throw new BindExceptionWithCause(be.getMessage() + ":" + port+inetForBE, be); > } > } > if( serverTimeout >= 0 )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 47499
:
23946
|
24302