0

I keep getting a "java.lang.NullPointerException: Cannot get property on null object" when using jsonviews 1.2 in grails 3.3.6 (groovy 2.4.15, JDK 1.8.0_172). Unless I'm losing my mind, I think it only occurs when using a domain class with mixed case (e.g., UserInfo). If I were to name my domain class "Userinfo" the problem goes away.

I've tried what seems like every permutation of camel case in my template name, inside my gson file, etc to no avail. The only way I can get it to work properly is if I name my domain classes starting with a capital letter then lowercase for the rest - this limitation doesn't seem right to me.

Any suggestions would be greatly appreciated.

  • Might be duplicate of [What is a NullPointerException, and how do I fix it?](https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it). Otherwise please share your code, as It's hard to tell what the exact problem is like. – Capricorn Sep 02 '18 at 09:37
  • sigh - looks like it was an issue with applying the gson templates to an existing project. Creating a new clean project everything works fine. – Sean Albright Sep 02 '18 at 17:09

0 Answers0