Running JUnit Tests on embedded glassfish 4 causing WARNING: AS-CDI-005

孤街醉人 提交于 2020-01-05 07:51:43

问题


I want to run JUnit Tests on an Embedded Glassfish 4 using CDI. It end up with an endless loop of the following output:

WARNING: AS-CDI-005 Okt 22, 2013 4:49:23 PM org.glassfish.weld.BeanDeploymentArchiveImpl handleEntry

Can anybody help

Chears


回答1:


What worked for me is putting your app name in the properties when creating the EJB container

Map<Object, Object> properties = new HashMap<Object, Object>(); 
properties.put(EJBContainer.APP_NAME, "your_app_name");
EJBContainer ejbContainer = EJBContainer.createEJBContainer(properties);


来源:https://stackoverflow.com/questions/19521429/running-junit-tests-on-embedded-glassfish-4-causing-warning-as-cdi-005

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!