Red Hat JBoss Developer Studio 版本:10.2.0.GA 构建 ID:GA-v20161125-1418-B55 构建日期:20161125-1418
我有一个 Maven EAR 项目,其中包含以下单独项目:
war ejb-jar ejb-client(本地接口)
如果我从命令行mvn clean install
在父项目上运行a,我可以毫无问题地将生成的ear 文件部署到jboss eap7。但是,如果我从 IDE 执行 clean/build all,然后在服务器上选择 run-as,我会收到以下错误:
Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to
construct component instance
Caused by: java.lang.IllegalArgumentException: Can not set
com.hsntech.hif.eao.OperationsCache field
com.hsntech.hif.application.HIFManagement.opCache to
com.hsntech.hif.eao.OperationsCache$$$view8"}}
ejb-client jar 项目包含接口:
@Local
public interface OperationsCache {
Map<String, OperationMapping> getOperationsMaps() throws HIFEJBException;
void resetCache();
}
并且 ejb.jar impelemtation 包含:
@Singleton
@ConcurrencyManagement(ConcurrencyManagementType.CONTAINER)
public class OperationsCacheImpl implements OperationsCache, Observer {
EJB 正在此类的 war 项目中创建:
@Singleton
@Startup
public class HIFManagement implements HIFManagementMBean {
@EJB
private OperationsCache opCache;