Bug 770967

Summary: AS 7 Plugin Fails During Discovery of 7.1 AS Instance in RHQ 4.2
Product: [Other] RHQ Project Reporter: Ted Jones <tejones>
Component: PluginsAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2CC: hrupp, theute
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Mac OS   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-07 19:20:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 707223    
Attachments:
Description Flags
NPE during AS 7 discovery none

Description Ted Jones 2011-12-30 15:18:01 UTC
Description of problem: 

Exception received during discovery of AS 7 instance:

Caused by: java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:470)
	at java.lang.Integer.valueOf(Integer.java:554)
	at org.rhq.modules.plugins.jbossas7.AbstractBaseDiscovery.getManagementPortFromHostXml(AbstractBaseDiscovery.java:129)



Version-Release number of selected component (if applicable):
RHQ 4.2
JBoss AS 7.1.0.CR1b and JBoss AS 7.1.0.Beta1b


How reproducible:
Start an AS 7 instance then run rhq agent discovery

Steps to Reproduce:
1. Start AS 7
2. Start RHQ Server and Agent
3. Run discovery for AS 7 plugin
  
Actual results:
java.lang.NumberFormatException is thrown and AS 7 instance is not disocvered

Expected results:

AS 7 instance is discovered

Additional info:

Comment 1 Mike Foley 2012-01-03 15:01:30 UTC
7.1 security was only added after rhq 4.2 was released.   Possibly need to handle this unhandled better exception in a more informative way...and/or release note to clarify AS7 version support ... and steps to disable or deal with this.

Comment 2 Ted Jones 2012-01-03 16:17:29 UTC
Created attachment 550462 [details]
NPE during AS 7 discovery

Comment 3 Ted Jones 2012-01-03 16:18:55 UTC
After commenting out security in the standalone.xml from CR1b and the version in master, I encountered the attached NPE.

Comment 4 Heiko W. Rupp 2012-01-04 20:32:41 UTC
The newest versions of AS7 now also have a ${} expression for the management port

Comment 5 Heiko W. Rupp 2012-01-05 10:49:59 UTC
0fdee77760fd6a in master

Comment 6 Heiko W. Rupp 2012-01-05 10:54:12 UTC
Actually it is aa4ec7d05bb3 -- pull --rebase modified it

Comment 7 Libor Zoubek 2012-01-25 15:06:05 UTC
verified on EAP6 DR12 - detection works with ${<prop>:default} either prop is passed to standalone.sh or not

Comment 8 Mike Foley 2012-02-07 19:20:44 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE