集成jedis中初始化JedisIocLoader出现错误,错误是找不到folder or file like '^(.+[.])(js|json)$' no found in org/nutz/integration/jedis/jedis.js
jedis.js不管怎么修改文件位置,JedisIocLoader就是找不到,报相同的错误,目前jedis.js放在/NodeServer/src/main/java/org.nutz.integration.jedis包下。
具体错误如下:
2017-6-10 17:4:57.438 DEBUG [localhost-startStop-1] Found @IocBean : class com.skyou.nutz.model.MyFilter
2017-6-10 17:4:57.444 DEBUG [localhost-startStop-1] Found @IocBean : class com.skyou.nutz.module.UserModule
2017-6-10 17:4:57.448 DEBUG [localhost-startStop-1] Found @IocBean : class com.skyou.nutz.service.ArticleInfoService
17-06-10 17:04:57.457 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born 'org.nutz.integration.jedis.JedisIocLoader' because: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in org/nutz/integration/jedis/jedis.js
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:19)
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.<init>(ComboIocLoader.java:92)
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.<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:4958)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
at java.util.concurrent.Executors$RunnableAdapter.call(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 org/nutz/integration/jedis/jedis.js
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:149)
at org.nutz.resource.Scans.loadResource(Scans.java:116)
at org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:45)
at org.nutz.integration.jedis.JedisIocLoader.<init>(JedisIocLoader.java:8)
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.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:16)
... 26 more
六月 10, 2017 5:04:57 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born 'org.nutz.integration.jedis.JedisIocLoader' because: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in org/nutz/integration/jedis/jedis.js
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:197)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
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:4958)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)
at java.util.concurrent.Executors$RunnableAdapter.call(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.integration.jedis.JedisIocLoader' because: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in org/nutz/integration/jedis/jedis.js
at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:19)
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.<init>(ComboIocLoader.java:92)
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)
... 19 more
Caused by: java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in org/nutz/integration/jedis/jedis.js
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:149)
at org.nutz.resource.Scans.loadResource(Scans.java:116)
at org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:45)
at org.nutz.integration.jedis.JedisIocLoader.<init>(JedisIocLoader.java:8)
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.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:16)
... 26 more
六月 10, 2017 5:04:57 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
六月 10, 2017 5:04:57 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [] startup failed due to previous errors
2017-6-10 17:4:57.453 INFO [localhost-startStop-1] Found 3 classes in 1 base-packages!
beans = ["myFilter", "userModule", "articleInfoService"]
2017-6-10 17:4:57.453 DEBUG [localhost-startStop-1] found org.nutz.integration.jedis.JedisIocLoader -- org.nutz.integration.jedis.JedisIocLoader
2017-6-10 17:4:57.456 DEBUG [localhost-startStop-1] Found 0 resource by src( org/nutz/integration/jedis/jedis.js ) , regex( ^(.+[.])(js|json)$ )
六月 10, 2017 5:04:57 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory C:\Program Files\apache-tomcat-7.0.78\webapps\ROOT has finished in 1,150 ms
六月 10, 2017 5:04:57 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
六月 10, 2017 5:04:57 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
六月 10, 2017 5:04:57 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1947 ms
JedisIocLoader代码如下:
package org.nutz.integration.jedis;
import org.nutz.ioc.loader.json.JsonLoader;
public class JedisIocLoader extends JsonLoader {
public JedisIocLoader() {
super("org/nutz/integration/jedis/jedis.js");
}
}