NPE on Things page - No stack trace, no log entry

REST API throws NPE when called with things?summary=true. This results in empty Things page on MainUI. Full response body: "{\"error\":{\"http-code\":500,\"exception\":{\"class\":\"java.lang.NullPointerException\"}}}"

It can be reproduced with API Explorer by MainUI. There is nothing in the log, even though I already increased some log levels. Calling without ?summary=true works fine.

Any ideas how to get the stack trace?

Not sure how to get the stacktrace. But if you run this in eclipse you can set a breakpoint on when a NullPointerException is thrown. This will stop the code at the point this exception is thrown. This might help finding the issue.

1 Like

thanks for this tip… it will make my (debugging) life much easier!

Okay, that would mean I have to run openHAB in debug mode all the time, because this issue is solved by restarting openHAB and sometimes occurs again after some time. I’ll try that.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.