NutzCN Logo
问答 org.nutz.lang.FailToGetValueException Fail to find getter
发布于 2627天前 作者 wx_dc1uhcoqb670vfspa24d 1794 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
org.nutz.lang.FailToGetValueException: Fail to get value for [java.lang.String]->[id]
	at org.nutz.lang.Mirror.makeGetValueException(Mirror.java:776)
	at org.nutz.lang.Mirror.getValue(Mirror.java:839)
	at org.nutz.el.opt.object.AccessOpt.calculate(AccessOpt.java:46)
	at org.nutz.el.arithmetic.RPN.calculate(RPN.java:55)
	at org.nutz.el.arithmetic.RPN.calculate(RPN.java:38)
	at org.nutz.el.El.eval(El.java:33)
	at cn.wizzer.app.web.commons.slog.SLogAopInterceptor.doLog(SLogAopInterceptor.java:81)
	at cn.wizzer.app.web.commons.slog.SLogAopInterceptor.filter(SLogAopInterceptor.java:63)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
	at cn.wizzer.app.web.modules.controllers.platform.gf.GfActInfoController$$NUTZAOP.editDo(GfActInfoController.java:1)
	at cn.wizzer.app.web.modules.controllers.platform.gf.GfActInfoController$FM$editDo$47eeb9d26366bbeddc2628a7ab4f4964.invoke(GfActInfoController.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 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:36)
	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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at cn.wizzer.app.web.commons.filter.RouteFilter.doFilter(RouteFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodException: Fail to find getter for [java.lang.String]->[id]
	at org.nutz.lang.reflect.fast.java.lang.NoSuchMethodException$FC$ab706b0cf40b3b24094a0af312e173b9.invoke(NoSuchMethodException.java)
	at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:1010)
	at org.nutz.lang.Lang.makeThrow(Lang.java:152)
	at org.nutz.lang.Mirror.getGetter(Mirror.java:264)
	at org.nutz.lang.Mirror.getGetter(Mirror.java:210)
	at org.nutz.lang.Mirror.getValue(Mirror.java:817)
	... 68 more
@At("/editDo")
    @Ok("json")
    @RequiresPermissions("platform.gf.act.edit")
    @SLog(tag = "Gf_act_info", msg = "${args[0].id}")
    @AdaptBy(type = WhaleAdaptor.class)
    public Object editDo
@Name
	@Prev(els = @EL("idGen()"))
	@Column("id")
	private String id;
public String getId() {
		return id;
	}
5 回复

把入口方法的签名贴全

@At("/editDo")
    @Ok("json")
    @RequiresPermissions("platform.gf.act.edit")
    @SLog(tag = "Gf_act_info", msg = "${args[0].id}")
    @AdaptBy(type = WhaleAdaptor.class)
    public Object editDo(@Param("startTimeStr") String startTimeStr,
                         @Param("regEndTimeStr") String regEndTimeStr,
                         @Param("endTimeStr") String endTimeStr,
                         @Param("..")Gf_act_info actInfo, HttpServletRequest req) {
@SLog(tag = "Gf_act_info", msg = "${args[0].id}")

args[0] 对应了 startTimeStr, 然后取startTimeStr.id 当然报错咯

其实可以用参数名嘛, jdk8的话

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