[
https://issues.jboss.org/browse/WFCORE-48?page=com.atlassian.jira.plugin....
]
Brian Stansberry reassigned WFCORE-48:
--------------------------------------
Assignee: Emmanuel Hugonnet (was: Brian Stansberry)
Emmanuel,
My expectation here is the ModelControllerImpl is assuming the incoming operation has a
valid address field (undefined is valid) and the request is blowing up before it ever gets
to the point where the OperationContext deals with exceptions.
So the ModelControllerImpl should early on validate the types of the "operation"
and "address" fields and return an appropriate OperationResponse if they are
invalid.
Before doing that though, it's worthwhile to debug a bit and try and get a sense of
why this is resulting in the EOFException. On the server side, I recommend starting with
the task inner class doExecute method at AbstractMessageHandler L296. That's where
arbitrary uncaught exceptions are supposed to be handled. If that seems to be working ok,
then perhaps there's a flaw in the client side.
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)