Bug 997584
| Summary: | Creating DMR objects sometimes throws IllegallArgumentException | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Petr Kremensky <pkremens> |
| Component: | CLI | Assignee: | jboss-set |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.1.1 | CC: | brian.stansberry, cdewolf, chaowan, kkhan, myarboro |
| Target Milestone: | DR1 | ||
| Target Release: | EAP 6.4.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | |||
|
Description
Petr Kremensky
2013-08-15 16:47:03 UTC
Sorry, I accidently submit bug while creating report. Never mind, here is description:
CLI throws IllegallArgumentException while parsing some (incorrect) commands. Here are examples:
[standalone@localhost:9999 /] cd subsystem=logging/periodic-rotating-file-handler
[standalone@localhost:9999 periodic-rotating-file-handler] TEST:add(suffix=".yyyy-MM-dd" file={path="test.log",relative-to="jboss.server.log.dir")})
[standalone@localhost:9999 /] cd subsystem=logging/periodic-rotating-file-handler=FILE
[standalone@localhost:9999 periodic-rotating-file-handler=FILE] :write-attribute(name=file, value={path"test.log", relative-to="jboss.server.log.dir"})
java.lang.IllegalArgumentException
at org.jboss.dmr.ModelValue.getChild(ModelValue.java:108)
at org.jboss.dmr.ModelNode.get(ModelNode.java:798)
at org.jboss.as.cli.parsing.arguments.ArgumentValueCallbackHandler$DefaultValueState.addChild(ArgumentValueCallbackHandler.java:288)
at org.jboss.as.cli.parsing.arguments.ArgumentValueCallbackHandler$DefaultValueState.complete(ArgumentValueCallbackHandler.java:241)
at org.jboss.as.cli.parsing.arguments.ArgumentValueCallbackHandler.leavingState(ArgumentValueCallbackHandler.java:100)
at org.jboss.as.cli.parsing.StateParser$ParsingContextImpl.leaveState(StateParser.java:114)
at org.jboss.as.cli.parsing.GlobalCharacterHandlers$4.handle(GlobalCharacterHandlers.java:76)
at org.jboss.as.cli.parsing.StateParser.parse(StateParser.java:68)
at org.jboss.as.cli.parsing.StateParser.parse(StateParser.java:46)
at org.jboss.as.cli.ArgumentValueConverter$1.fromString(ArgumentValueConverter.java:74)
at org.jboss.as.cli.operation.impl.DefaultCallbackHandler.toOperationRequest(DefaultCallbackHandler.java:595)
at org.jboss.as.cli.impl.CommandContextImpl.handle(CommandContextImpl.java:545)
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:601)
at org.jboss.modules.Module.run(Module.java:270)
at org.jboss.modules.Main.main(Main.java:411)
Alexey Loubyansky <alex> updated the status of jira WFLY-2204 to Resolved Alexey Loubyansky <alex> made a comment on jira WFLY-2204 Fixed. CLI session now don't crash, but IAE is still thrown, try:
bin]$ ./jboss-cli.sh -c "/subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file, value={path"test.log", relative-to="jboss.server.log.dir"})"
What is the expected outcome? I would expect something like:
{
"outcome" => "failed",
"failure-description" => "Failed to parse '{pathtest.log, relative-to=jboss.server.log.dir}'",
"rolled-back" => true
}
or at least that exception is hidden from user.
Ok, I see the stacktrace logged, I'll clean it up. It's a client side parsing which is failing. So, there won't be a DMR operation response. Alexey Loubyansky <alex> updated the status of jira WFLY-3101 to Resolved Backported WFLY-3101 https://github.com/jbossas/jboss-eap/pull/1491 Verified on EAP 6.4.0.DR1.1
./jboss-cli.sh -c "/subsystem=logging/periodic-rotating-file-handler=FILE:write-attribute(name=file, value={path"test.log", relative-to="jboss.server.log.dir"})"
Failed to parse '{pathtest.log, relative-to=jboss.server.log.dir}': java.lang.IllegalArgumentException
|