WFLYEJB0034:组件上的 EJB 调用失败

问题描述

模块 1 服务器端

public interface BaseInterface{
  Customer createCustomer(Profile profile);
}

public interface InterfaceA extends BaseInterface{
}

public class ServiceProducer {  
    @EJB(lookup = "java:global/path/ClassA")
    @Produces
    private InterfaceA interfaceA;
}

@Remote(ClassA.class)
public class ClassA implements InterfaceA{
    
    BaseInterface base;

    @Inject
    public ClassA(@Named BaseInterface base){
        this.base = base;
    }
    @Override
    createCustomer implementation ...
} 

模块 2 客户端

public class Api{
    @Inject
    InterfaceA intA;
    
    @Override
    Customer createCustomer(arg){
        intA.createCustomer
    }
}

嗨,我在运行上述程序时遇到以下错误

“ClassA”的无状态EJBLocator,视图是接口InterfaceA,关联是本地

WFLYEJB0034:EJB 调用在组件 WorkflowManager 上为方法公共抽象 Customer BaseInterface.createCustomer(Profile) 失败:javax.ejb.EJBTransactionRolledbackException:WFLYEE0042:无法构造组件实例

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)