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 - Unit testing using the embeddable container does not work on JBoss
Summary: Unit testing using the embeddable container does not work on JBoss
Status: RESOLVED WONTFIX
Alias: None
Product: serverplugins
Classification: Unclassified
Component: JBoss (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
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
Exception Reporter:


Attachments
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(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.