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 160508

Summary: Better warn about problems with HTTP redirects
Product: connecteddeveloper Reporter: mburgess <mburgess>
Component: HudsonAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=147749
Issue Type: ENHANCEMENT Exception Reporter: 147749
Attachments: stacktrace

Description mburgess 2009-03-18 00:58:07 UTC
Build: NetBeans IDE Dev (Build 200903170201)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments:
mburgess: add new hudson server



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.hudson.impl.HudsonJobImpl.isInQueue(HudsonJobImpl.java:116)
        at org.netbeans.modules.hudson.ui.nodes.HudsonJobNode.setHudsonJob(HudsonJobNode.java:190)
        at org.netbeans.modules.hudson.ui.nodes.HudsonJobNode.<init>(HudsonJobNode.java:85)
        at org.netbeans.modules.hudson.ui.nodes.HudsonInstanceNode$InstanceNodeChildren.createNodes(HudsonInstanceNode.java:231)
        at org.netbeans.modules.hudson.ui.nodes.HudsonInstanceNode$InstanceNodeChildren.createNodes(HudsonInstanceNode.java:216)
        at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1608)
Comment 1 mburgess 2009-03-18 00:58:11 UTC
Created attachment 78336 [details]
stacktrace
Comment 2 Jesse Glick 2009-03-18 17:06:01 UTC
Are you running an old version of Hudson? Check "$root/api/xml?depth=1"; there should be <inQueue> elements for every
job, been there at least since Jun 2008. Is your Hudson server public so I can inspect it?
Comment 3 Jesse Glick 2009-03-18 17:14:25 UTC
Can fix that error but there could well be others: cdev #0b82c1b61287
Comment 4 Quality Engineering 2009-03-19 20:36:12 UTC
Integrated into 'main-golden', will be available in build *200903191401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0b82c1b61287
User: Jesse Glick <jglick@netbeans.org>
Log: #160508: NPE.
Comment 5 Jesse Glick 2009-03-25 22:11:11 UTC
Reporter confirms that a faulty IIS redirect config was at fault, fixed using

http://www.seothegame.com/redirects-on-windows-servers-iis-61

Currently ConnectionBuilder will issue a warning to the log if this happens. Better would be for the Add Connection
dialog to test this condition, say by adding ?dummy=value to the URL used when verifying the Hudson version and checking
for redirects which omit this query string, and treat that as an error condition requiring action before the instance
can be added.

Could also check for HTTP_MOVED_PERM redirects and update the URL field with the result. This would not have helped
reporter, whose server is sending an HTTP_MOVED_TEMP redirect which ought never be cached.
Comment 6 Quality Engineering 2009-03-26 14:24:57 UTC
Integrated into 'main-golden', will be available in build *200903260733* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/32c60c57541f
User: Jesse Glick <jglick@netbeans.org>
Log: Better diagnostics for #160508: incorrect server redirects (query string dropped).
Comment 7 Jesse Glick 2009-04-29 16:06:11 UTC
*** Issue 164056 has been marked as a duplicate of this issue. ***
Comment 8 Jesse Glick 2009-04-29 17:24:56 UTC
Fixed Add Hudson Instance dialog to immediately reject an attempt to add a URL if it redirects to another URL without
the query string. cdev #dc3a5b822718
Comment 9 Quality Engineering 2009-04-30 07:29:17 UTC
Integrated into 'main-golden', will be available in build *200904300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dc3a5b822718
User: Jesse Glick <jglick@netbeans.org>
Log: #160508: do not allow you to add a URL if the server is doing incorrect HTTP redirects.
Comment 10 Jesse Glick 2009-06-02 15:43:27 UTC
*** Issue 166412 has been marked as a duplicate of this issue. ***