Bug 1266272
| Summary: | [GSS](6.4.z) org.jboss.as.cli.gui.GuiMain should not fail if JBOSS_HOME not set | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Brad Maxwell <bmaxwell> |
| Component: | CLI | Assignee: | Brad Maxwell <bmaxwell> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.4.3 | CC: | bbaranow, bmaxwell, brian.stansberry, cdewolf, ihradek, jboss-set, jtruhlar, ppalaga |
| Target Milestone: | CR1 | Keywords: | Regression |
| Target Release: | EAP 6.4.12 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | eap6412-proposed | ||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-17 13:09:45 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: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1266626, 1375585 | ||
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions Verified with EAP 6.4.12.CP.CR1; Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. |
When using jconsole from the JDK something like this: $JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar:./jboss-cli-client.jar -J-Djava.util.logging.config.file=logging-jconsole.properties The org.jboss.as.cli.gui.GuiMain makes a call to locate a product specific image: java.net.URL iconURL = org/jboss/as/cl/gui/GuiMain.getResource(getCliIconPath()); getCliIconPath() is looking in JBOSS_HOME to identify which product this is to return a product specific image it appears. ProductConfig productConfig = new ProductConfig(Module.getBootModuleLoader(), System.getenv("JBOSS_HOME"), null); iconPath = productConfig.getCliIcon(); We have seen a case when JBOSS_HOME is not set and jconsole is used from the JDK with jboss-cli-client.jar on the classpath that it causes a NPE. We should check for null and either use a default image from the client jar or such. Caused by: java.lang.NullPointerException at sun.misc.MetaIndex.mayContain(MetaIndex.java:243) at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:830) at sun.misc.URLClassPath.getResource(URLClassPath.java:199) at sun.misc.URLClassPath.getResource(URLClassPath.java:251) at java.lang.ClassLoader.getBootstrapResource(ClassLoader.java:1305) at java.lang.ClassLoader.getResource(ClassLoader.java:1144) at java.lang.ClassLoader.getResource(ClassLoader.java:1142) at java.lang.Class.getResource(Class.java:2147) at org.jboss.as.cli.gui.GuiMain.<clinit>(GuiMain.java:63)