Bug 997584 - Creating DMR objects sometimes throws IllegallArgumentException
Creating DMR objects sometimes throws IllegallArgumentException
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI (Show other bugs)
6.1.1
Unspecified Unspecified
unspecified Severity medium
: DR1
: EAP 6.4.0
Assigned To: jboss-set
Petr Kremensky
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-15 12:47 EDT by Petr Kremensky
Modified: 2016-01-04 02:43 EST (History)
6 users (show)

See Also:
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: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2204 Major Resolved runtime exceptions thrown during parsing crash cli sessions 2016-01-04 10:52 EST
JBoss Issue Tracker WFLY-3101 Major Resolved CLI: hide stacktraces for exceptions w/o messages when logging errors 2016-01-04 10:52 EST

  None (edit)
Description Petr Kremensky 2013-08-15 12:47:03 EDT
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Petr Kremensky 2013-08-15 12:54:22 EDT
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)
Comment 3 JBoss JIRA Server 2013-10-08 10:52:15 EDT
Alexey Loubyansky <alex@jboss.org> updated the status of jira WFLY-2204 to Resolved
Comment 4 JBoss JIRA Server 2013-10-08 10:52:15 EDT
Alexey Loubyansky <alex@jboss.org> made a comment on jira WFLY-2204

Fixed.
Comment 6 Petr Kremensky 2014-03-07 02:52:11 EST
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"})"
Comment 7 Alexey Loubyansky 2014-03-07 06:19:09 EST
What is the expected outcome?
Comment 8 Petr Kremensky 2014-03-07 06:49:16 EST
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.
Comment 9 Alexey Loubyansky 2014-03-07 07:10:59 EST
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.
Comment 10 JBoss JIRA Server 2014-03-20 06:42:58 EDT
Alexey Loubyansky <alex@jboss.org> updated the status of jira WFLY-3101 to Resolved
Comment 11 Joe Wertz 2014-07-01 06:12:56 EDT
Backported WFLY-3101

https://github.com/jbossas/jboss-eap/pull/1491
Comment 12 Petr Kremensky 2014-09-19 03:21:29 EDT
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

Note You need to log in before you can comment on or make changes to this bug.