Bug 1057127

Summary: jconsole doesn't work when patch upgrades some of its dependencies
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Martin Simka <msimka>
Component: Scripts and CommandsAssignee: Emanuel Muckenhuber <emuckenh>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact: Nidhi <nsriniva>
Priority: unspecified    
Version: 6.2.1CC: cdewolf, dandread, emuckenh, fnasser, jkudrnac, kkhan, nsriniva, pgier, smumford, vtunka
Target Milestone: DR0   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previous versions of JBoss EAP 6 contained a bug that prevented the jconsole.sh script from running whenever a CP1 patch was applied. The patch updated some hard-coded modules in jconsole.sh which, in turn, tampered the original module jar files. This meant that it was not possible to connect to an EAP console using jconsole.sh. The issues was fixed by using the jboss-cli-client.jar from bin/client, which contains all required dependencies.
Story Points: ---
Clone Of:
: 1057501 (view as bug list) Environment:
Last Closed: 2014-06-28 15:38:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1057501    

Description Martin Simka 2014-01-23 13:45:45 UTC
Description of problem:
-----------------------
There is a hardcoded module path in jconsole.sh. When patch updates some module, original module jars are crippled and can't be used anymore.

Version-Release number of selected component (if applicable):
-----------------------
EAP 6.2.0 + patch which upgrades one of 
MODULES="org/jboss/remoting-jmx org/jboss/remoting3 org/jboss/logging org/jboss/xnio org/jboss/xnio/nio org/jboss/sasl org/jboss/marshalling org/jboss/marshalling/river org/jboss/as/cli org/jboss/staxmapper org/jboss/as/protocol org/jboss/dmr org/jboss/as/controller-client org/jboss/threads"

Steps to Reproduce:
-----------------------
1. start EAP
2. apply CP1 patch
3. restart EAP
3. start bin/jconsole.sh and try to connect to EAP process

Actual results:
-----------------------
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/xnio/Option
	at org.jboss.remoting3.RemotingOptions.<clinit>(RemotingOptions.java:38)
	at org.jboss.as.cli.impl.CLIModelControllerClient.<clinit>(CLIModelControllerClient.java:65)
	at org.jboss.as.cli.impl.ModelControllerClientFactory$2.getClient(ModelControllerClientFactory.java:70)
	at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:806)
	at org.jboss.as.cli.gui.JConsoleCLIPlugin.connectUsingDefaults(JConsoleCLIPlugin.java:142)
	at org.jboss.as.cli.gui.JConsoleCLIPlugin.connectCommandContext(JConsoleCLIPlugin.java:102)
	at org.jboss.as.cli.gui.JConsoleCLIPlugin.getTabs(JConsoleCLIPlugin.java:77)
	at sun.tools.jconsole.VMPanel.createPluginTabs(VMPanel.java:668)
	at sun.tools.jconsole.VMPanel.propertyChange(VMPanel.java:334)
	at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:298)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:291)
	at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:92)
	at javax.swing.event.SwingPropertyChangeSupport$1.run(SwingPropertyChangeSupport.java:97)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
	at java.awt.EventQueue.access$300(EventQueue.java:96)
	at java.awt.EventQueue$2.run(EventQueue.java:634)
	at java.awt.EventQueue$2.run(EventQueue.java:632)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.ClassNotFoundException: org.xnio.Option
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
	... 27 more


Additional info:
Correct module jars are loaded by jboss-modules. Script add-user.sh uses jboss-modules, perhaps jconsole.sh could use jboss-modules as well.

Comment 1 Emanuel Muckenhuber 2014-01-23 18:21:30 UTC
I opened a PR against 6.x: https://github.com/wildfly/wildfly/pull/5760

Comment 3 Martin Simka 2014-02-12 10:23:13 UTC
verified on EAP 6.3.0.DR0