lishunli / nutz

Automatically exported from code.google.com/p/nutz
0 stars 0 forks source link

继承Module类,如果是@OK("json"),会出错 #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
问题产生的条件:
基类CrudModule,主要对于表做简单的增删改操作,使用PetModule�
��承CurdModule
时,如果使用@OK("json"),会出现java.lang.IllegalArgumentException的��
�误。

发生问题的调用代码:
@InjectName("crudModule")
public abstract class CrudModule {
    @At()
    @Ok("json")
    @Filters(@By(type=ParamFilter.class))
    public FlexiGrid list(int page, int rp, String sortname, String 
sortorder, String query, String qtype, HttpServletRequest request) {
        return new FlexiGrid(page, 
dbUtils.count(getPet().getTableName(), cnd), 
dbUtils.query(getPet().getTableName(), cnd, dbUtils.getDao()
                .createPager(page, rp)));
    }
}

@At("/pet")
public class PetModule extends CrudModule {
}

异常堆栈:
org.nutz.mvc.invoker.ActionInvokerImpl - Action Fail!
java.lang.IllegalArgumentException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9)
       at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at 
org.nutz.mvc.invoker.ActionInvokerImpl.invoke(ActionInvokerImpl.java:225)
       at org.nutz.mvc.ActionInvoking.invoke(ActionInvoking.java:34)
       at org.nutz.mvc.NutServlet.service(NutServlet.java:121)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio
nFilterChain.java:290)
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC
hain.java:206)
       at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j
ava:233)
       at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j
ava:191)
       at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12
8)
       at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10
2)
       at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav
a:109)
       at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
       at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
       at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt
p11Protocol.java:583)
       at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
       at java.lang.Thread.run(Thread.java:619)

相关日志:

Original issue reported on code.google.com by gdun...@gmail.com on 18 Jan 2010 at 1:32

GoogleCodeExporter commented 9 years ago

Original comment by gdun...@gmail.com on 19 Jan 2010 at 4:33

GoogleCodeExporter commented 9 years ago

Original comment by gdun...@gmail.com on 27 Jan 2010 at 3:16

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 13 May 2010 at 11:00