NutzCN Logo
问答 再sys服务下新增service报错
发布于 2153天前 作者 动物园里的程序猿 1648 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
[ERROR] 09:43:57.233 org.nutz.boot.NbApp.execute(NbApp.java:218) - something happen!!
org.nutz.ioc.IocException: IocBean[dubboManager -> dubboAnnotationBean -> sysUserServiceImpl] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:457)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:426)
	at org.nutz.integration.dubbo.AnnotationBean._init(AnnotationBean.java:73)
	at org.nutz.integration.dubbo.AnnotationBean$FM$_init$cff301be46c87e2fbea60f4ef344bacb.invoke(AnnotationBean.java)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.integration.dubbo.DubboManager.init(DubboManager.java:34)
	at org.nutz.integration.dubbo.DubboManager._init(DubboManager.java:27)
	at org.nutz.integration.dubbo.DubboManager$FM$_init$cff301be46c87e2fbea60f4ef344bacb.invoke(DubboManager.java)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
	at org.nutz.boot.starter.dubbo.DubboStarter.start(DubboStarter.java:17)
	at org.nutz.boot.AppContext.startServers(AppContext.java:306)
	at org.nutz.boot.NbApp.execute(NbApp.java:204)
	at org.nutz.boot.NbApp.run(NbApp.java:177)
	at cn.wizzer.app.sys.commons.core.DubboRpcSysMainLauncher.main(DubboRpcSysMainLauncher.java:39)
Caused by: java.lang.RuntimeException: IocBean[sysUserServiceImpl] fail at field=[sysUserPathService]
	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)
	... 24 more
Caused by: org.nutz.ioc.IocException: IocBean[sysUserPathServiceImpl] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:457)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 26 more
Caused by: org.nutz.lang.born.BorningException: Fail to born or cast to 'cn.wizzer.app.sys.modules.services.impl.SysUserPathServiceImpl'
 by args: []
 because: No suitable Constructor or Factory Method!!
	at org.nutz.lang.Mirror.getBorning(Mirror.java:980)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:102)
	... 30 more
@Table("sys_user_path")
public class Sys_user_path extends BaseModel implements Serializable{
    private static final long serialVersionUID = 1L;
    @Name
    @Column
    @Comment("用户ID")
    @ColDefine(type = ColType.VARCHAR,width = 32)
    private String userid;
    @Column
    @Comment("单位path")
    @ColDefine(type = ColType.VARCHAR,width = 128)
    private String path;
4 回复

SysUserPathServiceImpl没默认构造方法,或者@IocBean没写好

@IocBean
@Service(interfaceClass = SysUserPathService.class)
public class SysUserPathServiceImpl extends BaseServiceImpl<Sys_user_path> implements SysUserPathService{
    public SysUserPathServiceImpl(Dao dao) {
        super(dao);
    }
}

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