Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 135332 - Massive code duplication between jmx and jconsole modules
Massive code duplication between jmx and jconsole modules
Product: contrib
Classification: Unclassified
Component: JMX
All All
: P1 (vote)
: 6.x
Assigned To: Joel Feraud
Jean-francois Denise
Depends on:
  Show dependency treegraph
Reported: 2008-05-19 16:30 UTC by Jesse Glick
Modified: 2008-05-21 04:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-05-19 16:30:07 UTC
Changeset #c96ac50ad906 ("JMX module split into jmx.common (autoload) + JMX + JConsole modules.") seems to have *copied*
JMX sources into JConsole rather than *moving* them. There are now numerous classes shared between the two modules. This
causes errors such as

ClassNotFoundException: Will not load class org.netbeans.modules.jmx.configwizard.JMXConfigWizardIterator arbitrarily
from one of org.netbeans.StandardModule$OneModuleClassLoader@2f031310[org.netbeans.modules.jmx] and
org.netbeans.StandardModule$OneModuleClassLoader@ffce2f2[org.netbeans.modules.jconsole]; see
	at org.netbeans.ProxyClassLoader.loadClass(


Will not load class org.netbeans.modules.jmx.jconsole.LaunchAction arbitrarily ...

Please go through these modules, figure out what belongs where, and remove the duplicates.

In the meantime, I am removing the jconsole module from AU, as its presence is breaking production builds.
Comment 1 Jesse Glick 2008-05-19 16:33:40 UTC
Removing jconsole from AU temporarily: #32725ced3c03
Comment 2 Joel Feraud 2008-05-19 17:52:27 UTC

The issue is only with the sources in main repository, not with the modules from the update center.

The jmx.common (autoload) + JMX + JConsole modules submitted to the 6.1 stable UC (issue )are *correct* :

If I look at the contents of org-netbeans-modules-jmx.jar it does not contain the classes which have been moved to
JConsole (such as the configwizard package for example).

I think I understand what happened when I pushed the sources to the main repository: I did an hg update before doing my
hg commit and push, so that brought over again in my repo the removed file. So the hp push pushed only the modified and
new files, and not the removed ones, I did not notice this mistake in the changeset Sorry about that.

Note that the correct modules with the classes correctly moved/removed were first built and correctly validated and then
submitted to UC (Apr 17), and the mistake in the source push occurred only afterwards (Apr 18).

I am going to fix the state of the main repository ASAP.

Comment 3 Joel Feraud 2008-05-19 17:56:11 UTC

Since the nbm files from the update center are correct, and meanwhile I remove from the netbeans repository the files
that mistakenly remained in the jmx module source tree, would you agree to:

1. make again JConsole module available from the update center,

2. downgrade this issue to P2.

Comment 4 Joel Feraud 2008-05-19 18:29:08 UTC
FIXED: JConsole files which mistakenly remained in jmx module sources have been removed from NetBeans main hg repository.

Comment 5 Jesse Glick 2008-05-19 18:56:38 UTC
I am talking about the problem in trunk sources, which was breaking trunk builds; 6.1 AU is your concern.

Since #df2461dc050b seems to have removed the duplication, I will readd jconsole to the AU config: #2c4e3a938669 is in both modules and should probably be deleted; even if it is still needed
(which I doubt), it is used only during the build and should never have been put in src/ to begin with.
Comment 6 Jesse Glick 2008-05-19 19:07:07 UTC
BTW the original mistake seems to be due to a misuse of Mercurial.

1. If you had used 'hg ren', the files in the old locations would have been correctly marked as removed (and you would
now have the ability to follow history and line-level annotations across the rename).

2. You should not generally do an update before a commit, because then you are committing something different from what
you actually tested. Do you work, commit, fetch, and push. Normal workflow does not involve the update command at all.

3. You should use 'hg out -pvM' before pushing to review your outgoing changes.
Comment 7 Quality Engineering 2008-05-20 05:06:22 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #206 build
User: Jesse Glick <>
Log: Removing jconsole from AU until #135332 is fixed.
Comment 8 Quality Engineering 2008-05-21 04:46:21 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #208 build
Log: update test generation of localized properties for jmx and jconsole (follow up to #135332)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo