NutzCN Logo
问答 nutz 对象参数日期转换问题
发布于 3048天前 作者 qq_f55c6d47 2892 次浏览 复制 上一个帖子 下一个帖子
标签:

使用nutz-1.b.50 表单参数封装对象日期类型选择29好入库后变成30号

8 回复

换了jar报错
org.nutz.ioc.IocException: create ioc bean fail name=upload ioc define:
配置文件都有的

之前用的nutz jar是nutz-1.b.50项目启动正常,今天换成了nutz-1.b.51项目启动报以下错误:
2016-08-18 14:19:04,446 [ERROR][org.nutz.mvc.impl.NutLoading] - Error happend during start serivce!
org.nutz.ioc.IocException: create ioc bean fail name=upload ioc define:
{
"type" :"org.nutz.mvc.upload.UploadAdaptor",
"singleton" :false,
"args" :[{
"type" :"refer",
"value" :"uploadCtx"
}],
"fields" :[],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212)
at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:257)
at org.nutz.mvc.impl.processor.AbstractProcessor.evalObj(AbstractProcessor.java:48)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:37)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:34)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:46)
at com.hits.core.UrlMappingSet.add(UrlMappingSet.java:23)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:184)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:99)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
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:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.nutz.ioc.IocException: create ioc bean fail name=uploadCtx ioc define:
{
"type" :"org.nutz.mvc.upload.UploadingContext",
"singleton" :false,
"args" :[{
"type" :"refer",
"value" :"filePool"
}],
"fields" :[{
"name" :"ignoreNull",
"value" :{
"type" :"normal",
"value" :true
},
"optional" :false
}, {
"name" :"maxFileSize",
"value" :{
"type" :"normal",
"value" :5242880
},
"optional" :false
}, {
"name" :"nameFilter",
"value" :{
"type" :"normal",
"value" :".+(html|js|css|tpl|jpg|gif|png|jpeg|doc|docx|xls|xlsx|ppt|pptx|wps|pdf|txt|chm|mp3|mp4|3gp|rm|swf|flv|asf|wmv|wma|avi|7z|zip|rar|ios|jar)"
},
"optional" :false
}, {
"name" :"extOption",
"value" :{
"type" :"normal",
"value" :{
"music" :{
"type" :"normal",
"value" :"mp3"
},
"document" :{
"type" :"normal",
"value" :"doc,docx,xls,xlsx,ppt,pptx,wps,pdf,txt,chm"
},
"images" :{
"type" :"normal",
"value" :"jpg,gif,png,jpeg"
},
"archive" :{
"type" :"normal",
"value" :"7z,zip,rar,ios,jar"
},
"video" :{
"type" :"normal",
"value" :"mp4,3gp,rm,swf,flv,asf,wmv,wma,avi"
}
}
},
"optional" :false
}],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:73)
... 31 more
Caused by: java.lang.RuntimeException: Fail to eval Injector for field: 'extOption'
at org.nutz.lang.Lang.wrapThrow(Lang.java:131)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:116)
... 34 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: Can NOT find field [extOption] in class [org.nutz.mvc.upload.UploadingContext] and it's parents classes
at org.nutz.lang.Lang.wrapThrow(Lang.java:148)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:988)
at org.nutz.ioc.weaver.FieldInjector.create(FieldInjector.java:18)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:113)
... 34 more
Caused by: java.lang.NoSuchFieldException: Can NOT find field [extOption] in class [org.nutz.mvc.upload.UploadingContext] and it's parents classes
at org.nutz.lang.Mirror.getField(Mirror.java:437)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:979)
... 36 more
2016-8-18 14:19:04 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: create ioc bean fail name=upload ioc define:
{
"type" :"org.nutz.mvc.upload.UploadAdaptor",
"singleton" :false,
"args" :[{
"type" :"refer",
"value" :"uploadCtx"
}],
"fields" :[],
"scope" :"app"
}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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:931)
at org.nutz.lang.Lang.wrapThrow(Lang.java:164)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:117)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
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:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.nutz.ioc.IocException: create ioc bean fail name=upload ioc define:
{
"type" :"org.nutz.mvc.upload.UploadAdaptor",
"singleton" :false,
"args" :[{
"type" :"refer",
"value" :"uploadCtx"
}],
"fields" :[],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212)
at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:257)
at org.nutz.mvc.impl.processor.AbstractProcessor.evalObj(AbstractProcessor.java:48)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:37)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:23)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:34)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:46)
at com.hits.core.UrlMappingSet.add(UrlMappingSet.java:23)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:184)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:99)
... 20 more
Caused by: org.nutz.ioc.IocException: create ioc bean fail name=uploadCtx ioc define:
{
"type" :"org.nutz.mvc.upload.UploadingContext",
"singleton" :false,
"args" :[{
"type" :"refer",
"value" :"filePool"
}],
"fields" :[{
"name" :"ignoreNull",
"value" :{
"type" :"normal",
"value" :true
},
"optional" :false
}, {
"name" :"maxFileSize",
"value" :{
"type" :"normal",
"value" :5242880
},
"optional" :false
}, {
"name" :"nameFilter",
"value" :{
"type" :"normal",
"value" :".+(html|js|css|tpl|jpg|gif|png|jpeg|doc|docx|xls|xlsx|ppt|pptx|wps|pdf|txt|chm|mp3|mp4|3gp|rm|swf|flv|asf|wmv|wma|avi|7z|zip|rar|ios|jar)"
},
"optional" :false
}, {
"name" :"extOption",
"value" :{
"type" :"normal",
"value" :{
"music" :{
"type" :"normal",
"value" :"mp3"
},
"document" :{
"type" :"normal",
"value" :"doc,docx,xls,xlsx,ppt,pptx,wps,pdf,txt,chm"
},
"images" :{
"type" :"normal",
"value" :"jpg,gif,png,jpeg"
},
"archive" :{
"type" :"normal",
"value" :"7z,zip,rar,ios,jar"
},
"video" :{
"type" :"normal",
"value" :"mp4,3gp,rm,swf,flv,asf,wmv,wma,avi"
}
}
},
"optional" :false
}],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:73)
... 31 more
Caused by: java.lang.RuntimeException: Fail to eval Injector for field: 'extOption'
at org.nutz.lang.Lang.wrapThrow(Lang.java:131)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:116)
... 34 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: Can NOT find field [extOption] in class [org.nutz.mvc.upload.UploadingContext] and it's parents classes
at org.nutz.lang.Lang.wrapThrow(Lang.java:148)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:988)
at org.nutz.ioc.weaver.FieldInjector.create(FieldInjector.java:18)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:113)
... 34 more
Caused by: java.lang.NoSuchFieldException: Can NOT find field [extOption] in class [org.nutz.mvc.upload.UploadingContext] and it's parents classes
at org.nutz.lang.Mirror.getField(Mirror.java:437)
at org.nutz.lang.Mirror.getInjecting(Mirror.java:979)
... 36 more
2016-8-18 14:19:04 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2016-8-18 14:19:04 org.apache.catalina.core.StandardContext start
严重: Context [/jcgz] startup failed due to previous errors
2016-8-18 14:19:04 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/jcgz] created a ThreadLocal with key of type [org.nutz.mvc.NutMvcContext$1] (value [org.nutz.mvc.NutMvcContext$1@64610fa]) and a value of type [org.nutz.lang.util.SimpleContext] (value [{
}]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.

extOption是原项目自行改源码加进去的,换新版的时候也得跟着改

来自炫酷的 NutzCN

谢谢!之前不是我写的,我来修改下。

@qq_f55c6d47 既然要更新,建议换成最新版. 至于升级期间遇到的问题, 逐一解决之

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