【发布时间】:2023-03-06 16:52:01
【问题描述】:
我真的需要帮助!通过调用具有方法重载的 EJB,我遇到了以下异常:javax.ejb.EJBTransactionRolledbackException: argument type mismatch
有趣的是,这种情况是随机发生的,并且只在这个重载的方法中发生。看下面的结构:
// superclass
public abstract class GenericService<T> {
public void update(T object) throws Exception {
// some logic
}
}
// subclass
@Stateless
public class TableService extends GenericService<Table> implements ITableService {
@Override
public void update(Table table) throws Exception {
/*
* some logic
*/
// call super
super.update(table);
}
}
如果我调用包含 super.update(table) 语句的 TableService.update,则会发生错误。但是,如果我从 TableService.update 中删除 super.update(table) 语句,直接调用 DAO(跳过 super),它就可以工作.
更糟糕的是,这种情况并不经常发生。只有当我有时重新启动 jboss wildfly 时。
显然没有任何问题,应该完全包含 super.update(table) 语句。你能帮忙吗?
【问题讨论】:
标签: ejb jboss7.x ejb-3.0 illegalstateexception wildfly-8