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 183371 - Update Center Wizard generates incorrect/Non-working Layer file
Summary: Update Center Wizard generates incorrect/Non-working Layer file
Status: RESOLVED DUPLICATE of bug 172891
Alias: None
Product: apisupport
Classification: Unclassified
Component: Templates (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 19:11 UTC by stefika
Modified: 2010-04-02 16:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stefika 2010-04-01 19:11:34 UTC
When generating an update center in  a new module suite, NetBeans puts out an incorrect combination of layer/bundle files, which causes an exception to be thrown in the IDE if the update center is loaded. I am attaching a module suite with only one module (an update center). 

Even if the layer file does have a correct solution, the wizard should not, by default generate code that does not work.

The offending line of code in the layer file is as follows:

<attr name="displayName" bundlevalue="org.suite.test.Bundle#Services/AutoupdateType/org_suite_test_update_center.instance"/>

This value used to be generated like so:

<attr name="SystemFileSystem.localizingBundle" stringvalue="org.suite.test.Bundle"/>

However, this no longer works correctly either, as this causes NetBeans to correctly load in the module, but incorrectly remove the update center if the module is uninstalled. At least, however, in this case, it works and does not throw an exception on load.

Here is the exception thrown now when the wizard generates the update center layer.xml file (on bootup):

java.lang.NullPointerException
	at org.openide.util.NbBundle.getBundleFast(NbBundle.java:481)
	at org.openide.util.NbBundle.getBundle(NbBundle.java:438)
	at org.openide.util.NbBundle.getBundle(NbBundle.java:375)
	at org.netbeans.modules.autoupdate.updateprovider.AutoupdateCatalogFactory.createUpdateProvider(AutoupdateCatalogFactory.java:93)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(BinaryFS.java:603)
	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:536)
	at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:382)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:844)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:793)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:840)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:793)
	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:726)
	at org.openide.loaders.InstanceDataObject$Ser.instanceCreate(InstanceDataObject.java:1376)
	at org.openide.loaders.InstanceDataObject.instanceCreate(InstanceDataObject.java:824)
	at org.openide.loaders.FolderLookup$ICItem.getInstance(FolderLookup.java:584)
	at org.openide.util.lookup.AbstractLookup$R.allInstances(AbstractLookup.java:1003)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:548)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:548)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489)
	at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl$LookupListenerImpl.allInstances(UpdateUnitProviderImpl.java:451)
	at org.netbeans.modules.autoupdate.services.UpdateUnitProviderImpl.getUpdateUnitProviders(UpdateUnitProviderImpl.java:254)
	at org.netbeans.api.autoupdate.UpdateUnitProviderFactory.getUpdateUnitProviders(UpdateUnitProviderFactory.java:81)
	at org.netbeans.modules.autoupdate.ui.actions.AutoupdateCheckScheduler$7.run(AutoupdateCheckScheduler.java:447)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 1 dlipin 2010-04-02 07:51:23 UTC
probably dup of 172891
Comment 2 Jesse Glick 2010-04-02 16:53:06 UTC

*** This bug has been marked as a duplicate of bug 172891 ***