Description of problem: Cannot discover EAP6.0.1: supportsMatching methods fails with IllegalArgumentException Version-Release number of selected component (if applicable): 3.3.ER03 How reproducible: Always Steps to Reproduce: 1.Setup JON Server + Agent environment 2.Start EAP6.0.1 Standalone or Domain 3.Run Autodiscovery operation on Platform resource Actual results: EAP6.0.1 is not discovered and agent.log shows: 2014-09-25 16:00:16,802 ERROR [ResourceDiscoveryComponent.invoker.daemon-5] (rhq.modules.plugins.jbossas7.BaseProcessDiscovery)- Discovery of a JBossAS7 Host Controller Resource failed for process: pid=[19681], name=[/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65-2.5.2.5.fc20.x86_64/bin/java], ppid=[19665]. java.lang.IllegalArgumentException: Malformed version string [6.0.1 GA] at org.rhq.core.domain.util.OSGiVersion.<init>(OSGiVersion.java:82) Expected results: EAP6.0.1 is discovered
Fixed in master commit b95683ae6366745f53923c8d8d4c2d88cf21e17c Author: Thomas Segismont <tsegismo> Date: Thu Sep 25 17:31:49 2014 +0200 EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA" As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot) Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException) If the version is still not matching the expected pattern, then supportsPatching default to false Also: * some perf improvements: ** use already compiled PATTERN instead of recompiling on each call of String#split or String.replaceAll ** use some OSGiVersion constants to avoid parsing over and over again * some code cleanup (no longer use deprecated methods, remove unused param in private method, unchecked warning)
Not yet in the release branch. Needs review and cherry-picking.
(In reply to Thomas Segismont from comment #1) > Fixed in master > > commit b95683ae6366745f53923c8d8d4c2d88cf21e17c > Author: Thomas Segismont <tsegismo> > Date: Thu Sep 25 17:31:49 2014 +0200 > Reverted commit due to a compilation failure in CoreGUI (regex.Pattern is not a GWT compatible type)
Fixed in master commit 640a88cb2f126d583e46fc6b5a24f075df8d7535 Author: Thomas Segismont <tsegismo> Date: Thu Sep 25 18:47:02 2014 +0200 Bug 1146611 - Cannot discover EAP6.0.1: supportsMatching method fails with IllegalArgumentException EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA" As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot) Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException) If the version is still not matching the expected pattern, then supportsPatching default to false Also: * some perf improvements: ** use already compiled PATTERN instead of recompiling on each call of String#split or String.replaceAll ** use some OSGiVersion constants to avoid parsing over and over again * some code cleanup (no longer use deprecated methods, remove unused param in private method, unchecked warning)
Moving into ER05 as didn't make the ER04 cut.
Cherry-picked to release/jon3.3.x: commit 702e61b7e25d290f9dd8f5e523c9ba439b455615 Author: Thomas Segismont <tsegismo> Date: Thu Sep 25 18:47:02 2014 +0200 Bug 1146611 - Cannot discover EAP6.0.1: supportsMatching method fails with IllegalArgumentException EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA" As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot) Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException) If the version is still not matching the expected pattern, then supportsPatching default to false Also: * some perf improvements: ** use already compiled PATTERN instead of recompiling on each call of String#split or String.replaceAll ** use some OSGiVersion constants to avoid parsing over and over again * some code cleanup (no longer use deprecated methods, remove unused param in private method, unchecked warning) (cherry picked from commit 640a88cb2f126d583e46fc6b5a24f075df8d7535)
Cherry-picked to rc/jon3.3.0.ER04 (allowed by spinder): commit 160483d00f7f17d8da1f57b0823f2ab64818a2c4 Author: Thomas Segismont <tsegismo> Date: Thu Sep 25 18:47:02 2014 +0200 Bug 1146611 - Cannot discover EAP6.0.1: supportsMatching method fails with IllegalArgumentException EAP 6.1.0 version.txt file content is: "JBoss Enterprise Application Platform - Version 6.0.1 GA" As a consequence, the version detected will be "6.0.1 GA" (notice the space instead of a dot) Give such version strings a chance to make a valid OSGiVersion instance (avoid IllegalArgumentException) If the version is still not matching the expected pattern, then supportsPatching default to false Also: * some perf improvements: ** use already compiled PATTERN instead of recompiling on each call of String#split or String.replaceAll ** use some OSGiVersion constants to avoid parsing over and over again * some code cleanup (no longer use deprecated methods, remove unused param in private method, unchecked warning) (cherry picked from commit 640a88cb2f126d583e46fc6b5a24f075df8d7535)
Verified on JON 3.3 ER05 On autodiscovery, EAP6.0.1 is discovered and agent.log does not show any errors. Verified that EAP6.0.1 is imported successfully and is green.