如题
Exception in thread "main" org.nutz.ioc.IocException: [onlineSurviveDetectionService] # FAIL to create Ioc Bean name=[onlineSurviveDetectionService]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:235)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at com.dada.monitor.nutz.common.IocUtils.get(IocUtils.java:74)
at com.dada.monitor.online.common.AppHolder.inst(AppHolder.java:53)
at com.dada.monitor.online.run.OnlineTopologyRunByApp.main(OnlineTopologyRunByApp.java:65)
Caused by: java.lang.RuntimeException: Fail to eval Injector for field: 'dao'
at org.nutz.lang.Lang.wrapThrow(Lang.java:136)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:128)
... 6 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: dao
at org.nutz.lang.Lang.wrapThrow(Lang.java:153)
at org.nutz.lang.Lang.forName(Lang.java:2193)
at org.nutz.ioc.impl.DefaultValueProxyMaker.make(DefaultValueProxyMaker.java:81)
at org.nutz.ioc.IocMaking.makeValue(IocMaking.java:64)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:124)
... 6 more
Caused by: java.lang.ClassNotFoundException: dao
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.nutz.lang.Lang.loadClass(Lang.java:1994)
at org.nutz.lang.Lang.forName(Lang.java:2189)
... 9 more
我是通过在父类置入doc, 如下:
@IocBean
public class BaseNutzEntityService<T extends BaseEntity> extends IdEntityService<T> {
// @Inject private Dao dao;
protected static final Log log = LogFactory.getLog(BaseNutzEntityService.class);
public static final BaseNutzEntityService<BaseEntity> inst = new BaseNutzEntityService<BaseEntity>();
@Inject
public void setDao(Dao dao) {
super.setDao(dao);
}
麻烦看看是怎么回事?
谢谢