修改对象的时候,BOOLEAN 参数未赋值,默认修改成false吗
5 回复
public Object saveArticle (@Param("..") Pediatricians_article article , HttpServletRequest request) {
这边获取的 article 字段 isFree 修改默认变成false了
@Column
@Comment("是否付费")
@ColDefine(type = ColType.BOOLEAN)
private boolean isFree;
修改语句方法
pediatriciansArticleService.updateIgnoreNull(pediatriciansArticle);
设置成大写的Boolean后插入数据报错
[INFO ] 22:51:12.504 org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:44) - Fail to value by getter
java.lang.NullPointerException
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article.isFree(Pediatricians_article.java:316)
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article$FM$isFree$3bff10ff7a51ce718cc44013a1ccae51.invoke(Pediatricians_article.java)
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:35)
at org.nutz.json.entity.JsonEntityField.getValue(JsonEntityField.java:186)
at org.nutz.json.handler.JsonPojoHandler.toJson(JsonPojoHandler.java:60)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:82)
at org.nutz.json.Json.toJson(Json.java:254)
at org.nutz.json.Json.toJson(Json.java:216)
at cn.wizzer.framework.base.model.BaseModel.toString(BaseModel.java:38)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController.editAuditDo(PediatriciansArticleController.java:307)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController$$NUTZAOP._aop_invoke(PediatriciansArticleController.java:5)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at cn.wizzer.app.web.commons.slog.SLogAopInterceptor.filter(SLogAopInterceptor.java:58)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController$$NUTZAOP.editAuditDo(PediatriciansArticleController.java:1)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController$FM$editAuditDo$79d188441818b38b83f6b8ff615d52bb.invoke(PediatriciansArticleController.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:38)
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 cn.wizzer.app.web.commons.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:35)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at cn.wizzer.app.web.commons.processor.NutShiroProcessor.process(NutShiroProcessor.java:52)
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.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at cn.wizzer.app.web.commons.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:49)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:21)
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.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
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:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at cn.wizzer.app.web.commons.filter.RouteFilter.doFilter(RouteFilter.java:31)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.nutz.mvc.WhaleFilter.doFilter(WhaleFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:214)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:502)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)
[INFO ] 22:51:15.070 org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:44) - Fail to value by getter
java.lang.NullPointerException
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article.isFree(Pediatricians_article.java:316)
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article$FM$isFree$3bff10ff7a51ce718cc44013a1ccae51.invoke(Pediatricians_article.java)
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:35)
at org.nutz.json.entity.JsonEntityField.getValue(JsonEntityField.java:186)
at org.nutz.json.handler.JsonPojoHandler.toJson(JsonPojoHandler.java:60)
at org.nutz.json.impl.JsonRenderImpl.render(JsonRenderImpl.java:82)
at org.nutz.json.Json.toJson(Json.java:254)
at org.nutz.json.Json.toJson(Json.java:216)
at cn.wizzer.framework.base.model.BaseModel.toString(BaseModel.java:38)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController.editAuditDo(PediatriciansArticleController.java:307)
at cn.wizzer.app.web.modules.controllers.platform.pediatricians.PediatriciansArticleController$$NUTZAOP._aop_invoke(PediatriciansArticleController.java:5)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
[DEBUG] 22:49:14.514 com.alibaba.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:59) - [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation, dubbo version: 2.6.5, current host: 192.168.1.113
[INFO ] 22:49:14.790 org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:44) - Fail to value by getter
java.lang.NullPointerException
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article.isFree(Pediatricians_article.java:316)
at cn.wizzer.app.pediatricians.modules.models.Pediatricians_article$FM$isFree$3bff10ff7a51ce718cc44013a1ccae51.invoke(Pediatricians_article.java)
at org.nutz.lang.eject.EjectByGetter.eject(EjectByGetter.java:35)
at org.nutz.dao.impl.entity.field.AbstractEntityField.getValue(AbstractEntityField.java:57)
at org.nutz.dao.FieldMatcher.match(FieldMatcher.java:173)
添加回复
请先登陆