Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Interpreting problem popus
Interpreting problem popus [message #1758500] Wed, 29 March 2017 11:38 Go to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Occasionally we see popups reporting "Unexpected problems"

They seem to have various codes (so far I recall seeing N20, Sxx, Cxx, x18, x06) codes (where x is a placeholder). Usually these pop up when we have a Java exception somewhere in our code but I've also seen them with javascript errors.

Is there any information in the reported Code that we should know about? Are these codes listed somewhere?

Also, what is the Analyse-ID good for?

In case of the javascript errors I think the error message on the javascript console is mirrored in the console of the ui-server. However, in the above case where a java exception was the cause for this error, I could find neither the Code nor the Analyse-ID in the ui-server console.

This makes it extremely hard to find out what went wrong when users report errors on a deployed system as we don't know how to match Code/Analyse-ID with anything in the server log files.
Re: Interpreting problem popus [message #1758846 is a reply to message #1758500] Mon, 03 April 2017 18:15 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 125
Registered: November 2010
Senior Member

Basically, "unexpected problems" occur if an exception was not properly handled, it's some kind of catch-all fallback. Simply ignoring the error could be even more confusing. JavaScipt and Java errors look very similar (the only difference is the text "internal UI error" vs. "internal processing error"), because they both indicate code errors, not business errors. In an ideal world, the user would never see such errors.

The "error code" does not have much significance. In fact, the message texts are purposely generic, because server applications should not expose any internal information (e.g. stack traces) for security reasons. However, the full message should always be written to the server log for later analysis. As you say, it would be quite hard to look into a bug report without. (That's why we try to log java script errors to the server log as well.)

I can think of three reasons why you don't see any error in the log:
1. The exceptions are handled by a custom ExceptionHandler that only displays a message box, but does not write log messages. (Quite unlikely, but check your workspace for subclasses of org.eclipse.scout.rt.platform.exception.ExceptionHandler.)
2. The log level is not set correctly. Again, the relevant class here is ExceptionHandler.
3. You are looking at the wrong log file. Sometimes, the logger configuration can be quite confusing, especially if running on a "big" application server. Scout uses SLF4J as logging facade. The exact configuration is dependent on the implementation (e.g. Logback or Log4j).

I suggest that you purposely program an exception in a hidden menu (e.g. a NullPointerException) and then set a few breakpoints to "follow" the exception through the code to see where it is consumed.

The Analysis ID is a "correlation ID". Each and every AJAX request from the UI is assigned a random correlation ID. This correlation ID is sent to the server as a HTTP header (X-Scout-Correlation-Id). On the server, it is passed along the Scout run contexts, even over the HTTP service tunnel. The purpose of this ID is to find all events and log messages that belong to the same user request, even over different server tiers. You can always access the current correlation ID using the ThreadLocal org.eclipse.scout.rt.platform.context.CorrelationId.CURRENT. It is automatically set as a SLF4J MDC value (Mapped Diagnostic Context), so you can automatically add it to every log message. Simply include the MDC placeholder in your log pattern.

Re: Interpreting problem popus [message #1758912 is a reply to message #1758846] Tue, 04 April 2017 14:18 Go to previous message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member

Thank you for your feedback, we'll look into this.
Previous Topic:How to intercept browser session expired
Next Topic:[Neon] Slow SmartField performance on IE
Goto Forum:

Current Time: Fri Jun 05 03:54:38 GMT 2020

Powered by FUDForum. Page generated in 0.01615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top