[jboss-jira] [JBoss JIRA] (WFCORE-48) EOFException when address of a mgmt operation is of a bad data type

Emmanuel Hugonnet (JIRA) issues at jboss.org
Wed Jan 28 11:54:49 EST 2015


    [ https://issues.jboss.org/browse/WFCORE-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035927#comment-13035927 ] 

Emmanuel Hugonnet edited comment on WFCORE-48 at 1/28/15 11:54 AM:
-------------------------------------------------------------------

The problem comes from 
{code:java}
PathAddress.pathAddress(new ModelNode().set(""));
{code} that throws an IllegalArgumentException in ModelControllerClientOperationHandler


was (Author: ehugonnet):
The problem comes from 
{code:java}
PathAddress.pathAddress(new ModelNode().set(""));
{code} that throws an IllegalArgumentException

> EOFException when address of a mgmt operation is of a bad data type
> -------------------------------------------------------------------
>
>                 Key: WFCORE-48
>                 URL: https://issues.jboss.org/browse/WFCORE-48
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>            Reporter: Ladislav Thon
>            Assignee: Emmanuel Hugonnet
>
> (Hopefully this belongs to WildFly Core. If not, please move to WildFly.)
> I'm doing a programmatic invocation of a simple mgmt operation on the root mgmt resource, say e.g. {{:whoami}}. I'm doing this against a freshly built WildFly from master branch (commit {{e2b9ecfb}}) and on the client side, I'm depending on {{org.wildfly.core:wildfly-controller-client:1.0.0.Alpha4}}.
> The code looks like this:
> {code:java}
> ModelControllerClient client = ModelControllerClient.Factory.create("localhost", 9990);
> try {
>     ModelNode op = new ModelNode();
>     op.get(ClientConstants.OP).set("whoami");
>     op.get(ClientConstants.OP_ADDR).set("");
>     ModelNode result = client.execute(op);
>     System.out.println(result);
> } finally {
>     client.close();
> }
> {code}
> This fails with an exception like this:
> {code}
> Exception in thread "main" java.io.IOException: java.util.concurrent.ExecutionException: Operation failed
> 	at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
> 	at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
> 	at cz.ladicek.wildfly.ErrorReproducer.main(ErrorReproducer.java:17)
> 	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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> Caused by: java.util.concurrent.ExecutionException: Operation failed
> 	at org.jboss.threads.AsyncFutureTask.operationFailed(AsyncFutureTask.java:74)
> 	at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:268)
> 	at org.jboss.as.controller.client.impl.AbstractDelegatingAsyncFuture.get(AbstractDelegatingAsyncFuture.java:100)
> 	at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
> 	... 7 more
> Caused by: java.io.EOFException
> 	at java.io.DataInputStream.readByte(DataInputStream.java:267)
> 	at org.jboss.as.protocol.mgmt.ProtocolUtils.expectHeader(ProtocolUtils.java:83)
> 	at org.jboss.as.controller.client.impl.AbstractModelControllerClient$1.handleRequest(AbstractModelControllerClient.java:167)
> 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:270)
> 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleRequest(AbstractMessageHandler.java:235)
> 	at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:113)
> 	at org.jboss.as.protocol.mgmt.ManagementChannelReceiver$1.handleMessage(ManagementChannelReceiver.java:56)
> 	at org.jboss.as.protocol.mgmt.ManagementChannelReceiver.handleMessage(ManagementChannelReceiver.java:84)
> 	at org.jboss.remoting3.remote.RemoteConnectionChannel$5.run(RemoteConnectionChannel.java:452)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> However, when I remove the line that sets {{address}} ({{op.get(ClientConstants.OP_ADDR).set("");}}), it works just fine.
> Fine, I made a mistake, but getting an {{EOFException}}? That's hardly an appropriate response. I should get a proper failure ({{"outcome" => "failed"}} etc.).



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the jboss-jira mailing list