nutz-1.b.51替换nutz-1.r.66报错
下面是报错信息
[2018-07-10 18:15:55][INFO] [org.nutz.ioc.impl.NutIoc:130] - ... NutIoc init complete
[2018-07-10 18:15:55][INFO] [org.nutz.mvc.impl.NutLoading:159] - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
[2018-07-10 18:15:57][INFO] [org.nutz.mvc.impl.NutActionChainMaker:72] - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
[2018-07-10 18:15:58][INFO] [org.nutz.mvc.impl.NutActionChainMaker:72] - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
[2018-07-10 18:15:58][INFO] [org.nutz.filepool.NutFilePool:26] - Init file-pool by: D:\erp_v5_work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\okerp\tmp\upload [100000]
[2018-07-10 18:15:58][INFO] [org.nutz.filepool.NutFilePool:69] - file-pool.cursor: 0
[2018-07-10 18:15:59][INFO] [org.nutz.filepool.NutFilePool:26] - Init file-pool by: D:/erp_v5_work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/okerp/WEB-INF/tmp_definitions [2000]
[2018-07-10 18:15:59][INFO] [org.nutz.filepool.NutFilePool:69] - file-pool.cursor: 0
2018-7-10 18:16:00 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.lang.born.BorningException: Fail to born or cast to 'org.nutz.dao.Dao'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.mvc.LoadingException$FC$bc65b2b706f353003adce1f15181fc1f.invoke(LoadingException.java)
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:1022)
at org.nutz.lang.Lang.wrapThrow(Lang.java:203)
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:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'org.nutz.dao.Dao'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.getBorning(Mirror.java:980)
at org.nutz.mvc.adaptor.injector.ObjectPairInjector.<init>(ObjectPairInjector.java:39)
at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:57)
at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:221)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:160)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:81)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:46)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:22)
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:205)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
... 21 more
[2018-07-10 18:16:00][ERROR] [org.nutz.mvc.impl.NutLoading:125] - Error happend during start serivce!
org.nutz.lang.born.BorningException: Fail to born or cast to 'org.nutz.dao.Dao'
by args: []
because: No suitable Constructor or Factory Method!!
at org.nutz.lang.Mirror.getBorning(Mirror.java:980)
at org.nutz.mvc.adaptor.injector.ObjectPairInjector.<init>(ObjectPairInjector.java:39)
at org.nutz.mvc.adaptor.PairAdaptor.evalInjectorBy(PairAdaptor.java:57)
at org.nutz.mvc.adaptor.AbstractAdaptor.evalInjector(AbstractAdaptor.java:221)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:160)
at org.nutz.mvc.adaptor.AbstractAdaptor.init(AbstractAdaptor.java:81)
at org.nutz.mvc.impl.processor.AdaptorProcessor.evalHttpAdaptor(AdaptorProcessor.java:46)
at org.nutz.mvc.impl.processor.AdaptorProcessor.init(AdaptorProcessor.java:22)
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:205)
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:91)
at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4076)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4730)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
[2018-07-10 18:16:00][ERROR] [org.nutz.mvc.impl.NutLoading:127] - try to depose ioc
[2018-07-10 18:16:00][INFO] [org.nutz.ioc.impl.NutIoc:287] - org.nutz.ioc.impl.NutIoc@1892290 is closing. startup date [18-07-10 18:15:55.000]
[2018-07-10 18:16:00][INFO] [org.nutz.ioc.impl.NutIoc:301] - org.nutz.ioc.impl.NutIoc@1892290 is deposed. startup date [18-07-10 18:15:55.000]
2018-7-10 18:16:00 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2018-7-10 18:16:00 org.apache.catalina.core.StandardContext start
严重: Context [/okerp] startup failed due to previous errors
2018-7-10 18:16:00 org.apache.catalina.core.ApplicationContext log
信息: Cleaning up Shiro Environment
2018-7-10 18:16:01 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8082
2018-7-10 18:16:01 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2018-7-10 18:16:01 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/17 config=null
2018-7-10 18:16:01 org.apache.catalina.startup.Catalina start
信息: Server startup in 15286 ms
这里是core.js配置信息
var ioc = {
config : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : ["/conf/myapp.properties"]
}
},
dataSource : {
type :"com.mchange.v2.c3p0.ComboPooledDataSource",
events : {
depose :"close"
},
fields : {
driverClass : {java :"$config.get('db-driver')"},
jdbcUrl : {java :"$config.get('db-url')"},
user : {java :"$config.get('db-username')"},
password : {java :"$config.get('db-password')"},
minPoolSize : 5,
initialPoolSize : 10,
maxPoolSize : 100,
testConnectionOnCheckin : true,
automaticTestTable : "C3P0TestTable",
idleConnectionTestPeriod : 18000,
maxIdleTime : 300,
maxStatements : 0,
numHelperThreads : 5
}
},
// Dao
dao : {
type :'com.okideaad.erp.OkErpDao',
args : [ {refer :"dataSource"}]
}
};