NutzCN Logo
问答 将nutzioc中的bean注入springbean中的问题,值为空
发布于 2369天前 作者 qq_da8699d6 1811 次浏览 复制 上一个帖子 下一个帖子
标签:

@IocBean(factory="getSelf")
public class UfloEnvironmentProvider implements EnvironmentProvider {

// 通过这个单例,让spring和nutz各取所需
protected static EnvironmentProvider self = new UfloEnvironmentProvider();
public static EnvironmentProvider getSelf() {
    return self;
}

// uflo所需要的东西, 是spring注入的
protected SessionFactory sessionFactory;
protected PlatformTransactionManager platformTransactionManager;
// nutz的注解可以生效
@Inject
protected Dao dao;

public String getCategoryId() {
    return null;
}

public String getLoginUser() {
    SysUser User = CommonUtil.getCurrentUser();
    return User.getLoginName(); 
}

// 后面的是固定方法, 不要动!
public PlatformTransactionManager getPlatformTransactionManager() {
    return platformTransactionManager;
}

public void setPlatformTransactionManager(PlatformTransactionManager platformTransactionManager) {
    this.platformTransactionManager = platformTransactionManager;
}

public SessionFactory getSessionFactory() {
    return sessionFactory;
}

public void setSessionFactory(SessionFactory sessionFactory) {
    this.sessionFactory = sessionFactory;
}

}
@IocBean(factory="getSelf")
public class SignReportAssignmentHandler implements AssignmentHandler {

// 通过这个单例,让spring和nutz各取所需
protected static AssignmentHandler self = new SignReportAssignmentHandler();
public static AssignmentHandler getSelf() {
    return self;
}
@Inject
protected IOfficialService officialService;

}
上面两个类都有配置在spring配置文件中,然而使用@inject注解都没生效





求大神帮忙看看

28 回复

UfloEnvironmentProvider 声明在什么地方了? spring ioc 的配置文件里面吗?

<bean id="uflo.environmentProvider" class="cn.com.unis.uflo.utils.UfloEnvironmentProvider" factory-method="getSelf">
		<property name="platformTransactionManager" ref="uflo.transactionManager" />
		<property name="sessionFactory" ref="uflo.sessionFactory" />
	</bean>
<bean id="uflo.signReportAssignmentHandler" factory-method="getSelf" class="cn.com.unis.uflo.handler.SignReportAssignmentHandler"/>

都声明了?? nutz ioc里面除了用@IocBean声明外, 还用了js方式嘛?

贴一下日志

2018-06-28 14:16:54  INFO [NutFilter] - NutFilter[nutz] starting ...
2018-06-28 14:16:54  INFO [NutLoading] - Nutz Version : 1.r.63.r5-20180110 
2018-06-28 14:16:54  INFO [NutLoading] - Nutz.Mvc[nutz] is initializing ...
2018-06-28 14:16:54  INFO [AnnotationIocLoader] -  > scan 'cn.com.unis'
2018-06-28 14:16:54  INFO [AnnotationIocLoader] -    > add 'checkAction                             ' - cn.com.unis.check.action.CheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'checkService                            ' - cn.com.unis.check.service.impl.CheckServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'libAction                               ' - cn.com.unis.coo.action.LibAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'licensingAction                         ' - cn.com.unis.coo.action.LicensingAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'meetAction                              ' - cn.com.unis.coo.action.MeetAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'plansAction                             ' - cn.com.unis.coo.action.PlansAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'usesAction                              ' - cn.com.unis.coo.action.UsesAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'weeklyAction                            ' - cn.com.unis.coo.action.WeeklyAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'libService                              ' - cn.com.unis.coo.service.impl.LibServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'licensingService                        ' - cn.com.unis.coo.service.impl.LicensingServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'meetService                             ' - cn.com.unis.coo.service.impl.MeetServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'plansService                            ' - cn.com.unis.coo.service.impl.PlansServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'usesService                             ' - cn.com.unis.coo.service.impl.UsesServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'weeklyService                           ' - cn.com.unis.coo.service.impl.WeeklyServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'loginAdminFilter                        ' - cn.com.unis.core.filter.LoginAdminFilter
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'baseService                             ' - cn.com.unis.core.service.impl.BaseServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'belongService                           ' - cn.com.unis.core.service.impl.BelongServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'exportAction                            ' - cn.com.unis.export.action.ExportAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'importAction                            ' - cn.com.unis.export.action.ImportAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'DateFmt                                 ' - cn.com.unis.export.format.DateFmt
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'NumberFmt                               ' - cn.com.unis.export.format.NumberFmt
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'exportServiceImpl                       ' - cn.com.unis.export.service.impl.ExportServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'cilentAction                            ' - cn.com.unis.infos.action.CilentAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'companyAction                           ' - cn.com.unis.infos.action.CompanyAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'infoAction                              ' - cn.com.unis.infos.action.InfoAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'oilAction                               ' - cn.com.unis.infos.action.OilAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'oilAreaAction                           ' - cn.com.unis.infos.action.OilAreaAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'oilTankAction                           ' - cn.com.unis.infos.action.OilTankAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'infoService                             ' - cn.com.unis.infos.service.impl.InfoServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'bACalAction                             ' - cn.com.unis.material.center.action.BACalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'bFCalAction                             ' - cn.com.unis.material.center.action.BFCalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'boatOilCheckAction                      ' - cn.com.unis.material.center.action.BoatOilCheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'carCalAction                            ' - cn.com.unis.material.center.action.CarCalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'eReportAction                           ' - cn.com.unis.material.center.action.EReportAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'exePlanAction                           ' - cn.com.unis.material.center.action.ExePlanAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'oilCheckAction                          ' - cn.com.unis.material.center.action.OilCheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'recOilNoticeAction                      ' - cn.com.unis.material.center.action.RecOilNoticeAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'materialService                         ' - cn.com.unis.material.center.service.impl.MaterialServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'cOCalAction                             ' - cn.com.unis.material.cout.action.COCalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'noticeAction                            ' - cn.com.unis.material.cout.action.NoticeAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'outCheckAction                          ' - cn.com.unis.material.cout.action.OutCheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'outOilCheckAction                       ' - cn.com.unis.material.cout.action.OutOilCheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'planAction                              ' - cn.com.unis.material.cout.action.PlanAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'recMoneyAction                          ' - cn.com.unis.material.cout.action.RecMoneyAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'tACalAction                             ' - cn.com.unis.material.cout.action.TACalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'tFCalAction                             ' - cn.com.unis.material.cout.action.TFCalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'stockCalAction                          ' - cn.com.unis.material.cstock.action.StockCalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'stockCheckAction                        ' - cn.com.unis.material.cstock.action.StockCheckAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'storeNoticeAction                       ' - cn.com.unis.material.penter.action.StoreNoticeAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'certificateAction                       ' - cn.com.unis.material.sales.action.CertificateAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'manifestAction                          ' - cn.com.unis.material.sales.action.ManifestAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'oweAction                               ' - cn.com.unis.material.sales.action.OweAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'cmsAction                               ' - cn.com.unis.portal.action.CmsAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'portalAction                            ' - cn.com.unis.portal.action.PortalAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'cmsService                              ' - cn.com.unis.portal.service.impl.CmsServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'portalService                           ' - cn.com.unis.portal.service.impl.PortalServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'remindAction                            ' - cn.com.unis.remind.action.RemindAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'remindService                           ' - cn.com.unis.remind.service.impl.RemindServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'checksAction                            ' - cn.com.unis.saf.action.ChecksAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'dangerAction                            ' - cn.com.unis.saf.action.DangerAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'defendAction                            ' - cn.com.unis.saf.action.DefendAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'emeAction                               ' - cn.com.unis.saf.action.EmeAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'checksService                           ' - cn.com.unis.saf.service.impl.ChecksServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'dangerService                           ' - cn.com.unis.saf.service.impl.DangerServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'defendService                           ' - cn.com.unis.saf.service.impl.DefndServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'emeervice                               ' - cn.com.unis.saf.service.impl.EmeServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'codesAction                             ' - cn.com.unis.system.action.CodesAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'deptAction                              ' - cn.com.unis.system.action.DeptAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'loginAction                             ' - cn.com.unis.system.action.LoginAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'menuAction                              ' - cn.com.unis.system.action.MenuAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'roleAction                              ' - cn.com.unis.system.action.RoleAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'sortAction                              ' - cn.com.unis.system.action.SortAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'uploadAction                            ' - cn.com.unis.system.action.UploadAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'userAction                              ' - cn.com.unis.system.action.UserAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'systemService                           ' - cn.com.unis.system.service.Impl.SystemServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'fileAction                              ' - cn.com.unis.uflo.action.FileAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'incomDispatchAction                     ' - cn.com.unis.uflo.action.IncomDispatchAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'officialAction                          ' - cn.com.unis.uflo.action.OfficialAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'signReportAction                        ' - cn.com.unis.uflo.action.SignReportAction
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'signReportAssignmentHandler             ' - cn.com.unis.uflo.handler.SignReportAssignmentHandler
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'processLogInterceptor                   ' - cn.com.unis.uflo.interceptor.ProcessLogInterceptor
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'pageModule                              ' - cn.com.unis.uflo.module.PageModule
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'ufloModule                              ' - cn.com.unis.uflo.module.UfloModule
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'belongServices                          ' - cn.com.unis.uflo.service.impl.BelongServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'officialService                         ' - cn.com.unis.uflo.service.impl.OfficialServiceImpl
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -    > add 'ufloEnvironmentProvider                 ' - cn.com.unis.uflo.utils.UfloEnvironmentProvider
2018-06-28 14:16:55  INFO [AnnotationIocLoader] -  > scan 'com.bstek.uflo'
2018-06-28 14:16:55  INFO [NutIoc] - ... NutIoc init complete

js方式也使用了

在js里面也声明了ufloEnvironmentProvider ??? 那可不行的,删掉js里面的相关声明

js里没有声明ufloEnvironmentProvider,只是使用js方式声明了其他的组件

取哪个对象的时候发现@Inject对应的属性为null?

@Inject
protected Dao dao;
@Inject
protected IOfficialService officialService;

这两个 值都为空

在使用这两个对象的使用发现的

如何获取的, 贴代码看看

没有获取,是uflo工作流引擎调用的这两个对象

那你得在Setup的时候主动获取一下,ioc.get的方式

六月 28, 2018 2:57:00 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: IocBean[ufloEnvironmentProvider] throw Exception when creating
	at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.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:1010)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:201)
	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.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	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(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.nutz.ioc.IocException: IocBean[ufloEnvironmentProvider] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:269)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:159)
	at cn.com.unis.MainSetup.init(MainSetup.java:37)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:278)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	... 15 more
Caused by: java.lang.ClassNotFoundException: getSelf
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Unknown Source)
	at org.nutz.lang.Lang.loadClass(Lang.java:2074)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:84)
	... 21 more

setUp中获取就报上面的错了

		EnvironmentProvider ufloEnvironmentProvider = nc.getIoc().get(UfloEnvironmentProvider.class);
		
		AssignmentHandler signReportAssignmentHandler = nc.getIoc().get(SignReportAssignmentHandler.class);

factory是 完整类名#方法名

@IocBean(factory="xxx.yyy.zzz.UfloEnvironmentProvider#getSelf")

2018-06-28 15:26:07 ERROR [NutLoading] - Error happend during start serivce!
org.nutz.ioc.IocException: IocBean[signReportAssignmentHandler] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:269)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:159)
	at cn.com.unis.MainSetup.init(MainSetup.java:39)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:278)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	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.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	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(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: IocBean[signReportAssignmentHandler] fail at field=[officialService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 21 more
Caused by: org.nutz.ioc.IocException: IocBean[officialService] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 23 more
Caused by: java.lang.RuntimeException: IocBean[officialService] fail at field=[processService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 26 more
Caused by: org.nutz.ioc.IocException: IocBean[class:com.bstek.uflo.service.ProcessService] none ioc bean match class=com.bstek.uflo.service.ProcessService
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:447)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 28 more
2018-06-28 15:26:07 ERROR [NutLoading] - try to depose ioc

又成这样了

2018-06-28 15:39:32  INFO [NutFilter] - NutFilter[nutz] starting ...
2018-06-28 15:39:32  INFO [NutLoading] - Nutz Version : 1.r.63.r5-20180110 
2018-06-28 15:39:32  INFO [NutLoading] - Nutz.Mvc[nutz] is initializing ...
2018-06-28 15:39:32  INFO [AnnotationIocLoader] -  > scan 'cn.com.unis'
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'checkAction                             ' - cn.com.unis.check.action.CheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'checkService                            ' - cn.com.unis.check.service.impl.CheckServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'libAction                               ' - cn.com.unis.coo.action.LibAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'licensingAction                         ' - cn.com.unis.coo.action.LicensingAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'meetAction                              ' - cn.com.unis.coo.action.MeetAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'plansAction                             ' - cn.com.unis.coo.action.PlansAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'usesAction                              ' - cn.com.unis.coo.action.UsesAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'weeklyAction                            ' - cn.com.unis.coo.action.WeeklyAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'libService                              ' - cn.com.unis.coo.service.impl.LibServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'licensingService                        ' - cn.com.unis.coo.service.impl.LicensingServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'meetService                             ' - cn.com.unis.coo.service.impl.MeetServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'plansService                            ' - cn.com.unis.coo.service.impl.PlansServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'usesService                             ' - cn.com.unis.coo.service.impl.UsesServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'weeklyService                           ' - cn.com.unis.coo.service.impl.WeeklyServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'loginAdminFilter                        ' - cn.com.unis.core.filter.LoginAdminFilter
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'baseService                             ' - cn.com.unis.core.service.impl.BaseServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'belongService                           ' - cn.com.unis.core.service.impl.BelongServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'exportAction                            ' - cn.com.unis.export.action.ExportAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'importAction                            ' - cn.com.unis.export.action.ImportAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'DateFmt                                 ' - cn.com.unis.export.format.DateFmt
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'NumberFmt                               ' - cn.com.unis.export.format.NumberFmt
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'exportServiceImpl                       ' - cn.com.unis.export.service.impl.ExportServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'cilentAction                            ' - cn.com.unis.infos.action.CilentAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'companyAction                           ' - cn.com.unis.infos.action.CompanyAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'infoAction                              ' - cn.com.unis.infos.action.InfoAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'oilAction                               ' - cn.com.unis.infos.action.OilAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'oilAreaAction                           ' - cn.com.unis.infos.action.OilAreaAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'oilTankAction                           ' - cn.com.unis.infos.action.OilTankAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'infoService                             ' - cn.com.unis.infos.service.impl.InfoServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'bACalAction                             ' - cn.com.unis.material.center.action.BACalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'bFCalAction                             ' - cn.com.unis.material.center.action.BFCalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'boatOilCheckAction                      ' - cn.com.unis.material.center.action.BoatOilCheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'carCalAction                            ' - cn.com.unis.material.center.action.CarCalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'eReportAction                           ' - cn.com.unis.material.center.action.EReportAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'exePlanAction                           ' - cn.com.unis.material.center.action.ExePlanAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'oilCheckAction                          ' - cn.com.unis.material.center.action.OilCheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'recOilNoticeAction                      ' - cn.com.unis.material.center.action.RecOilNoticeAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'materialService                         ' - cn.com.unis.material.center.service.impl.MaterialServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'cOCalAction                             ' - cn.com.unis.material.cout.action.COCalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'noticeAction                            ' - cn.com.unis.material.cout.action.NoticeAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'outCheckAction                          ' - cn.com.unis.material.cout.action.OutCheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'outOilCheckAction                       ' - cn.com.unis.material.cout.action.OutOilCheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'planAction                              ' - cn.com.unis.material.cout.action.PlanAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'recMoneyAction                          ' - cn.com.unis.material.cout.action.RecMoneyAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'tACalAction                             ' - cn.com.unis.material.cout.action.TACalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'tFCalAction                             ' - cn.com.unis.material.cout.action.TFCalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'stockCalAction                          ' - cn.com.unis.material.cstock.action.StockCalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'stockCheckAction                        ' - cn.com.unis.material.cstock.action.StockCheckAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'storeNoticeAction                       ' - cn.com.unis.material.penter.action.StoreNoticeAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'certificateAction                       ' - cn.com.unis.material.sales.action.CertificateAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'manifestAction                          ' - cn.com.unis.material.sales.action.ManifestAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'oweAction                               ' - cn.com.unis.material.sales.action.OweAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'cmsAction                               ' - cn.com.unis.portal.action.CmsAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'portalAction                            ' - cn.com.unis.portal.action.PortalAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'cmsService                              ' - cn.com.unis.portal.service.impl.CmsServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'portalService                           ' - cn.com.unis.portal.service.impl.PortalServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'remindAction                            ' - cn.com.unis.remind.action.RemindAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'remindService                           ' - cn.com.unis.remind.service.impl.RemindServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'checksAction                            ' - cn.com.unis.saf.action.ChecksAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'dangerAction                            ' - cn.com.unis.saf.action.DangerAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'defendAction                            ' - cn.com.unis.saf.action.DefendAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'emeAction                               ' - cn.com.unis.saf.action.EmeAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'checksService                           ' - cn.com.unis.saf.service.impl.ChecksServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'dangerService                           ' - cn.com.unis.saf.service.impl.DangerServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'defendService                           ' - cn.com.unis.saf.service.impl.DefndServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'emeervice                               ' - cn.com.unis.saf.service.impl.EmeServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'codesAction                             ' - cn.com.unis.system.action.CodesAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'deptAction                              ' - cn.com.unis.system.action.DeptAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'loginAction                             ' - cn.com.unis.system.action.LoginAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'menuAction                              ' - cn.com.unis.system.action.MenuAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'roleAction                              ' - cn.com.unis.system.action.RoleAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'sortAction                              ' - cn.com.unis.system.action.SortAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'uploadAction                            ' - cn.com.unis.system.action.UploadAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'userAction                              ' - cn.com.unis.system.action.UserAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'systemService                           ' - cn.com.unis.system.service.Impl.SystemServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'fileAction                              ' - cn.com.unis.uflo.action.FileAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'incomDispatchAction                     ' - cn.com.unis.uflo.action.IncomDispatchAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'officialAction                          ' - cn.com.unis.uflo.action.OfficialAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'signReportAction                        ' - cn.com.unis.uflo.action.SignReportAction
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'signReportAssignmentHandler             ' - cn.com.unis.uflo.handler.SignReportAssignmentHandler
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'processLogInterceptor                   ' - cn.com.unis.uflo.interceptor.ProcessLogInterceptor
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'pageModule                              ' - cn.com.unis.uflo.module.PageModule
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'ufloModule                              ' - cn.com.unis.uflo.module.UfloModule
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'belongServices                          ' - cn.com.unis.uflo.service.impl.BelongServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'officialService                         ' - cn.com.unis.uflo.service.impl.OfficialServiceImpl
2018-06-28 15:39:33  INFO [AnnotationIocLoader] -    > add 'ufloEnvironmentProvider                 ' - cn.com.unis.uflo.utils.UfloEnvironmentProvider
2018-06-28 15:39:33  INFO [NutIoc] - ... NutIoc init complete
2018-06-28 15:39:33  INFO [NutLoading] - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2018-06-28 15:39:33  INFO [NutActionChainMaker] - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
2018-06-28 15:39:33  INFO [NutActionChainMaker] - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2018-06-28 15:39:34  INFO [NutFilePool] - Init file-pool by: /upload_tmp [50]
2018-06-28 15:39:34  INFO [NutFilePool] - file-pool.cursor: 0
2018-06-28 15:39:34  INFO [NutFilePool] - Init file-pool by: D:/data/log [0]
2018-06-28 15:39:34  INFO [NutFilePool] - file-pool.cursor: 8
2018-06-28 15:39:34  WARN [UrlMappingImpl] - Duplicate @At mapping ? path=/exp/xls
2018-06-28 15:39:34  INFO [NutLoading] - Found 490 module methods
2018-06-28 15:39:34  INFO [NutLoading] - Setup application...
2018-06-28 15:39:34  INFO [MLog] - MLog clients using log4j logging.
2018-06-28 15:39:34  INFO [C3P0Registry] - Initializing c3p0-0.9.1.1 [built 15-March-2007 01:32:31; debug? true; trace: 10]
2018-06-28 15:39:34 DEBUG [Jdbcs] - Jdbcs init complete
2018-06-28 15:39:34  INFO [Jdbcs] - Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
2018-06-28 15:39:34  INFO [AbstractPoolBackedDataSource] - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 20000, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1ah9wj8js4a1o7eac0|54879335, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> dm.jdbc.driver.DmDriver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1ah9wj8js4a1o7eac0|54879335, idleConnectionTestPeriod -> 0, initialPoolSize -> 15, jdbcUrl -> jdbc:dm://192.168.2.1:5236/OILS, lastAcquisitionFailureDefaultUser -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 180, maxIdleTime -> 120, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 30, maxStatements -> 20, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 2, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
2018-06-28 15:39:35 DEBUG [DaoSupport] - select expert : org.nutz.dao.impl.jdbc.dm.DmJdbcExpert
2018-06-28 15:39:35 DEBUG [DaoSupport] - JDBC Driver --> 4.0.7.1.6.48 (Build 2018.03.01)
2018-06-28 15:39:35 DEBUG [DaoSupport] - JDBC Name   --> dm.jdbc.driver.DmDriver
2018-06-28 15:39:35 DEBUG [DaoSupport] - JDBC URL    --> jdbc:dm://192.168.2.1:5236/OILS
2018-06-28 15:39:35 DEBUG [DaoSupport] - Database info --> DM:[DM DBMS - 7.1.5.29]
2018-06-28 15:39:35 ERROR [NutLoading] - Error happend during start serivce!
org.nutz.ioc.IocException: IocBean[signReportAssignmentHandler] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:269)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:159)
	at cn.com.unis.MainSetup.init(MainSetup.java:39)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:278)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	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.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	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(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: IocBean[signReportAssignmentHandler] fail at field=[officialService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 21 more
Caused by: org.nutz.ioc.IocException: IocBean[officialService] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 23 more
Caused by: java.lang.RuntimeException: IocBean[officialService] fail at field=[processService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 26 more
Caused by: org.nutz.ioc.IocException: IocBean[class:com.bstek.uflo.service.ProcessService] none ioc bean match class=com.bstek.uflo.service.ProcessService
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:447)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 28 more
2018-06-28 15:39:35 ERROR [NutLoading] - try to depose ioc
2018-06-28 15:39:35  INFO [NutIoc] - org.nutz.ioc.impl.NutIoc@1752780629 is closing. startup date [18-06-28 15:39:33.565]
2018-06-28 15:39:35  INFO [NutIoc] - org.nutz.ioc.impl.NutIoc@1752780629 is deposed. startup date [18-06-28 15:39:33.565]
六月 28, 2018 3:39:35 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: IocBean[signReportAssignmentHandler] throw Exception when creating
	at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.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:1010)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:201)
	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.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
	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(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.nutz.ioc.IocException: IocBean[signReportAssignmentHandler] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:269)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:159)
	at cn.com.unis.MainSetup.init(MainSetup.java:39)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:278)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	... 15 more
Caused by: java.lang.RuntimeException: IocBean[signReportAssignmentHandler] fail at field=[officialService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 21 more
Caused by: org.nutz.ioc.IocException: IocBean[officialService] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 23 more
Caused by: java.lang.RuntimeException: IocBean[officialService] fail at field=[processService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 26 more
Caused by: org.nutz.ioc.IocException: IocBean[class:com.bstek.uflo.service.ProcessService] none ioc bean match class=com.bstek.uflo.service.ProcessService
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:447)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 28 more

IOfficialService 引用的ProcessService 应该是spring提供的, 不应该由@Inject提供

是spring提供的,但是已经放入到nutz ioc中了

public class NutUfloServlet extends UfloServlet {

    private static final long serialVersionUID = -367839499058734908L;
    
    protected String configLocation = "classpath:uflo-spring-context.xml";
    
    protected XmlWebApplicationContext applicationContext;
    
    @Override
    public void init(ServletConfig sc) throws ServletException {
        // 初始化uflo的spring环境
        applicationContext = new XmlWebApplicationContext();
        applicationContext.setServletContext(sc.getServletContext());
        applicationContext.setConfigLocation(configLocation);
        applicationContext.refresh();
        // TODO 把NutzIoc中的ProcessEventHandler注入到uflo中
        // TODO 解决CacheService,可以使用UfloEnvironmentProvider的思路
        
        // 把spring的bean,统统注入到nutz ioc
        Ioc ioc = Mvcs.ctx().getDefaultIoc();
        Ioc2 ioc2 = (Ioc2)ioc;
        for (String beanName : applicationContext.getBeanDefinitionNames()) {
            if ("uflo.props".equals(beanName))
                continue;
            if (!beanName.startsWith("uflo."))
                continue;
            ioc2.getIocContext().save("app", beanName, new ObjectProxy(applicationContext.getBean(beanName)));
        }
        super.init(sc);
    }

    protected WebApplicationContext getWebApplicationContext(ServletConfig config) {
        return applicationContext;
    }

    public void destroy() {
        super.destroy();
        applicationContext.destroy();
    }
}

之前一直是可用的,就是现在要注入上面这两个类才报的错

IOfficialService的实现类是怎样的?

想了想, 是启动顺序的问题

这样处理一下:

Setup里面新增的那两个ioc.get去掉, 改NutUfloServlet

        // 把spring的bean,统统注入到nutz ioc
        Ioc ioc = Mvcs.ctx().getDefaultIoc();
        Ioc2 ioc2 = (Ioc2)ioc;
        for (String beanName : applicationContext.getBeanDefinitionNames()) {
            if ("uflo.props".equals(beanName))
                continue;
            if (!beanName.startsWith("uflo."))
                continue;
            ioc2.getIocContext().save("app", beanName, new ObjectProxy(applicationContext.getBean(beanName)));
        }
		EnvironmentProvider ufloEnvironmentProvider = nc.getIoc().get(UfloEnvironmentProvider.class);
		AssignmentHandler signReportAssignmentHandler = nc.getIoc().get(SignReportAssignmentHandler.class);
        super.init(sc);

@IocBean(name = "officialService", args = { "refer:dao" })
public class OfficialServiceImpl extends BaseServiceImpl implements IOfficialService{

	@Inject
	private ProcessService processService;
	
	@Inject
	private TaskService taskService;
	}

这是IOfficialService的实现类

这样应该就没问题了

搞定了,谢谢wendal大神☺

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