Hi I am writing a very simple test using EJBContainer. Code is:

EJBContainer container = EJBContainer.createEJBContainer(properties);

Context context = container.getContext();

context.bind("inject", this);


And the dependency:

<dependency>

  <groupId>org.apache.openejb</groupId>

  <artifactId>openejb-core</artifactId>

  <version>4.7.1</version>

  <scope>test</scope>

</dependency>


But when I run this simple test I get a


org.apache.openejb.OpenEjbContainer$NoModulesFoundException: No modules
found to deploy.

1)Maybe descriptors are placed in incorrect location.

Descriptors could go under:

<base-dir>/META-INF or <base-dir>/WEB-INF

but not directly under <base-dir>

Check 'Application Discovery via the Classpath' docs page for more info

2)Maybe no modules are present in the classpath.

Is 'openejb.base' system property pointing to the intended location?

  at
org.apache.openejb.util.Exceptions.newNoModulesFoundException(Exceptions.java:99)

  at
org.apache.openejb.OpenEjbContainer$Provider.load(OpenEjbContainer.java:483)

  at
org.apache.openejb.OpenEjbContainer$Provider.createEJBContainer(OpenEjbContainer.java:272)

  at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:56)

  at
com.scytl.multitenant.CipherTest.shouldGetProtectedDataSource(CipherTest.java:54)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

  at java.lang.reflect.Method.invoke(Method.java:483)


Any idea of what dependency am I missing? It seems like there is a missing
dependency.


Thank you so much.

Reply via email to