NutzCN Logo
问答 spring 于 nutz 整合 error
发布于 3067天前 作者 Rekoe 1680 次浏览 复制 上一个帖子 下一个帖子
标签:
2016-06-30 13:44:48,911 [INFO][org.nutz.mvc.NutFilter] - NutFilter[nutz] starting ...
2016-06-30 13:44:50,524 [DEBUG][org.nutz.mvc.config.AbstractNutConfig] - MainModule: <com.shanggame.MainModule>
2016-06-30 13:44:50,539 [DEBUG][org.nutz.mvc.config.AbstractNutConfig] - Loading by class org.nutz.mvc.impl.NutLoading
2016-06-30 13:44:50,542 [INFO][org.nutz.mvc.impl.NutLoading] - Nutz Version : 1.r.56 
2016-06-30 13:44:50,542 [INFO][org.nutz.mvc.impl.NutLoading] - Nutz.Mvc[nutz] is initializing ...
2016-06-30 13:44:50,543 [DEBUG][org.nutz.mvc.impl.NutLoading] - Web Container Information:
2016-06-30 13:44:50,544 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - Default Charset : UTF-8
2016-06-30 13:44:50,544 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - Current . path  : D:\Tools\MyEclipse\.
2016-06-30 13:44:50,545 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - Java Version    : 1.8.0_66
2016-06-30 13:44:50,545 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - File separator  : \
2016-06-30 13:44:50,545 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - Timezone        : Asia/Shanghai
2016-06-30 13:44:50,545 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - OS              : Windows 10 amd64
2016-06-30 13:44:50,545 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - ServerInfo      : Apache Tomcat/7.0.30
2016-06-30 13:44:50,546 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - Servlet API     : 3.0
2016-06-30 13:44:50,546 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - ContextPath     : 
2016-06-30 13:44:50,546 [DEBUG][org.nutz.mvc.impl.NutLoading] -  - context.tempdir : D:\workspace\.metadata\.me_tcat7\work\Catalina\localhost\_
2016-06-30 13:44:50,547 [DEBUG][org.nutz.mvc.config.AbstractNutConfig] - MainModule: <com.shanggame.MainModule>
2016-06-30 13:44:50,548 [DEBUG][org.nutz.mvc.impl.NutLoading] - >> app.root = D:/workspace/.metadata/.me_tcat7/me-webapps/war2_nutz
2016-06-30 13:44:50,644 [DEBUG][org.nutz.castor.Castors] - Using 94 castor for Castors
2016-06-30 13:44:50,647 [DEBUG][org.nutz.mvc.impl.NutLoading] - @IocBy(type=com.shanggame.nutz.spring.SpringIocProvider, args=["*js", "/ioc", "*anno", "com.shanggame"],init=[])
2016-06-30 13:44:53,953 [INFO][com.shanggame.nutz.spring.SpringIocProvider] - Loading App's global config...
2016-06-30 13:44:55,012 [INFO][com.shanggame.nutz.spring.SpringIocProvider] - Loading App's  data config...
2016-06-30 13:44:55,165 [INFO][com.shanggame.nutz.spring.SpringIocProvider] - Loading App's data...
2016-06-30 13:45:07,210 [INFO][com.shanggame.nutz.spring.SpringIocProvider] - Loading App's messages...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
2016-06-30 13:45:23,065 [INFO][com.shanggame.listener.StartupListener] - Loading App's database config...
2016-06-30 13:45:27,621 [INFO][com.shanggame.action.msg.MsgManager] - 450
Server Run Ok
2016-06-30 13:45:29,048 [DEBUG][org.nutz.mvc.config.AbstractNutConfig] - MainModule: <com.shanggame.MainModule>
2016-06-30 13:45:29,052 [INFO][org.nutz.mvc.impl.NutLoading] - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2016-06-30 13:45:29,058 [DEBUG][org.nutz.mvc.impl.NutLoading] - @Views(DefaultViewMaker.class)
2016-06-30 13:45:29,062 [DEBUG][org.nutz.mvc.impl.NutLoading] - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2016-06-30 13:45:29,071 [DEBUG][org.nutz.mvc.impl.Loadings] - module class location 'file:/D:/workspace/.metadata/.me_tcat7/me-webapps/war2_nutz/WEB-INF/classes/com/shanggame/MainModule.class'
2016-06-30 13:45:29,071 [DEBUG][org.nutz.mvc.impl.Loadings] -  > scan 'com.shanggame'
2016-06-30 13:45:29,345 [DEBUG][org.nutz.mvc.impl.Loadings] -    >> add 'com.shanggame.action.login.UserLoginAction'
2016-06-30 13:45:29,689 [INFO][org.nutz.mvc.impl.NutActionChainMaker] - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
2016-06-30 13:45:29,725 [ERROR][com.shanggame.nutz.spring.SpringIoc] - [loginAdaptor, loginService] # For object [loginService] - type:[]
org.nutz.ioc.IocException: [loginAdaptor, loginService] # For object [loginService] - type:[]
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:217)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:235)
	at com.shanggame.nutz.spring.SpringIoc.get(SpringIoc.java:48)
	at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:320)
	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:47)
	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.<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: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: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: org.nutz.ioc.ObjectLoadException: Object 'loginService' without define!
	at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:166)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:181)
	... 29 more
2016-06-30 13:45:29,732 [DEBUG][org.nutz.mvc.impl.NutActionChainMaker] - Eval FAIL!! : public void com.shanggame.action.login.UserLoginAction.login()
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'loginAdaptor' is defined
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1097)
	at com.shanggame.nutz.spring.SpringIoc.get(SpringIoc.java:51)
	at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:320)
	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:47)
	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.<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: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: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)
2016-06-30 13:45:29,734 [ERROR][org.nutz.mvc.impl.NutLoading] - Error happend during start serivce!
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'loginAdaptor' is defined
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1097)
	at com.shanggame.nutz.spring.SpringIoc.get(SpringIoc.java:51)
	at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:320)
	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:47)
	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.<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: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: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)
2016-06-30 13:45:29,735 [ERROR][org.nutz.mvc.impl.NutLoading] - try to depose ioc
六月 30, 2016 1:45:29 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'loginAdaptor' is defined
	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:422)
	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:169)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
	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: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: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: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'loginAdaptor' is defined
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1097)
	at com.shanggame.nutz.spring.SpringIoc.get(SpringIoc.java:51)
	at org.nutz.mvc.impl.Loadings.evalObj(Loadings.java:320)
	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:47)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:203)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:107)
	... 16 more
六月 30, 2016 1:45:29 下午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
@Modules(scanPackage = true)
@IocBy(type = SpringIocProvider.class, args = { "*js", "/ioc", "*anno", "com.shanggame" })
@SetupBy(MvcSetup.class)
@Encoding(input = "UTF-8", output = "UTF-8")
public class MainModule {

}
2 回复

貌似 找不到 js中的注入

` var ioc = { loginAdaptor : { type : "org.nutz.hessian.mvc.adaptor.HessianAdaptor", args : [ { refer : "loginService" } ] } };

debug 了一下 是有数据的
不晓得为什么在ioc中找不到

/*ComboIocLoader*/
{
   "paths" :["/ioc"],
   "map" :{
      "loginAdaptor" :{
         "type" :"org.nutz.hessian.mvc.adaptor.HessianAdaptor",
         "args" :[{
            "refer" :"loginService"
         }]
      }
   }
 

   "map" :{
      "userLoginAction" :{
         "type" :"com.shanggame.action.login.UserLoginAction",
         "singleton" :true,
         "events" :{
         },
         "args" :[],
         "fields" :{
         },
         "scope" :"app"
      }
   },
   "packages" :["com.shanggame"]
 
}
添加回复
请先登陆
回到顶部