-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.b.52 直接升级到 1.r.56 控制台报NullPointerException,请问需要怎么调整才能适应此次升级呢? #1066
Comments
把日志设置为debug, 然后找出具体的入口方法(应该是某个带数组参数的方法),贴一下 |
日志调整为debug后,看到有个Eval FAIL,是HttpServletRequest 等参数解析失败么? 2016-06-07 11:01:22 DEBUG [Loadings] - >> add 'org.rings.framework.system.action.UserAction' |
方法声明如下: @at("/del") |
改成 public Object deleteAll(HttpServletRequest req, @Param("uids")String[] uids, String tid) {} 我翻了代码,是bug,得查查为何以前的版本不报错 |
这个改动地方太多了,那等你fix掉我再升级哈。 |
已fix, 待会可以下载快照, 或自行编译一下 |
能告诉我改了哪个类,改了哪里么? 学习下!!! |
10690f2 你点进去就能看到了, AbstractAdaptor的314行 |
以下是MainModule代码,MainSetup都没进去呀,Nutz初始化时就报异常了:
@ok("json")
@fail("json")
@views({ExportMaker.class})
@modules(scanPackage = true)
@IocBy(type = ComboIocProvider.class, args = {
"_org.nutz.ioc.loader.json.JsonLoader", "ioc/",
"_org.nutz.ioc.loader.annotation.AnnotationIocLoader",
"org.rings.framework" })
@filters({
@by(type=WordFilter.class, args={"/(exp|imp)/"}),
@by(type=LoginAdminFilter.class, args={"^/(exp|imp|code)/", Constant.SYS_USER, "/admin/login/"})
})
@SetupBy(value = MainSetup.class)
public class MainModule {
}
以下是Tomcat启动时报的异常:
2016-06-07 10:43:31 INFO [NutIoc] - NutIoc init begin ...
2016-06-07 10:43:31 INFO [NutIoc] - ... NutIoc init complete
2016-06-07 10:43:31 INFO [NutLoading] - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2016-06-07 10:43:48 INFO [NutActionChainMaker] - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
2016-06-07 10:45:10 INFO [NutActionChainMaker] - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2016-06-07 10:46:31 ERROR [NutLoading] - Error happend during start serivce!
java.lang.NullPointerException
at org.nutz.mvc.adaptor.injector.NameInjector.(NameInjector.java:35)
at org.nutz.mvc.adaptor.injector.ArrayInjector.(ArrayInjector.java:24)
at org.nutz.mvc.adaptor.AbstractAdaptor.paramNameInject(AbstractAdaptor.java:312)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:136)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:47)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:203)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:107)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2016-06-07 10:46:31 ERROR [NutLoading] - try to depose ioc
2016-06-07 10:46:31 INFO [NutIoc] - org.nutz.ioc.impl.NutIoc@1678177258 is closing. startup date [16-06-07 10:43:31.392]
2016-06-07 10:46:31 INFO [NutIoc] - org.nutz.ioc.impl.NutIoc@1678177258 is deposed. startup date [16-06-07 10:43:31.392]
2016-6-7 10:46:31 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: java.lang.NullPointerException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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.wrapThrow(Lang.java:169)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:298)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:119)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4102)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4760)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.NullPointerException
at org.nutz.mvc.adaptor.injector.NameInjector.(NameInjector.java:35)
at org.nutz.mvc.adaptor.injector.ArrayInjector.(ArrayInjector.java:24)
at org.nutz.mvc.adaptor.AbstractAdaptor.paramNameInject(AbstractAdaptor.java:312)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:136)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:40)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:47)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:203)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:107)
... 29 more
2016-6-7 10:46:31 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2016-6-7 10:46:31 org.apache.catalina.core.StandardContext start
严重: Context [/lightfw] startup failed due to previous errors
2016-6-7 10:46:31 org.apache.coyote.http11.Http11AprProtocol start
信息: Starting Coyote HTTP/1.1 on http-8081
2016-6-7 10:46:31 org.apache.coyote.ajp.AjpAprProtocol start
信息: Starting Coyote AJP/1.3 on ajp-829
2016-6-7 10:46:31 org.apache.catalina.startup.Catalina start
信息: Server startup in 181314 ms
The text was updated successfully, but these errors were encountered: