NutzCN Logo
问答 folder or file like '^(.+[.])(js|json)$' no found in ioc/
发布于 2939天前 作者 qq_65df4497 5451 次浏览 复制 上一个帖子 下一个帖子
标签: mvc ioc

2016-12-9 16:41:54.283 DEBUG [localhost-startStop-1] Found 0 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.json.JsonLoader'
by args: [
@(ioc/)] becasue:
java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:21)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:990)
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:126)
at org.nutz.ioc.loader.combo.ComboIocLoader.(ComboIocLoader.java:80)
at org.nutz.mvc.ioc.provider.ComboIocProvider.create(ComboIocProvider.java:20)
at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:384)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:103)
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:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4649)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5305)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
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:990)
at org.nutz.lang.Lang.makeThrow(Lang.java:150)
at org.nutz.resource.Scans.loadResource(Scans.java:115)
at org.nutz.ioc.loader.json.JsonLoader.(JsonLoader.java:45)
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.DynamicConstructorBorning.born(DynamicConstructorBorning.java:19)
... 24 more
十二月 09, 2016 4:41:54 下午 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.json.JsonLoader'
by args: [
@(ioc/)] becasue:
java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
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:990)
at org.nutz.lang.Lang.wrapThrow(Lang.java:198)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
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:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4649)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5305)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1595)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1585)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.json.JsonLoader'
by args: [
@(ioc/)] becasue:
java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:21)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:990)
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:126)
at org.nutz.ioc.loader.combo.ComboIocLoader.(ComboIocLoader.java:80)
at org.nutz.mvc.ioc.provider.ComboIocProvider.create(ComboIocProvider.java:20)
at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:384)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:103)
... 17 more
Caused by: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
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:990)
at org.nutz.lang.Lang.makeThrow(Lang.java:150)
at org.nutz.resource.Scans.loadResource(Scans.java:115)
at org.nutz.ioc.loader.json.JsonLoader.(JsonLoader.java:45)
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.DynamicConstructorBorning.born(DynamicConstructorBorning.java:19)
... 24 more

十二月 09, 2016 4:41:54 下午 org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
十二月 09, 2016 4:41:54 下午 org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/mavenNutz] startup failed due to previous errors
十二月 09, 2016 4:41:54 下午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7_zsk\webapps\docs
十二月 09, 2016 4:41:54 下午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7_zsk\webapps\manager
十二月 09, 2016 4:41:54 下午 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7_zsk\webapps\ROOT
十二月 09, 2016 4:41:54 下午 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
十二月 09, 2016 4:41:54 下午 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
十二月 09, 2016 4:41:54 下午 org.apache.catalina.startup.Catalina start
INFO: Server startup in 252314 ms

10 回复

写得很清楚,找不到你声明的ioc/目录

我这边怎么写路径都中不到,有可能是什么问题

@qq_65df4497 你把ioc文件夹放在哪里了?

@wendal 放在conf文件下有个ioc文件

右键conf目录, Build Path, Use as Source Folder

@wendal 就是这个路径下 /mavenNutz/conf/ioc/db_config.js 如果我直接写成这样也是一样错误

maven项目?

项目根目录/src/main/resources/ioc/

参考一下现有的嘛

https://github.com/wendal/nutz-book-project 本论坛的源码.

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