This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179207 - Java VM debugging port value is not checked in properties editor
Summary: Java VM debugging port value is not checked in properties editor
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-04 17:54 UTC by RogerioGomes
Modified: 2012-11-07 03:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
GlassFish properties with too high port number. (45.76 KB, image/png)
2010-01-07 07:38 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RogerioGomes 2010-01-04 17:54:38 UTC
In project debug tab:
org.netbeans.api.debugger.jpda.DebuggerStartException: port out of range:1179766341
        at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.waitRunning(JPDADebuggerImpl.java:354)
        at org.netbeans.api.debugger.jpda.JPDADebugger.attach(JPDADebugger.java:263)
        at org.netbeans.modules.debugger.jpda.ant.JPDAConnect$1.run(JPDAConnect.java:223)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Caused by: java.lang.IllegalArgumentException: port out of range:1179766341
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
        at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:201)
        at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
        at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:72)
        at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:220)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:176)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$100(StartActionProvider.java:74)
        at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:154)
        ... 2 more



In Debug Console
Anexando a localhost:1179766341
port out of range:1179766341
Comment 1 Martin Entlicher 2010-01-06 07:08:29 UTC
This is not a bug, you've just entered bad port number - too high.

*** This bug has been marked as a duplicate of bug 135872 ***
Comment 2 Martin Entlicher 2010-01-07 06:44:08 UTC
I'm reopening this, since I got a screenshot from Rogério Gomes with GlassFish properties, where GlassFish really has "1179766341" as the address.

How GlassFish manage to listen on such port when java.net.InetSocketAddress is not able to accept it?
Also shouldn't "Address to use" be renamed to "Port to use"?
Comment 3 Martin Entlicher 2010-01-07 07:38:40 UTC
Created attachment 93119 [details]
GlassFish properties with too high port number.
Comment 4 Nitya Doraisamy 2010-01-22 11:09:56 UTC
The 'Address to use' property in the GlassFish properties dialog is currently accepting any value provided by the user without validation. 

The GlassFish plugin should be updated so that it validates the user defined.

Note, when you enable the field for the first time the plugin populates the field with an available port value. But the user can change it to any value.
Comment 5 TomasKraus 2012-11-02 14:46:35 UTC
Verified in 7.3 and it's still possible to put any value into the text box.
Comment 6 TomasKraus 2012-11-05 15:16:23 UTC
NetBeans web-main:
------------------
changeset:   238184:6bb22a4aca6c
summary:     #179207 - Debug port accepted values are 0 .. 65535 now.

JTextField was replaced with JSpinner with limits 0 .. 65535 and format "#####".
Socket port limits were taken from java.net.ServerSocket constructor source code.
Comment 7 Quality Engineering 2012-11-07 03:39:59 UTC
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6bb22a4aca6c
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #179207 - Debug port accepted values are 0 .. 65535 now.