users@glassfish.java.net

Re: Embedded GlassFish no EJBContainer available

From: Major Péter <majorpetya_at_sch.bme.hu>
Date: Sat, 26 Jun 2010 08:38:20 +0200

in console:
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running hu.sch.web.ShowUserTest
[#|2010-06-26T02:08:56.913+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Module
type not recognized for module
/home/aldaris/NetBeansProjects/korok/sch-kp-web/gfembed164689650484664981tmp/applications/korok-ejb|#]

[#|2010-06-26T02:08:56.922+0200|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|There
is no installed container capable of handling this application korok-ejb|#]

[#|2010-06-26T02:08:57.567+0200|SEVERE|glassfish3.1|javax.enterprise.system.container.ejb.org.glassfish.ejb.embedded|_ThreadID=1;_ThreadName=main;|EJB5169:Caught
exception instantiating EmbeddedContainer.
javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
        at
org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:139)
        at
org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:122)
        at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:116)
        at
hu.sch.test.base.ContainerHolder.fireUpEJBContainer(ContainerHolder.java:25)
        at hu.sch.test.base.AbstractTest.setup(AbstractTest.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
|#]

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 62.921
sec <<< FAILURE!

in surefire-reports:
-------------------------------------------------------------------------------
Test set: hu.sch.ejb.MailManagerTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 28.093
sec <<< FAILURE!
hu.sch.ejb.MailManagerTest Time elapsed: 0 sec <<< ERROR!
javax.ejb.EJBException: No EJBContainer provider available
The following providers:
org.glassfish.ejb.embedded.EJBContainerProviderImpl
Returned null from createEJBContainer call.

        at
javax.ejb.embeddable.EJBContainer.reportError(EJBContainer.java:200)
        at
javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:135)
        at
hu.sch.test.base.ContainerHolder.fireUpEJBContainer(ContainerHolder.java:25)
        at hu.sch.test.base.AbstractTest.setup(AbstractTest.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

Thanks,
Peter


2010-06-26 03:53 keltezéssel, Marina Vatkina írta:
> What is the complete output?
>
> thanks,
> -marina
>
> Major Péter wrote:
>> Hi,
>>
>> I'm using glassfish-embedded-all artifact for Maven unit testing
>> (3.1-SNAPSHOT and r38139), and simple rerunning the tests sometimes
>> (absolutely transiently) I get the following error message in
>> surefire-report:
>> javax.ejb.EJBException: No EJBContainer provider available
>> The following providers:
>> org.glassfish.ejb.embedded.EJBContainerProviderImpl
>> Returned null from createEJBContainer call.
>> at
>> javax.ejb.embeddable.EJBContainer.reportError(EJBContainer.java:200)
>>
>> and in the test output:
>> [#|2010-06-26T01:44:49.195+0200|SEVERE|glassfish3.1|javax.enterprise.system.container.ejb.org.glassfish.ejb.embedded|_ThreadID=1;_ThreadName=main;|EJB5169:Caught
>>
>> exception instantiating EmbeddedContainer.
>> javax.ejb.EJBException: Failed to deploy EJB modules - see log for
>> details
>> at
>> org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:139)
>>
>> at
>> org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:122)
>>
>> at
>> javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:116)
>>
>>
>> It looks like, that this only occurs, when I'm not specifying the
>> directory for EJB module, with:
>> properties.put(EJBContainer.MODULES, new
>> File("../sch-kp-ejb-impl/target/classes"));
>> ejb = EJBContainer.createEJBContainer(properties);
>>
>> When I'm not commenting out the properties.put line, then there is no
>> exception (tried several times).
>>
>> Is this a known issue?
>>
>> Thanks,
>> Peter
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>