• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 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 have a knack for fixing things like this ... um ... sorry ... here is a consilitory tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic