weekend learning. moved main to hibernate and made the json call work
after updating the named query