NutzCN Logo
精华 自定义JsonLoader 启动 error
发布于 3244天前 作者 Rekoe 2402 次浏览 复制 上一个帖子 下一个帖子
标签:
2016-02-04 18:02:03,352 [ERROR][org.nutz.mvc.impl.NutLoading] - Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born 'com.rekoe.web.freemarker.RKCmsIocLoader' becasue: java.lang.NoSuchMethodError: org.nutz.ioc.loader.json.JsonLoader: method <init>()V not found
	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:988)
	at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:116)
	at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:100)
	at org.nutz.mvc.ioc.provider.ComboIocProvider.create(ComboIocProvider.java:15)
	at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:373)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:101)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
	at com.rekoe.mvc.RkCmsNutFilter.init(RkCmsNutFilter.java:21)
	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.<init>(ApplicationFilterConfig.java:103)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: org.nutz.ioc.loader.json.JsonLoader: method <init>()V not found
	at com.rekoe.web.freemarker.RKCmsIocLoader.<init>(RKCmsIocLoader.java:20)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:16)
	... 23 more
二月 04, 2016 6:02:03 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born 'com.rekoe.web.freemarker.RKCmsIocLoader' becasue: java.lang.NoSuchMethodError: org.nutz.ioc.loader.json.JsonLoader: method <init>()V not found
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	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:988)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:164)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:133)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
	at com.rekoe.mvc.RkCmsNutFilter.init(RkCmsNutFilter.java:21)
	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.<init>(ApplicationFilterConfig.java:103)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: org.nutz.lang.born.BorningException: Fail to born 'com.rekoe.web.freemarker.RKCmsIocLoader' becasue: java.lang.NoSuchMethodError: org.nutz.ioc.loader.json.JsonLoader: method <init>()V not found
	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:988)
	at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:116)
	at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:100)
	at org.nutz.mvc.ioc.provider.ComboIocProvider.create(ComboIocProvider.java:15)
	at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:373)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:101)
	... 16 more
Caused by: java.lang.NoSuchMethodError: org.nutz.ioc.loader.json.JsonLoader: method <init>()V not found
	at com.rekoe.web.freemarker.RKCmsIocLoader.<init>(RKCmsIocLoader.java:20)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.nutz.lang.born.EmptyArgsConstructorBorning.born(EmptyArgsConstructorBorning.java:16)
	... 23 more
二月 04, 2016 6:02:03 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
3 回复

super(new String[]{});
或者引用最新快照版也可以

另外, classpath中应该有2个nutz的jar导致的.

@wendal
试了试
两种方式都不行

编译时用了新版nutz,运行时用了老版本nutz

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