java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Grails User (Old Archive) - Problems with GSON plugin
    via by Unknown author,
    • java.lang.NullPointerException: Cannot get property 'identifier' on null object at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:66) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson$3.serialize(Gson.java:140) at grails.plugin.gson.adapters.GrailsDomainSerializer$_serialize_closure1.doCall(GrailsDomainSerializer.groovy:44) at grails.plugin.gson.adapters.GrailsDomainSerializer$_eachUnvisitedProperty_closure2.doCall(GrailsDomainSerializer.groovy:59) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:70) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:96) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson$3.serialize(Gson.java:140) at grails.plugin.gson.adapters.GrailsDomainSerializer$_serialize_closure1.doCall(GrailsDomainSerializer.groovy:44) at grails.plugin.gson.adapters.GrailsDomainSerializer$_eachUnvisitedProperty_closure2.doCall(GrailsDomainSerializer.groovy:56) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:70) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson$3.serialize(Gson.java:140) at grails.plugin.gson.adapters.GrailsDomainSerializer$_serialize_closure1.doCall(GrailsDomainSerializer.groovy:44) at grails.plugin.gson.adapters.GrailsDomainSerializer$_eachUnvisitedProperty_closure2.doCall(GrailsDomainSerializer.groovy:56) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:70) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson$3.serialize(Gson.java:140) at grails.plugin.gson.adapters.GrailsDomainSerializer$_serialize_closure1.doCall(GrailsDomainSerializer.groovy:35) at grails.plugin.gson.adapters.GrailsDomainSerializer$_eachUnvisitedProperty_closure2.doCall(GrailsDomainSerializer.groovy:59) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:70) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:96) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:60) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJsonTree(Gson.java:479) at com.google.gson.Gson$3.serialize(Gson.java:140) at grails.plugin.gson.adapters.GrailsDomainSerializer$_serialize_closure1.doCall(GrailsDomainSerializer.groovy:35) at grails.plugin.gson.adapters.GrailsDomainSerializer$_eachUnvisitedProperty_closure2.doCall(GrailsDomainSerializer.groovy:56) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachProperty(GrailsDomainSerializer.groovy:70) at grails.plugin.gson.adapters.GrailsDomainSerializer.eachUnvisitedProperty(GrailsDomainSerializer.groovy:51) at grails.plugin.gson.adapters.GrailsDomainSerializer.serialize(GrailsDomainSerializer.groovy:27) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:70) at com.google.gson.TreeTypeAdapter.write(TreeTypeAdapter.java:63) at com.google.gson.Gson.toJson(Gson.java:586) at com.google.gson.Gson.toJson(Gson.java:565) at com.google.gson.Gson.toJson(Gson.java:540) at grails.plugin.gson.converters.GSON.render(GSON.groovy:49) at grails.plugin.gson.converters.GSON.render(GSON.groovy:58) at grails.plugin.gson.api.ArtefactEnhancer$_enhanceControllers_closure1.doCall(ArtefactEnhancer.groovy:29) at com.aire.pei.TestingController.gsontest(TestingController.groovy:166) at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195) at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63) at org.apache.shiro.grails.SavedRequestFilter.doFilter(SavedRequestFilter.java:55) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:380) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
    No Bugmate found.