my problem was - thinking that th:fragment is not rendered but it is, and i get null poniter error, because argument is not there the object under name used in fragment should already be available, for example take out of th:each