java.lang.IllegalStateException: Session is not running

I have done some searches but not seeing a solution. I get this error when triggering to open a popup on a page. (I have a popup that triggers open when certain conditions are met)

java.lang.IllegalStateException: Session is not running

I know the call that does this and I think I know why (Sessions getting closed abnormally), my question is there any way to test for this condition so I can skip trying to open the popup? I tried putting the openPopup call in a try block and that did not seem to help…

Thanks!

A plain try block will only catch jython exceptions, not java exceptions. There are many examples of double-except clauses on the forum that show how to do this.

Search for try ... Throwable

This link doesn't seem to behave as intended, I end up with this as a result:

Search result

Looks like it's HTML encoding the symbols that are used to denote advanced filter items.

manually changing the search to try . . . throwable seems to work though.

1 Like

Fixed.

1 Like

Thank you, sir. Try Except generally catches java errors as long as I don’t try to capture the exception (Exception as e). That’s when I needed the Throwable. Will continue to dig. Thanks!

1 Like