I am seeing "IllegalStateException: EJBCLIENT000032: Cannot retry a request which hasn't previously been completed at client side" but see no exceptions relating to the cause in JBoss EAP6.
Issue
- An EJB invocation tries to pass huge parameter to the server and there is an "IllegalStateException: EJBCLIENT000032" without any further notice at client or server, and our server side EJB is not invoked.
- We found that JBoss swallowed the root cause and there might be some bugs in EJBInvocationHandler.
Assume that the issue is a serialization issue and exception from writeExternal(ObjectOutput).
Please refer the followings from jboss-ejb-client-1.0.21.Final.
private static void sendRequestWithPossibleRetries(final EJBClientInvocationContext clientInvocationContext, final boolean firstAttempt) throws Exception {
try {
// this is the first attempt so use the sendRequest API
if (firstAttempt) {
clientInvocationContext.sendRequest();
} else {
// retry
clientInvocationContext.retryRequest();
}
} catch (RequestSendFailedException rsfe) {
final String failedNodeName = rsfe.getFailedNodeName();
if (failedNodeName != null) {
Logs.MAIN.debug("Retrying invocation " + clientInvocationContext + " which failed on node: " + failedNodeName + " due to:", rsfe);
// exclude this failed node, during the retry
clientInvocationContext.markNodeAsExcluded(failedNodeName);
// retry
sendRequestWithPossibleRetries(clientInvocationContext, false);
} else {
throw rsfe;
}
}
}
The first invocation will invoke sendRequest(), and get exception from writeExternal(ObjectOutput) wrapped as org.jboss.ejb.client.RequestSendFailedException: Remote side closed the message stream. And then go into retry, and then we will get java.lang.IllegalStateException: EJBCLIENT000032: Cannot retry a request which hasn't previously been completed at client side.
As you can see the log is debug level, and these codes swallow the root cause and going to retry and throw the other exception (IllegalStateException). Do we have a way to actual get the exception if something wrong in writeExternal at client side.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
