OpenEJB Local Client Injection Fails

有些话、适合烂在心里 提交于 2019-12-04 10:58:21

This issue is likely caused by improper location of the descriptors which hint OpenEJB which sorts of modules are available.

To ensure the test-classes get picked up properly, make sure you're placing a file named application-client.xml at src/test/resources/META-INF with the following content:

<application-client/>

This should force OpenEJB to scan and react to the presence of @LocalClient annotations.

I had a similar issue when I tried to test stuff in a test project called tomee-embedded-trial and it turned out that openejb ignores stuff called tomee-.* .

I fixed it for me by specifying the following system properties: openejb.deployments.classpath.include=".*-trial.*" openejb.deployments.package.include=".*-trial.*"

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