NutzCN Logo
问答 单元测试的时候iocBean报错
发布于 2445天前 作者 码农 2147 次浏览 复制 上一个帖子 下一个帖子
标签:
org.nutz.ioc.IocException: IocBean[simpleTest] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
	at org.nutz.mock.NutTestRunner.createTest(NutTestRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:33)
	at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:14)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.RuntimeException: IocBean[simpleTest] fail at field=[userService]
	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:135)
	... 22 more
Caused by: org.nutz.ioc.IocException: IocBean[sysUserServiceImpl -> txREAD_COMMITTED] For object [txREAD_COMMITTED] - type:[interface org.nutz.aop.MethodInterceptor]
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.aop.config.impl.AnnotationAopConfigration.makeIt(AnnotationAopConfigration.java:23)
	at org.nutz.ioc.aop.config.impl.AnnotationAopConfigration.makeIt(AnnotationAopConfigration.java:18)
	at org.nutz.ioc.aop.SimpleAopMaker.getInterceptorPairList(SimpleAopMaker.java:117)
	at org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:64)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:36)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:395)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 24 more
Caused by: org.nutz.ioc.ObjectLoadException: Object 'txREAD_COMMITTED' without define!
	at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:166)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:180)
	... 34 more


已经打上@IocBean(args = { "refer:dao" })了,其他的service都好好的,就是userService报错,不知道怎么回事

1 回复

IocBy缺'*tx"

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