Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 191554 - Unit testing using the embeddable container does not work on JBoss
Unit testing using the embeddable container does not work on JBoss
Product: serverplugins
Classification: Unclassified
Component: JBoss
All All
: P3 (vote)
: 7.2
Assigned To: Petr Hejl
Depends on:
  Show dependency treegraph
Reported: 2010-11-02 10:13 UTC by Petr Jiricka
Modified: 2015-09-17 13:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

the basic patch (1.54 KB, patch)
2011-02-21 15:08 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-11-02 10:13:54 UTC
1. Register JBoss 6 Milestone 5
2. Create a new Java EE 6 Web Project with JBoss target
3. Create an EJB 
4. Work around bug 191553 by adding <jboss_inst>/common/lib/jboss-ejb-api_3.1_spec.jar on project classpath
5. Create JUnit test for the EJB (using action in popup menu)
6. Run tests on the project

There will be error running the test, the following is the output:

Testcase: testSayHello(p.NewSessionBeanTest):        Caused an ERROR
Unable to instantiate container with factories []
javax.ejb.EJBException: Unable to instantiate container with factories []
        at javax.ejb.embeddable.EJBContainer.createEJBContainer(
        at javax.ejb.embeddable.EJBC
Test p.NewSessionBeanTest FAILED
Comment 1 Petr Hejl 2011-02-21 15:08:30 UTC
Created attachment 106256 [details]
the basic patch

I'm attaching the basic patch. In ideal world this would work just ok. In our world this need jboss.home configured for tests and permgen increased for tests. However even if we could configure these it would fail anyway.

It prints a lot of "Dev Hack" warnings anyway and finally it will fail. There is also issue with some jaxb 1.0 classes not found - perhaps dues to 1.0 prefix :(
Comment 2 Petr Hejl 2011-02-21 15:09:05 UTC
I don't think we can fix/WA it for 7.0.
Comment 3 Martin Balin 2015-09-17 13:09:50 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo