NutzCN Logo
问答 create ioc bean fail name=modelDatabaseAction ioc define
发布于 3231天前 作者 qq_681beb9a 2284 次浏览 复制 上一个帖子 下一个帖子
标签:

@IocBean(fields = { "dao" })
public class ModelDatabaseDao extends BaseDao{...}

org.nutz.ioc.IocException: create ioc bean fail name=modelDatabaseAction ioc define:
{
"type" :"com.efraiser.ews.action.ModelDatabaseAction",
"singleton" :true,
"events" :{
},
"args" :[],
"fields" :[{
"name" :"ModelDatabaseDao",
"value" :{
"type" :"refer",
"value" :"ModelDatabaseDao"
},
"optional" :false
}],
"scope" :"app"
}
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:92) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:40) ~[nutz-1.b.51.jar:na]
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:64) [nutz-1.b.51.jar:na]
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.b.51.jar:na]
at org.nutz.mvc.NutServlet.service(NutServlet.java:65) [nutz-1.b.51.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [catalina.jar:7.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.62]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat7-websocket.jar:7.0.62]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.62]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.62]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.62]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.62]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [catalina.jar:7.0.62]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.62]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.62]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) [catalina.jar:7.0.62]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.62]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) [catalina.jar:7.0.62]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) [tomcat-coyote.jar:7.0.62]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) [tomcat-coyote.jar:7.0.62]
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2476) [tomcat-coyote.jar:7.0.62]
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2465) [tomcat-coyote.jar:7.0.62]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.62]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: org.nutz.ioc.IocException: For object [ModelDatabaseDao] - type:[]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:201) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:123) ~[nutz-1.b.51.jar:na]
... 33 common frames omitted
Caused by: org.nutz.ioc.ObjectLoadException: Object 'ModelDatabaseDao' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:129) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.loader.cached.CachedIocLoaderImpl.load(CachedIocLoaderImpl.java:47) ~[nutz-1.b.51.jar:na]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:169) ~[nutz-1.b.51.jar:na]
... 37 common frames omitted

1 回复
@IocBean(fields = { "dao" })
public class ModelDatabaseDao extends BaseDao{...}

生成的bean叫 "modelDatabaseDao" --> 首字母小写

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