This is an automated email from the ASF dual-hosted git repository.
wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new fb1ce6ad9d AMBARI-25639: StackOverflowError appears on
MethodArgument*Exception during stomp message handling (#3569)
fb1ce6ad9d is described below
commit fb1ce6ad9d65d91f4b69b753094cfcee59386ff6
Author: Yu Hou <[email protected]>
AuthorDate: Thu Nov 24 16:15:22 2022 +0800
AMBARI-25639: StackOverflowError appears on MethodArgument*Exception during
stomp message handling (#3569)
---
.../ambari/server/configuration/spring/RootStompConfig.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java
index a49df556c1..ee2d407e75 100644
---
a/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java
+++
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/spring/RootStompConfig.java
@@ -22,6 +22,7 @@ import java.util.List;
import javax.servlet.ServletContext;
+import org.apache.ambari.server.AmbariException;
import org.apache.ambari.server.agent.AgentSessionManager;
import org.apache.ambari.server.agent.stomp.AmbariSubscriptionRegistry;
import org.apache.ambari.server.api.AmbariSendToMethodReturnValueHandler;
@@ -116,12 +117,9 @@ public class RootStompConfig {
@MessageExceptionHandler(Exception.class)
@SendToUser("/")
public ErrorMessage handle(Exception e) {
-
- //LOG.error("Exception caught while processing message: " +
e.getMessage(), e);
- return new ErrorMessage(e);
+ LOG.error("Exception caught while processing a message: " +
e.getMessage(), e);
+ return new ErrorMessage(new AmbariException(e.getMessage()));
}
-
-
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]