helix icon indicating copy to clipboard operation
helix copied to clipboard

admin-webapp throws NullPointerException for every request

Open wmorgan6796 opened this issue 3 years ago • 2 comments

Describe the bug

Every API call the admin-webapp throws a NullPointerException. It's due to the fact that mapper here is used in the line above it. Since Java's initialization of static members follows the order in which they're declared, the mapper hasn't been instantiated yet, causing the NullPointerException here when line 49 of that file is evaluated.

To Reproduce

Use any API in the admin-webapp which will return a 500 (due to the NullPointerException)

Expected behavior

The API shouldn't return a 500 and instead return what it should.

Additional context

Looks like this has been broken since 2020, but due to the Rest App 2.0, probably went unnoticed.

wmorgan6796 avatar Aug 04 '22 20:08 wmorgan6796

Thanks for the contribution, @wmorgan6796

I think the plan is to deprecate admin-webapp. The fix on admin-webapp is absolutely welcomed, but I would suggest your usecase to leverage helix-rest. Or you may find more gaps forward.

jiajunwang avatar Aug 04 '22 22:08 jiajunwang

Yeah I got confused by which one to use. I figured though the rest app 2.0 was the way to go, can't hurt to make the admin-webapp not completely broken

wmorgan6796 avatar Aug 04 '22 23:08 wmorgan6796