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 61107 - <nbinstaller> broken
Summary: <nbinstaller> broken
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: REGRESSION, SIMPLEFIX
Depends on:
Blocks: 58258
  Show dependency tree
 
Reported: 2005-07-19 13:29 UTC by Jean-francois Denise
Modified: 2008-12-23 08:40 UTC (History)
6 users (show)

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 Jean-francois Denise 2005-07-19 13:29:08 UTC
Want to reproduce it:
It happens each time you try to deploy the JMX
module using reloadInCurrentIDE custom task (located in our build.xml).
If you want to experience it in less than  2 minutes, do  :
- a checkout of management project
- Open management/jmx project
- Select build.xml file
- Run reloadInCurrentIDE task. You will see it all.

Some details:

I just compiled a netbeans stable release 4.2.

I opened our JMX module project, compiled it and tried to deploy it in
the current IDE. It failed with some warnings and a ClassNotFound error
for FeaturesDeployer class.
This class is referenced in layer.xml in order to hide/show features...

I exited netbeans (typed Ctrl C, exit action beeing too early).

I then relaunched it. The module was installed properly,

I tried again. Then I had :
- java.util.MissingResourceException: No such bundle
org.netbeans.modules.project.ui.Bundle

- and the FeatureDeployer class not found.

I attached the stack trace, what did I do wrong?

Help would be very appreciated. It is quite difficult to findout what is
going on.

Regards.

Jean-Francois




Warning: unknown module code base: org.netbeans.modules.jmx in
MasterFileObject@135b538[file:/home/jfdenise/jmgt/cvs/netbeans-dev-src/management/jmx/src/org/netbeans/modules/jmx/jconsole/JConsoleSettings.settings]
[org.netbeans.core.modules #3] Warning: the module
org.netbeans.modules.jmx uses OpenIDE-Module-IDE-Dependencies which is
deprecated. See http://openide.netbeans.org/proposals/arch/modularize.html
[org.netbeans.core.modules #3] Warning - had to upgrade dependencies for
module org.netbeans.modules.jmx: added = [module org.openide.compat >
6.0, module org.openide.actions > 6.0, module
org.netbeans.modules.project.ant/1 > 1.3, module org.openide.util > 6.0,
module org.openide.util.enumerations > 6.0, module org.openide.loaders >
5.3, module org.netbeans.modules.projectapi/1 > 1.3, module
org.openide.awt > 6.0, module org.openide.modules > 6.0, module
org.openide.filesystems > 6.0, module org.openide.options > 6.0, module
org.openide.windows > 6.0, module org.netbeans.modules.java.project/1 >
1.3, module org.openide.dialogs > 6.0, module org.openide.nodes > 6.0,
module org.openide.text > 6.0, module org.openide.explorer > 6.0, module
org.netbeans.modules.projectuiapi/1 > 1.4] removed = [module
org.openide.loaders > 1.0, module org.openide/1 > 4.50.1, module
org.netbeans.modules.project.ant/0, module
org.netbeans.modules.projectapi/0, module
org.netbeans.modules.projectuiapi/0, module
org.netbeans.modules.java.project/0]; details: [Major release version of
module changed from 0 to 1 to signal stability; update your
dependencies, openide.jar split into smaller parts. See
http://openide.netbeans.org/proposals/arch/modularize.html and use 'ant
fix-dependencies' if your project is projectized.]
java.lang.ClassNotFoundException: org.netbeans.modules.jmx.FeaturesDeployer
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at
org.apache.tools.ant.module.bridge.AntBridge$MaskedClassLoader.loadClass(AntBridge.java:621)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:242)
        at
org.openide.filesystems.ExternalUtil.findClass(ExternalUtil.java:83)
        at
org.openide.filesystems.XMLMapAttr$Attr.methodValue(XMLMapAttr.java:858)
        at
org.openide.filesystems.XMLMapAttr$Attr.getObject(XMLMapAttr.java:818)
        at org.openide.filesystems.XMLMapAttr$Attr.get(XMLMapAttr.java:579)
        at
org.openide.filesystems.XMLMapAttr$Attr.access$200(XMLMapAttr.java:355)
        at
org.openide.filesystems.XMLMapAttr.getAttribute(XMLMapAttr.java:166)
  at org.openide.filesystems.XMLMapAttr.get(XMLMapAttr.java:137)
        at
org.openide.filesystems.XMLFileSystem$FileObjRef.readAttribute(XMLFileSystem.java:969)
        at
org.openide.filesystems.XMLFileSystem$Impl.readAttribute(XMLFileSystem.java:814)
        at
org.openide.filesystems.AbstractFileObject.getAttribute(AbstractFileObject.java:283)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:757)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:719)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:755)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:719)
        at
org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:644)
        at org.openide.loaders.DataShadow.readURL(DataShadow.java:407)
        at org.openide.loaders.DataShadow.deserialize(DataShadow.java:397)
        at
org.openide.loaders.DataLoaderPool$ShadowLoader.createMultiObject(DataLoaderPool.java:884)
        at
org.openide.loaders.MultiFileLoader.handleFindDataObject(MultiFileLoader.java:73)
        at
org.openide.loaders.DataObjectPool.handleFindDataObject(DataObjectPool.java:111)
        at
org.openide.loaders.DataLoader.findDataObject(DataLoader.java:358)
        at
org.openide.loaders.DataLoaderPool.findDataObject(DataLoaderPool.java:386)
        at org.openide.loaders.FolderList.createBoth(FolderList.java:701)
        at org.openide.loaders.FolderList.access$600(FolderList.java:50)
        at org.openide.loaders.FolderList$2.run(FolderList.java:334)
        at org.openide.util.Task.run(Task.java:207)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
Comment 1 Roman Strobl 2005-07-25 12:22:17 UTC
Reassigning to management, please evaluate. Thanks!
Comment 2 _ rkubacki 2005-08-24 13:07:50 UTC
Jesse might know what is wrong. I had similar problems w/ reload if the module
has some extensions.
Comment 3 Jesse Glick 2005-08-24 14:25:37 UTC
reload-in-ide is known to be completely broken at the moment. It appears that
global lookup is either empty or badly damaged by the module reloading.
Curiously, this only applies to using <nbinstaller> - *not* to using --reload CLI.

Was working in NB 4.1, so this is a 4.2 regression. I tentatively suspect that
it has to do with the big changes in core structure that Yarda did, but that's
just a guess.
Comment 4 Jesse Glick 2005-09-30 21:43:10 UTC
Found it; bug in NbInstaller.load: was using the thread context class loader
rather than the module manager's class loader, which usually is OK, but fails if
run from inside an Ant task since Ant sets its own context loader. Seems to have
been introduced during the #58258 refactoring, as far as I can tell.
Comment 5 Jesse Glick 2005-10-01 00:00:52 UTC
committed     Up-To-Date  1.17       
core/startup/src/org/netbeans/core/startup/NbInstaller.java