Bug 191554 - Unit testing using the embeddable container does not work on JBoss
Unit testing using the embeddable container does not work on JBoss
Status: NEW
Product: serverplugins
Classification: Unclassified
Component: JBoss
7.0
All All
: P3 (vote)
: 7.2
Assigned To: Petr Hejl
issues@serverplugins
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-02 10:13 UTC by Petr Jiricka
Modified: 2011-11-09 10:27 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


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.


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