Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

Jack Tower
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBCont at
com.pack.HelloTest.test( 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( at at
at org.junit.internal.runners.statements.InvokeMethod.evaluate( at
org.junit.runners.ParentRunner.runLeaf( ) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit at
org.junit.runners.ParentRunner$ at
org.junit.runners.ParentRunner$1.schedule( 63) at
org.junit.runners.ParentRunner.runChildren( :236) at
org.junit.runners.ParentRunner.access$000( 53) at
org.junit.runners.ParentRunner$2.evaluate( 229) at at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un( at at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts( at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts( at at

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?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!