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 187186

Summary: Doing a CVS update/refresh causes NPE
Product: versioncontrol Reporter: elishae <elishae>
Component: CVSAssignee: Ondrej Vrabec <ovrabec>
Status: VERIFIED FIXED    
Severity: normal CC: davetto71, mmirilovic, rbalada, ruivale
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:
Attachments: messages.log

Description elishae 2010-06-04 08:19:41 UTC
StackTrace:
java.lang.NullPointerException
        at org.netbeans.modules.proxy.ProxySocketFactory.proxyToCs(ProxySocketFactory.java:448)
        at org.netbeans.modules.proxy.ProxySocketFactory.createSocket(ProxySocketFactory.java:419)
        at org.netbeans.modules.proxy.ProxySocketFactory.createSocket(ProxySocketFactory.java:386)
        at org.netbeans.modules.proxy.ProxySocketFactory.createSocket(ProxySocketFactory.java:252)
        at org.netbeans.lib.cvsclient.connection.PServerConnection.openConnection(PServerConnection.java:220)
        at org.netbeans.lib.cvsclient.connection.PServerConnection.open(PServerConnection.java:359)
        at org.netbeans.lib.cvsclient.Client$1.run(Client.java:325)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 1 Marian Mirilovic 2010-06-04 13:20:05 UTC
elishae, 
could you please attach the whole messages.log file (located in userdir) ?
http://wiki.netbeans.org/FaqWhatIsUserdir
Thanks in advance.
Comment 2 Tomas Stupka 2010-06-04 13:34:39 UTC
looking at the code, the cause for the NPE seems to be quite obvious. Will fix asap.

elishae - it still would be nice if you could attach your messages.log file.

thanks
Comment 3 Tomas Stupka 2010-06-04 13:36:46 UTC
http://hg.netbeans.org/cdev/rev/e63b2ff53898
fixed
Comment 4 Quality Engineering 2010-06-05 07:48:59 UTC
Integrated into 'main-golden', will be available in build *201006050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e63b2ff53898
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #187186 - Doing a CVS update/refresh causes NPE
Comment 5 elishae 2010-06-07 04:18:47 UTC
Thanks for the quick fix.

I work in a restricted environment where i'm not* allowed to upload any content to any site (for security reasons). So I could not upload the messages.log
Comment 6 elishae 2010-06-07 04:39:28 UTC
Though there seems to be a bug here.. To me, the root cause seems to be some where else.

As per my understanding, Proxy Selector should NOT* return a Proxy for the uris listed in 'No Proxy Hosts' text box. (Correct me if i'm wrong)

Here, the URI I'm trying to connect is an intranet URI and as such does NOT require a proxy to connect to.

CVS update works fine *as long as* I dont set up the proxy (manual proxy).

These are my observations:

1. After setting up the proxy, the CVS update stops working.

2. Resetting the settings to use NO PROXY does not help either.

3. Recreating the user-dir solves the issue.

So, to me it looks like the code that sets the proxy settings is goofed up some how. Please verify.
Comment 7 elishae 2010-06-07 05:31:00 UTC
After Examining the Code of NbProxySelector.java, I *guess* that the problem lies there.

At Line 279:
 dontUseProxy = host.startsWith(start) && host.endsWith(end);

instead, it should be 
 dontUseProxy = host.startsWith(start) || host.endsWith(end);


For, a non-proxy-host pattern:
   *.x matches host.endsWith(end) [but not with host.startsWith]
and 
   x.* matches host.startsWith(start) [but not with host.endsWith]

As this seems to be a global problem with proxy settings, I strongly suggest that, it should be considered a candidate for pushing in 6.9 Release build.
Comment 8 elishae 2010-06-07 15:05:04 UTC
Reopening the issue, as the fix checked in does not resolve the issue at hand.

Might be need to reassign to some other component?
Comment 9 Tomas Stupka 2010-06-07 15:34:10 UTC
> Reopening the issue, as the fix checked in does not resolve the issue at hand.
do you still get the nullpointer as reported? because otherwise it's be better to file a new issue as it seems to be a different bug. see issue #187278 to keep track about the proxyselector problems you described in your previous comments

will close this for now but feel free to reopen in case the NPE should still appear.
Comment 10 rbalada 2010-06-16 08:55:47 UTC
Please verify bugfix for this bug, so it can be included in release691 repository.

Thanks,
-R
Comment 11 Petr Blaha 2010-06-17 11:51:48 UTC
verified
Comment 12 rbalada 2010-06-18 08:17:59 UTC
main #e63b2ff53898 transplanted to release691 #eac99b7d3939
Comment 13 Ondrej Vrabec 2010-07-02 13:40:20 UTC
*** Bug 188318 has been marked as a duplicate of this bug. ***
Comment 14 oouzo 2010-07-08 13:32:05 UTC
Created attachment 100694 [details]
messages.log
Comment 15 oouzo 2010-07-08 13:33:11 UTC
Same issue. The CVS worked correctly on NB6.8. It has never worked with NB 6.9.
Comment 16 trskin 2010-07-19 00:43:57 UTC
I have found that deleting
.netbeans\6.9\config\Preferences\org\netbeans\modules\keyring\win32.properties
stops the null pointer error.
After re-starting NetBeans, I can re-enter Proxy settings etc with no further problem.
Comment 17 trskin 2010-07-19 00:51:28 UTC
(In reply to comment #16)
> I have found that deleting
> .netbeans\6.9\config\Preferences\org\netbeans\modules\keyring\win32.properties
> stops the null pointer error.
> After re-starting NetBeans, I can re-enter Proxy settings etc with no further
> problem.
PS I originally brought my settings over from 6.8. Perhaps that process has a problem
Comment 18 trskin 2010-08-04 22:34:59 UTC
Disregard my comment - it was a temporary fix only. I have reverted to 6.8(In reply to comment #17)
> (In reply to comment #16)
> > I have found that deleting
> > .netbeans\6.9\config\Preferences\org\netbeans\modules\keyring\win32.properties
> > stops the null pointer error.
> > After re-starting NetBeans, I can re-enter Proxy settings etc with no further
> > problem.
> PS I originally brought my settings over from 6.8. Perhaps that process has a
> problem