844 Star 3K Fork 927

GVPJbootProjects / jboot

 / 详情

异步调用RPC实例化出现异常

Backlog
Opened this issue  
2021-11-12 11:02

通过MQ队列方式调用RPC服务,在加载配置实例化接口时出现异常,关键点
jboot.app.mode!=dev 非开发模式(开发模式不报错);
引用RPC接口方式使用( 注解方式无法实例化 ):

private static final XxxService xxxService = Jboot.service(XxxService .class, new RpcReferenceConfig().buildRpcReference("xxx","1.0.0",0));

buildRpcReference 方法:

public JbootrpcReferenceConfig buildRpcReference(String group,String version,Integer retries){
        JbootrpcReferenceConfig cfg = new JbootrpcReferenceConfig();
        if(StrUtil.isNotBlank(version))
            cfg.setVersion(version);
        if(StrUtil.isNotBlank(group))
            cfg.setGroup(group);
        if(retries!=null)
            cfg.setRetries(retries);
        return cfg;
    }

报错信息:

Caused by: java.lang.ClassCastException: io.jboot.components.rpc.JbootrpcConfig cannot be cast to io.jboot.components.rpc.JbootrpcConfig
	at io.jboot.components.rpc.JbootrpcManager.<init>(JbootrpcManager.java:46)
	at io.jboot.components.rpc.JbootrpcManager.<clinit>(JbootrpcManager.java:39)
	... 7 more

Comments (2)

星痕 created任务
星痕 changed description
Expand operation logs

添加配置: undertow.hotSwapClassPrefix=io.jboot

试过了,无效

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
61279 fuhai 1578915942
Java
1
https://gitee.com/JbootProjects/jboot.git
git@gitee.com:JbootProjects/jboot.git
JbootProjects
jboot
jboot

Search