NutzCN Logo
问答 我想在自己的调用activiti的IdentityService接口,但是注入失败,请教一下大神,正确的方式改如何注入?
发布于 2504天前 作者 qq_b9f971d9 2904 次浏览 复制 上一个帖子 下一个帖子
标签:

这是在自己的service中写的代码:

@Inject
private IdentityService identityService;

下面是报错:

org.nutz.ioc.IocException: IocBean[loginAction] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1368)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: IocBean[loginAction] fail at field=[xtUserService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:136)
	... 30 more
Caused by: org.nutz.ioc.IocException: IocBean[xtUserService] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 32 more
Caused by: java.lang.RuntimeException: IocBean[xtUserService] fail at field=[identityService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:136)
	... 35 more
Caused by: org.nutz.ioc.IocException: IocBean[identityService -> processEngine] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:77)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 37 more
Caused by: org.nutz.lang.InvokingException: Fail to invoke [com.sys.org.nutz.integration.activiti.ActivitiProcessEngineConfiguration].buildProcessEngine() by args:
 
For the reason: org/activiti/bpmn/model/TaskWithFieldExtensions
	at org.nutz.lang.Invoking.invoke(Invoking.java:195)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	... 45 more
Caused by: java.lang.NoClassDefFoundError: org/activiti/bpmn/model/TaskWithFieldExtensions
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.getDefaultDeployers(ProcessEngineConfigurationImpl.java:1205)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDeployers(ProcessEngineConfigurationImpl.java:1139)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:637)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:612)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	... 49 more
Caused by: java.lang.ClassNotFoundException: org.activiti.bpmn.model.TaskWithFieldExtensions
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)
	... 59 more
2018-01-07 13:55:38  [WARN] org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/login/login :
org.nutz.ioc.IocException: IocBean[loginAction] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:475)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1368)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: IocBean[loginAction] fail at field=[xtUserService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:136)
	... 30 more
Caused by: org.nutz.ioc.IocException: IocBean[xtUserService] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 32 more
Caused by: java.lang.RuntimeException: IocBean[xtUserService] fail at field=[identityService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:136)
	... 35 more
Caused by: org.nutz.ioc.IocException: IocBean[identityService -> processEngine] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:77)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 37 more
Caused by: org.nutz.lang.InvokingException: Fail to invoke [com.sys.org.nutz.integration.activiti.ActivitiProcessEngineConfiguration].buildProcessEngine() by args:
 
For the reason: org/activiti/bpmn/model/TaskWithFieldExtensions
	at org.nutz.lang.Invoking.invoke(Invoking.java:195)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	... 45 more
Caused by: java.lang.NoClassDefFoundError: org/activiti/bpmn/model/TaskWithFieldExtensions
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.getDefaultDeployers(ProcessEngineConfigurationImpl.java:1205)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDeployers(ProcessEngineConfigurationImpl.java:1139)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:637)
	at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:612)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	... 49 more
Caused by: java.lang.ClassNotFoundException: org.activiti.bpmn.model.TaskWithFieldExtensions
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)
	... 59 more
2 回复

这不写着缺类吗?

用的maven? pom.xml没加依赖?

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