NutzCN Logo
问答 使用dao.delete(xxx.class, id);时报错的问题咨询
发布于 2864天前 作者 tuchief 1498 次浏览 复制 上一个帖子 下一个帖子
标签:

错误信息如下:
Caused by: java.lang.NoSuchMethodException: Fail to find getter for [org.apache.shiro.web.servlet.ShiroHttpServletRequest]->[id]
at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
就直接删,不需要shiro来验证权限,该如何操作?

8 回复

传错class了吧?

@tuchief 完整报错信息贴一下,怎么会有shiro类的乱入呢?

2017-01-12 16:46:43,393 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [GET] path=/public/wx/vip/card/unbound : BankCardController.unbound(BankCardController.java:97)
2017-01-12 16:46:43,393 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'permission'<class cn.wizzer.common.shiro.view.Permission>
2017-01-12 16:46:43,394 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dateUtil'<class cn.wizzer.common.util.DateUtil>
2017-01-12 16:46:43,394 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'stringUtil'<class cn.wizzer.common.util.StringUtil>
2017-01-12 16:46:43,394 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'bankCardController'<class cn.wizzer.modules.controllers.front.wx.vip.BankCardController>
2017-01-12 16:46:43,449 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - DELETE FROM wx_bankCard WHERE id=?
    |                                1 |
    |----------------------------------|
    | 729e444440eb4c76beff145d7fecd5ba |
  For example:> "DELETE FROM wx_bankCard WHERE id='729e444440eb4c76beff145d7fecd5ba'"
2017-01-12 16:46:43,545 cn.wizzer.common.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) DEBUG - [GET ]URI=/public/wx/vip/card/unbound 152ms
2017-01-12 16:46:43,545 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) WARN  - Error@/public/wx/vip/card/unbound :
org.nutz.lang.FailToGetValueException: Fail to get value for [org.apache.shiro.web.servlet.ShiroHttpServletRequest]->[id]
	at org.nutz.lang.Mirror.makeGetValueException(Mirror.java:763)
	at org.nutz.lang.Mirror.getValue(Mirror.java:826)
	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:30)
	at cn.wizzer.common.services.log.SLogAopInterceptor.doLog(SLogAopInterceptor.java:79)
	at cn.wizzer.common.services.log.SLogAopInterceptor.filter(SLogAopInterceptor.java:63)
	at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
	at cn.wizzer.modules.controllers.front.wx.vip.BankCardController$$NUTZAOP.unbound(BankCardController.java:1)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:25)
	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.common.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:35)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.common.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.common.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:37)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.common.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:198)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:33)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	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:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:108)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	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 [org.apache.shiro.web.servlet.ShiroHttpServletRequest]->[id]
	at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:17)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.lang.Lang.makeThrow(Lang.java:148)
	at org.nutz.lang.Mirror.getGetter(Mirror.java:251)
	at org.nutz.lang.Mirror.getGetter(Mirror.java:197)
	at org.nutz.lang.Mirror.getValue(Mirror.java:804)
	... 72 more

@wendal 完整的错误信息如上

那是slog注解写错了

@wendal 解决了,确实是slog写错了,但是为什么slog错误会引起shiro介入呢?

@tuchief args索引错了,刚好跑到req参数上了吧

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