添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
追风的野马  ·  The Apache Groovy ...·  6 月前    · 
怕老婆的口罩  ·  Supercharge dev: ...·  6 月前    · 
茫然的开心果  ·  JQuery ...·  8 月前    · 
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved : Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here .
FULL PRODUCT VERSION :
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
If the com.sun.management.jmxremote.rmi.port option is provided it will give a NPE if already in use by a different JVM.  Its expected to fail but should provide an appropriate exception.
REGRESSION.  Last worked in version 1.0
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run two instances in different JVMs at same time with the following options:
-Dcom.sun.management.jmxremote.port=2222 -Dcom.sun.management.jmxremote.rmi.port=2223 -Dcom.sun.management.jmxremote.authenticate=false
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Error given port already in use like when jmxremote.port is:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 2223
ACTUAL -
Error: Exception thrown by the agent : java.lang.NullPointerException
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error: Exception thrown by the agent : java.lang.NullPointerException
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test {
	public static void main(String[] args) throws Exception {
		    Thread.sleep(100000);
---------- END SOURCE ----------
Then we trying to start JMXConnectorServer (see method exportMBeanServer of class sun.management.jmxremote.ConnectorBootstrap on already used port it cause IOException. Call of connServer.getAddress().toString() in the exception handler cause NullPointerException because connServer.getAddress() returns null. I see possible fixes: 1. Provide url.toString() if connServer.getAddress() is null 2. Check is port already in use or not. And if it is in use, provide "port already in use".
14-11-2014