This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 191554

Summary: Unit testing using the embeddable container does not work on JBoss
Product: serverplugins Reporter: Petr Jiricka <pjiricka>
Component: JBossAssignee: Petr Hejl <phejl>
Status: RESOLVED WONTFIX    
Severity: normal CC: dkonecny, kganfield
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: the basic patch

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(EJBContainer.java:101)
        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.