NutzCN Logo
问答 麻烦帮忙看下,同样的地方 1.60 没问题 1.61.r2 报这个错
发布于 2803天前 作者 wdhlzd 1493 次浏览 复制 上一个帖子 下一个帖子
标签:

java.lang.NullPointerException
at com.syl.platform.bean.card.PetCardTemplate$PetcardType.access$2(PetCardTemplate.java:71)
at com.syl.platform.bean.card.PetCardTemplate.getPetcardTypeName(PetCardTemplate.java:98)
at com.syl.platform.bean.card.PetCardTemplate$FM$getPetcardTypeName$af964ff8bf0f4344be6f5869bfe3c669.invoke(PetCardTemplate.java)
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:33)
at org.nutz.json.entity.JsonEntityField.getValue(JsonEntityField.java:167)
at org.nutz.json.impl.JsonRenderImpl.pojo2Json(JsonRenderImpl.java:262)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:133)
at org.nutz.json.Json.toJson(Json.java:239)
at org.nutz.json.Json.toJson(Json.java:201)
at club.zhcs.titans.utils.db.po.Entity.toString(Entity.java:81)
at java.lang.String.valueOf(String.java:2994)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.toString(LoggingMethodInterceptor.java:82)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.str(LoggingMethodInterceptor.java:94)
at org.nutz.aop.interceptor.LoggingMethodInterceptor.filter(LoggingMethodInterceptor.java:47)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at com.syl.merchants.boss.module.card.PetCardModule$$NUTZAOP.cardSet(PetCardModule.java:1)
at com.syl.merchants.boss.module.card.PetCardModule$FM$cardSet$e1e65bb9a398a8a19eedd8692bc4c6d9.invoke(PetCardModule.java)
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:126)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)

3 回复
java.lang.NullPointerException
 at com.syl.platform.bean.card.PetCardTemplate$PetcardType.access$2(PetCardTemplate.java:71)
 at com.syl.platform.bean.card.PetCardTemplate.getPetcardTypeName(PetCardTemplate.java:98)

PetCardTemplate的代码贴一下, 留意一下"回复"按钮旁边那个按钮!!

问题找到,空指针getPetcardTypeName相当于一个只读属性,里面取的是一个枚举字段的属性,但是枚举字段没有做空判断

哦, 看来不是nutz的bug

添加回复
请先登陆
回到顶部