You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ha...@apache.org on 2021/03/26 16:47:47 UTC
[ambari] branch branch-2.7 updated: AMBARI-25639.
StackOverflowError appears on MethodArgument*Exception during stomp message
handling. (dvitiuk via dgrinenko) (#3302)
This is an automated email from the ASF dual-hosted git repository.
hapylestat pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 1945c3b AMBARI-25639. StackOverflowError appears on MethodArgument*Exception during stomp message handling. (dvitiuk via dgrinenko) (#3302)
1945c3b is described below
commit 1945c3bf722df7392befee96d04fd6a512f60d75
Author: dvitiiuk <dm...@gmail.com>
AuthorDate: Fri Mar 26 18:46:38 2021 +0200
AMBARI-25639. StackOverflowError appears on MethodArgument*Exception during stomp message handling. (dvitiuk via dgrinenko) (#3302)
---
.../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 a49df55..ee2d407 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()));
}
-
-
}
}