Caused by: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.filepool.NutFilePool'
by args: [
@(~/nutzwk/upload/tmp)
@(1000)] becasue:
java.lang.RuntimeException: '~/nutzwk/upload/tmp' should be a directory or don't have permission to create it!
at org.nutz.lang.born.ConstructorCastingBorning.born(ConstructorCastingBorning.java:24)
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:114)
... 31 more
Caused by: java.lang.RuntimeException: '~/nutzwk/upload/tmp' should be a directory or don't have permission to create it!
at org.nutz.lang.Lang.makeThrow(Lang.java:133)
at org.nutz.lang.Files.createDirIfNoExists(Files.java:426)
at org.nutz.filepool.NutFilePool.(NutFilePool.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.nutz.lang.born.ConstructorCastingBorning.born(ConstructorCastingBorning.java:21)
... 33 more
11 回复
@wendal 我把config/ioc/upload.json配置改为了/home/accsc3a2c7cpsvc/wwwroot/acc_shop/nutzwk/upload/tmp
tmpFilePool : {
type : 'org.nutz.filepool.NutFilePool',
// 临时文件最大个数为 1000 个
args : [ "/home/accsc3a2c7cpsvc/wwwroot/acc_shop/nutzwk/upload/tmp", 1000 ]
},
建议改成,规避上传漏洞
tmpFilePool : {
type : 'org.nutz.filepool.NutFilePool',
// 临时文件最大个数为 1000 个
args : [ "${app.home}/WEB-INF/upload/tmp", 1000 ]
},
@wendal 这个改了也不行
@liaojian1014 额,报啥
@wendal 这个改了也不行
) ERROR - Error happend during start serivce!
org.nutz.ioc.IocException: [imageUpload, uploadImageContext, tmpFilePool] # FAIL to create Ioc Bean name=[tmpFilePool]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:320)
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:38)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:204)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
at org.nutz.mvc.ActionHandler.<init>(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.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4658)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5277)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.filepool.NutFilePool'
by args: [
@(~/nutzwk/upload/tmp)
@(1000)] becasue:
java.lang.RuntimeException: '~/nutzwk/upload/tmp' should be a directory or don't have permission to create it!
at org.nutz.lang.born.ConstructorCastingBorning.born(ConstructorCastingBorning.java:24)
at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:114)
... 31 more
Caused by: java.lang.RuntimeException: '~/nutzwk/upload/tmp' should be a directory or don't have permission to create it!
at org.nutz.lang.Lang.makeThrow(Lang.java:133)
at org.nutz.lang.Files.createDirIfNoExists(Files.java:426)
at org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:27)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.nutz.lang.born.ConstructorCastingBorning.born(ConstructorCastingBorning.java:21)
... 33 more
这是报的错误
@liaojian1014 这没改变啊,还是老的值
@wendal Linux上Tomcat没有缓存啊
@wendal 我ctrl+shift+F,搜索了,就只有upload.json里存在这个值,也就是刚刚的那个文件
@liaojian1014 那改完就不应该打印老的值。。。
添加回复
请先登陆