Ok, so I figured it out thanks to this url: https://wikis.oracle.com/display/GlassFish/Hyperjaxb3Configuration
I just added:
<args>
<arg>-XtoString</arg>
</args>
inside the <configuration>
tag of hyperjaxb3 in pom.xml
of the maven project and that made it work!