Bug 1057501

Summary: (QE) (6.2.1) jconsole doesn't work when patch upgrades some of its dependencies
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Carlo de Wolf <cdewolf>
Component: Scripts and CommandsAssignee: Carlo de Wolf <cdewolf>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.1CC: cdewolf, fnasser, jkudrnac, msimka, pgier, vtunka
Target Milestone: CR3   
Target Release: EAP 6.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1057127 Environment:
Last Closed: 2014-02-24 20:15:07 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: 1057127    
Bug Blocks: 1027004    

Description Carlo de Wolf 2014-01-24 09:05:41 UTC
+++ This bug was initially created as a clone of Bug #1057127 +++

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.

--- Additional comment from Emanuel Muckenhuber on 2014-01-23 13:21:30 EST ---

I opened a PR against 6.x: https://github.com/wildfly/wildfly/pull/5760

Comment 2 Petr Kremensky 2014-01-29 13:55:55 UTC
Verified on 6.2.1.CP.CR3