[
https://issues.jboss.org/browse/WFLY-3138?page=com.atlassian.jira.plugin....
]
Eduardo Silva commented on WFLY-3138:
-------------------------------------
The cli does not exits anymore, but still have an java.lang.IllegalArgumentException
occurring.
The ModelValue class of DMR project throws this exception when asPropertyList method is
called in
public static List<String> getRequestPropertyNames(ModelNode operationResult) {
if(!operationResult.hasDefined("result"))
return Collections.emptyList();
ModelNode result = operationResult.get("result");
if(!result.hasDefined("request-properties"))
return Collections.emptyList();
List<Property> nodeList =
result.get("request-properties").asPropertyList();
if(nodeList.isEmpty())
return Collections.emptyList();
List<String> list = new ArrayList<String>(nodeList.size());
for(Property node : nodeList) {
list.add(node.getName());
}
return list;
}
Seems that is all OK, when "request-properties' is not informed, but when it is
informed with no value, the code will not handle it.
Seems that in cases like that, the right thing to do is not use
"request-properties" => {}, as it has no values.
"operations" => {
"read-children-types" => {
"operation-name" => "read-children-types",
"description" => "Gets the type names of all the children
under the selected resource",
"request-properties" => {},
"reply-properties" => {
"type" => LIST,
"value-type" => STRING,
"description" => "The children types"
}
},
the cli exits after java.lang.IllegalArgumentException when I type a
couple of specific commands.
-------------------------------------------------------------------------------------------------
Key: WFLY-3138
URL:
https://issues.jboss.org/browse/WFLY-3138
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Environment: cat /etc/*-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Configured system properties:
[Server:node-B3] [Host Controller] = true
[Server:node-B3] [Server:node-B3] =
[Server:node-B3] awt.toolkit = sun.awt.X11.XToolkit
[Server:node-B3] file.encoding = UTF-8
[Server:node-B3] file.encoding.pkg = sun.io
[Server:node-B3] file.separator = /
[Server:node-B3] java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
[Server:node-B3] java.awt.headless = true
[Server:node-B3] java.awt.printerjob = sun.print.PSPrinterJob
[Server:node-B3] java.class.path = /local/myUser/dev/jboss/jboss-modules.jar
[Server:node-B3] java.class.version = 51.0
[Server:node-B3] java.endorsed.dirs =
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/endorsed
[Server:node-B3] java.ext.dirs =
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/ext:/usr/java/packages/lib/ext
[Server:node-B3] java.home = /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre
[Server:node-B3] java.io.tmpdir = /tmp
[Server:node-B3] java.library.path =
/opt/devenv/lib64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
[Server:node-B3] java.net.preferIPv4Stack = true
[Server:node-B3] java.runtime.name = OpenJDK Runtime Environment
[Server:node-B3] java.runtime.version = 1.7.0_51-mockbuild_2014_01_10_10_19-b00
[Server:node-B3] java.specification.name = Java Platform API Specification
[Server:node-B3] java.specification.vendor = Oracle Corporation
[Server:node-B3] java.specification.version = 1.7
[Server:node-B3] java.util.logging.manager = org.jboss.logmanager.LogManager
[Server:node-B3] java.vendor = Oracle Corporation
[Server:node-B3] java.vendor.url =
http://java.oracle.com/
[Server:node-B3] java.vendor.url.bug =
http://bugreport.sun.com/bugreport/
[Server:node-B3] java.version = 1.7.0_51
[Server:node-B3] java.vm.info = mixed mode
[Server:node-B3] java.vm.name = OpenJDK 64-Bit Server VM
[Server:node-B3] java.vm.specification.name = Java Virtual Machine Specification
[Server:node-B3] java.vm.specification.vendor = Oracle Corporation
[Server:node-B3] java.vm.specification.version = 1.7
[Server:node-B3] java.vm.vendor = Oracle Corporation
[Server:node-B3] java.vm.version = 24.45-b08
[Server:node-B3] javax.management.builder.initial =
org.jboss.as.jmx.PluggableMBeanServerBuilder
[Server:node-B3] javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
[Server:node-B3] javax.xml.parsers.DocumentBuilderFactory =
__redirected.__DocumentBuilderFactory
[Server:node-B3] javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
[Server:node-B3] javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
[Server:node-B3] javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
[Server:node-B3] javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
[Server:node-B3] javax.xml.transform.TransformerFactory =
__redirected.__TransformerFactory
[Server:node-B3]
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema =
__redirected.__SchemaFactory
[Server:node-B3]
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom =
__redirected.__XPathFactory
[Server:node-B3] jboss.bind.address = 0.0.0.0
[Server:node-B3] jboss.domain.base.dir = /local/myUser/dev/jboss/domain
[Server:node-B3] jboss.domain.config.dir = /local/myUser/dev/jboss/domain/configuration
[Server:node-B3] jboss.home.dir = /local/myUser/dev/jboss
[Server:node-B3] jboss.host.name = eclwsd012
[Server:node-B3] jboss.modules.dir = /local/myUser/dev/jboss/modules
[Server:node-B3] jboss.modules.system.pkgs = org.jboss.byteman
[Server:node-B3] jboss.node.name = eclwsd012:node-B3
[Server:node-B3] jboss.qualified.host.name = eclwsd012.xeop.de
[Server:node-B3] jboss.server.base.dir = /local/myUser/dev/jboss/domain/servers/node-B3
[Server:node-B3] jboss.server.config.dir =
/local/myUser/dev/jboss/domain/servers/node-B3/configuration
[Server:node-B3] jboss.server.data.dir =
/local/myUser/dev/jboss/domain/servers/node-B3/data
[Server:node-B3] jboss.server.deploy.dir =
/local/myUser/dev/jboss/domain/servers/node-B3/data/content
[Server:node-B3] jboss.server.log.dir =
/local/myUser/dev/jboss/domain/servers/node-B3/log
[Server:node-B3] jboss.server.name = node-B3
[Server:node-B3] jboss.server.persist.config = true
[Server:node-B3] jboss.server.temp.dir =
/local/myUser/dev/jboss/domain/servers/node-B3/tmp
[Server:node-B3] jgroups.bind_addr = 172.16.120.24
[Server:node-B3] line.separator =
[Server:node-B3]
[Server:node-B3] logging.configuration =
file:/local/myUser/dev/jboss/domain/servers/node-B3/data/logging.properties
[Server:node-B3] module.path = /local/myUser/dev/jboss/modules
[Server:node-B3] org.jboss.resolver.warning = true
[Server:node-B3] org.xml.sax.driver = __redirected.__XMLReaderFactory
[Server:node-B3] os.arch = amd64
[Server:node-B3] os.name = Linux
[Server:node-B3] os.version = 2.6.32-431.3.1.el6.x86_64
[Server:node-B3] path.separator = :
[Server:node-B3] sun.arch.data.model = 64
[Server:node-B3] sun.boot.class.path =
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/netx.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/plugin.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/rhino.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/classes
[Server:node-B3] sun.boot.library.path =
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre/lib/amd64
[Server:node-B3] sun.cpu.endian = little
[Server:node-B3] sun.cpu.isalist =
[Server:node-B3] sun.io.unicode.encoding = UnicodeLittle
[Server:node-B3] sun.java.command = /local/myUser/dev/jboss/jboss-modules.jar -mp
/local/myUser/dev/jboss/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.server
[Server:node-B3] sun.java.launcher = SUN_STANDARD
[Server:node-B3] sun.jnu.encoding = UTF-8
[Server:node-B3] sun.management.compiler = HotSpot 64-Bit Tiered Compilers
[Server:node-B3] sun.os.patch.level = unknown
[Server:node-B3] user.country = US
[Server:node-B3] user.dir = /local/myUser/dev/jboss-eap-6.1
[Server:node-B3] user.home = /home/myUser
[Server:node-B3] user.language = en
[Server:node-B3] user.name = myUser
[Server:node-B3] user.timezone = Europe/Berlin
[Server:node-B3] 15:06:25,736 DEBUG [org.jboss.as.config] (MSC service thread 1-8) VM
Arguments: -D[Server:node-B3] -Xms512m -Xmx1024m -Djgroups.bind_addr=172.16.120.24 -D[Host
Controller]=true -Djboss.bind.address=0.0.0.0 -Djava.awt.headless=true
-Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.home.dir=/local/myUser/dev/jboss
-Djava.net.preferIPv4Stack=true
-Djboss.server.log.dir=/local/myUser/dev/jboss/domain/servers/node-B3/log
-Djboss.server.temp.dir=/local/myUser/dev/jboss/domain/servers/node-B3/tmp
-Djboss.server.data.dir=/local/myUser/dev/jboss/domain/servers/node-B3/data
-Dlogging.configuration=file:/local/myUser/dev/jboss/domain/servers/node-B3/data/logging.properties
Reporter: neo infinite
Priority: Critical
myuser@myhost/bin:jboss-cli.sh -c
[domain@localhost:9999 /] read-operation read-children-types
Gets the type names of all the children under the selected resource
PARAMETERS
n/a
java.lang.IllegalArgumentException
at org.jboss.dmr.ModelValue.asPropertyList(ModelValue.java:100)
at org.jboss.dmr.ModelNode.asPropertyList(ModelNode.java:360)
at
org.jboss.as.cli.handlers.ReadOperationHandler.handleResponse(ReadOperationHandler.java:177)
at
org.jboss.as.cli.handlers.BaseOperationCommand.doHandle(BaseOperationCommand.java:213)
at
org.jboss.as.cli.handlers.CommandHandlerWithHelp.handle(CommandHandlerWithHelp.java:86)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:582)
at org.jboss.as.cli.impl.CommandContextImpl.handleSafe(CommandContextImpl.java:598)
at org.jboss.as.cli.impl.CommandContextImpl.interact(CommandContextImpl.java:1186)
at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:259)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.modules.Module.run(Module.java:270)
at org.jboss.modules.Main.main(Main.java:411)
myuser@myhost/bin:
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira