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.
Build: NetBeans IDE 6.5 (Build 200811100001) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33 OS: Linux, 2.6.27-8-generic, i386 User comments: STACKTRACE: (first 10 lines) java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222) at java.util.concurrent.FutureTask.get(FutureTask.java:83) at org.netbeans.modules.autoupdate.services.InstallSupportImpl.doDownload(InstallSupportImpl.java:193) at org.netbeans.api.autoupdate.InstallSupport.doDownload(InstallSupport.java:95) at org.netbeans.modules.autoupdate.ui.wizards.InstallStep.tryPerformDownload(InstallStep.java:317) at org.netbeans.modules.autoupdate.ui.wizards.InstallStep.handleDownload(InstallStep.java:218) at org.netbeans.modules.autoupdate.ui.wizards.InstallStep.doDownloadAndVerificationAndInstall(InstallStep.java:191) at org.netbeans.modules.autoupdate.ui.wizards.InstallStep.access$200(InstallStep.java:106) at org.netbeans.modules.autoupdate.ui.wizards.InstallStep$.run(InstallStep.java:183) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
Created attachment 74096 [details] NBMs and update.xml example files
I created a private UC to manage the plugins we usually use in our environment. My idea is to use a file:// update center like: file:////home/hmichel/updates_nb/updates.xml where updates.xml is attached in this issue. I just uploaded public plugins, but I can reproduce it here with these ones. The problem happens when I try to get more than one plugin. The basic use case is install all of them. If I try to get just one of these, no exception is thrown. Steps to reproduce: 1-Open the IDE and create a new UC point to updates.xml file attached; 2-Reload catalog and try to install all the plugins for this UC 3-A exception should be thrown. For stable release, just a small icon on right bottom corner is shown. I did something wrong or there is any workaround?
Created attachment 74098 [details] A non broken UC...
The last UC xml uploaded solve the problem but I have no idea why. The first one I edited by hand, the last I create by ant task at my suite module.
Michel, I`m not yet familiar with the module system, but if you validate the updates.xml from the first attachment (e.g. with help of NetBeans IDE), you`ll see that it does not follow the current DTD http://www.netbeans.org/dtds/autoupdate-catalog-2_5.dtd I can also think of the Issue 142205 - maybe it is related.
You can just remove 'OpenIDE-Module-Build-Version="080305"' and will see that the problem continues... even here.
Another problematic code that I see that distribution attribute equals to empty string (distribution="") for br.com.michaelnascimento.hints and net.java.dev.thinnb modules Jirka, could you please suggest on how we should handle such modules? Should we just hide it from the Plugins dialog? or something else? At which point we should filter out such modules? Thanks in advance, Dmitry.
I guess it's worthless fixing this. The attached catalog updates.xml contains invalid values (empty distribution attribute) and Autoupdate cannot work with that correctly. But all 'officially' subscribed Update Centers are regularly tested to catch problem like this and problematic content must be fixed on server side. hmichel, please fix br.com.michaelnascimento.hints and net.java.dev.thinnb and then it will work for you.
Just to note: having empty "distribution" attribution is valid from DTD point of view.
I don't agree with you about the issue resolution. IMO the DTD should be changed to validate this or, the autoupdate module should advise about the problem. How could users know that this is the problem? The tool should say it to me. I will wait your comment until reopen it. Regards
> ------- Additional comments from hmichel@netbeans.org Wed Nov 26 11:10:32 +0000 2008 ------- > I don't agree with you about the issue resolution. IMO the DTD should be changed to validate this or Right. I agree. > , the autoupdate > module should advise about the problem. How could users know that this is the problem? The tool should say it to me. I I see what you say but consider that the intention of Autoupdate/Plugin Manager is not testing 3rd parties setup. I would be better make a UC test tool to catching such problems. > will wait your comment until reopen it. Please don't. Anyway. in that case ifsomeone will fix it, add try&catch that statement and use report err.log (Level.INFO, <localized message of the problem>); throw new OperationException (OperationException.ERROR_TYPE.INSTALL, <localized message of the problem>);
Proposed fix InstallSupportImpl, line 668): if(source==null) { final String errorString = "Source URL for " + toUpdateImpl.getCodeName () + " is null, most likely distribution attribute is set to the empty string in the UC catalog.\n" + "See also http://www.netbeans.org/issues/show_bug.cgi?id=153799 for more details"; err.log (Level.INFO, errorString ); throw new OperationException (OperationException.ERROR_TYPE.INSTALL, errorString); } OK ?
Looks good. IMHO the best would be using NbBundle for the error message rather than hardcoded message. Thanks
reopen to fix..
Jirka, thanks for suggestion! Fixed. http://hg.netbeans.org/core-main/rev/b60d1779a782
Much better now. BTW, I am not talking about just UC provided by NB, if you don't want to take care about it, this kind of thing _never_ should be public. And we can't forget NB Platform application which uses UC for updates and so on. Beside that, I think now we have a good patch. Thanks.
Integrated into 'main-golden', will be available in build *200811270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b60d1779a782 User: Dmitry Lipin <dlipin@netbeans.org> Log: Issue #153799 java.util.concurrent.ExecutionException: java.lang.NullPointerException
Product Version: NetBeans IDE Dev (Build 200812180001) Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22 System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb) No exceptions were thrown: I Used locale UC with xml file described above.