NutzCN Logo
问答 UploadAdaptor 适配器 @(uploads) 怎么把uploads前面加上项目根路径
发布于 2973天前 作者 qq_e1338e56 2462 次浏览 复制 上一个帖子 下一个帖子
标签: mvc

org.nutz.lang.born.BorningException: Fail to born 'org.nutz.mvc.upload.UploadAdaptor'
by args: [
@(uploads)
@(8192)
@(UTF-8)
@(10)] becasue:
java.lang.RuntimeException: 'uploads' 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.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:990)
at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:322)
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: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.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(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: java.lang.RuntimeException: 'uploads' should be a directory or don't have permission to create it!
at org.nutz.lang.Lang.makeThrow(Lang.java:104)
at org.nutz.lang.Files.createDirIfNoExists(Files.java:426)
at org.nutz.filepool.NutFilePool.(NutFilePool.java:27)
at org.nutz.mvc.upload.UploadAdaptor.(UploadAdaptor.java:90)
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)
... 25 more

1 回复
args={"${app.root}/WEB-INF/uploads", "8192", ".........."}

注意,那是临时文件夹!!!

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