wood burning stoves*
The moose likes EJB and other Java EE Technologies and the fly likes Junit with EJB - EJBException: Unable to instantiate container with factories [] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Junit with EJB - EJBException: Unable to instantiate container with factories []" Watch "Junit with EJB - EJBException: Unable to instantiate container with factories []" New topic

Junit with EJB - EJBException: Unable to instantiate container with factories []

Jack Tower

Joined: Jan 04, 2014
Posts: 1
Hi all!
I'm newbie in EJB.

I'm trying to test a simple EJB project with JBoss 7.1. But test throws Exception:
javax.ejb.EJBException: Unable to instantiate container with factories [] at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBCont ainer.java:97) at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBCont ainer.java:75) at
com.pack.HelloTest.test(HelloTest.java:17) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at
java.lang.reflect.Method.invoke(Unknown Source) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall( FrameworkMethod.java:47) at
org.junit.internal.runners.model.ReflectiveCallable.run(Refl ectiveCallable.java:12) at
org.junit.runners.model.FrameworkMethod.invokeExplosively(Fr ameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate( InvokeMethod.java:17) at
org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271 ) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit 4ClassRunner.java:70) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit 4ClassRunner.java:50) at
org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java: 63) at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java :236) at
org.junit.runners.ParentRunner.access$000(ParentRunner.java: 53) at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java: 229) at
org.junit.runners.ParentRunner.run(ParentRunner.java:309) at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:50) at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38) at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467) at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683) at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390) at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:197)

It's the test:

My project has got a bean "HelloBean":

And the bean implements interface "Hello":

Why the test throws this exception?
Could you tell me how to fix the error?
I agree. Here's the link: http://aspose.com/file-tools
subject: Junit with EJB - EJBException: Unable to instantiate container with factories []
Similar Threads
assertEquals is wrong?
How the client call remote interface in jboss5 ?
Class cast exception when grabbing remote EJB 3 interface
Getting an EJB session bean which uses @SecurityDomain annotation, in a unit test case through JNDI
lookup for remote bean - failure (only from eclipse)