Skip to main content

How To Test EJB3.1 with maven

8 replies [Last post]
Anonymous

Hi,
Im wondering if there's a way to test EJB 3.1 with maven using the glassfish
embeddable dependency.
I looked to the post of Alexi
s
but with no success. I have an exception

25 déc. 2009 15:45:27 org.glassfish.ejb.embedded.EJBContainerProviderImpl
createEJBContainer
GRAVE: ejb.embedded.no_modules_found

I ha

--
Abdrabba Yassine
Software Architect
blog: http://a-yassine.blogspot.com
twitter: ayassinov
[att1.html]

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Alexis Moussine-Pouchkine

It seems like you do not have anything to deploy to the EJB container.
Do you have EJBs in your classpath?
-Alexis

On 25 déc. 2009, at 15:59, Abdrabba Yassine wrote:

> Hi,
> Im wondering if there's a way to test EJB 3.1 with maven using the glassfish embeddable dependency.
> I looked to the post of Alexis but with no success. I have an exception
>
> 25 déc. 2009 15:45:27 org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
> GRAVE: ejb.embedded.no_modules_found
>
> I ha
>
> --
> Abdrabba Yassine
> Software Architect
> blog: http://a-yassine.blogspot.com
> twitter: ayassinov

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

brunov
Offline
Joined: 2005-09-20

I am trying to test EJB 3 with Maven and Glassfish-embedded-all, but with no success yet.

I would really like to download a working project (with Maven).

Here is the pom.xml I am using:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.toto</groupId><artifactId>mavenEjb</artifactId>
  <packaging>ejb</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>mavenEjb JEE5 EJB</name>
  <dependencies>

    <dependency>
      <groupId>junit</groupId><artifactId>junit</artifactId><version>4.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.extras</groupId><artifactId>glassfish-embedded-all</artifactId><version>3.0</version>
      <scope>test</scope>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>javax</groupId><artifactId>javaee-api</artifactId><version>6.0</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <repositories>
      <repository>
          <id>java.net1</id><name>Java.Net Maven1 Repository, hosts the javaee-api dependency</name>
          <url>http://download.java.net/maven/1</url><layout>legacy</layout>
      </repository>
  </repositories>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source><target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration><ejbVersion>3.0</ejbVersion></configuration>
      </plugin>

    </plugins>
    <finalName>mavenEjb</finalName>
  </build>
</project>

And here is the error:
Running com.toto.mavenejb.CommanderTest
Feb 25, 2010 3:07:43 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl getValidFile
SEVERE: ejb.embedded.location_not_exists
Feb 25, 2010 3:07:43 PM com.sun.enterprise.v3.server.AppServerStartup run
INFO: GlassFish v3 (74.2) startup time : Embedded(451ms) startup services(347ms) total(798ms)
Feb 25, 2010 3:07:44 PM com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
Feb 25, 2010 3:07:44 PM org.glassfish.admin.mbeanserver.JMXStartupService$JMXConnectorsStarterThread run
INFO: JMXStartupService: JMXConnector system is disabled, skipping.
Feb 25, 2010 3:07:44 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started
Feb 25, 2010 3:07:46 PM com.sun.enterprise.security.SecurityLifecycle
INFO: security.secmgroff
Feb 25, 2010 3:07:46 PM com.sun.enterprise.security.ssl.SSLUtils checkCertificateDates
SEVERE: java_security.expired_certificate
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: Security startup service called
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.PolicyLoader loadPolicy
INFO: policy.loading
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm admin-realm of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm file of classtype com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.auth.realm.Realm doInstantiate
INFO: Realm certificate of classtype com.sun.enterprise.security.auth.realm.certificate.CertificateRealm successfully created.
Feb 25, 2010 3:07:47 PM com.sun.enterprise.security.SecurityLifecycle onInitialization
INFO: Security service(s) started successfully....
Feb 25, 2010 3:07:50 PM com.sun.jts.CosTransactions.DefaultTransactionService identify_ORB
INFO: jts.startup_msg
Feb 25, 2010 3:07:51 PM com.sun.enterprise.connectors.util.ConnectorDDTransformUtils getConnectorDescriptor
SEVERE: rardeployment.connector_descriptor_read_error
Feb 25, 2010 3:07:51 PM com.sun.enterprise.connectors.util.ConnectorDDTransformUtils getConnectorDescriptor
SEVERE:
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:198)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:329)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:330)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1064)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:276)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:180)
at com.sun.ejb.containers.MessageBeanContainer.(MessageBeanContainer.java:199)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:115)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78)
at com.toto.mavenejb.CommanderTest.setUp(CommanderTest.java:35)
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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
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)
Caused by: java.io.FileNotFoundException: /home/administrateur/wsn/mavenEjb/mavenEjb/gfembed5988709257863980429tmp/lib/install/applications/jmsra
at com.sun.enterprise.deploy.shared.FileArchive.open(FileArchive.java:72)
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:183)
... 50 more
Feb 25, 2010 3:07:51 PM com.sun.ejb.containers.MessageBeanContainer
SEVERE: containers.mdb.create_container_exception
Feb 25, 2010 3:07:51 PM com.sun.ejb.containers.MessageBeanContainer
SEVERE: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:172)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1064)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:276)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:180)
at com.sun.ejb.containers.MessageBeanContainer.(MessageBeanContainer.java:199)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:115)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78)
at com.toto.mavenejb.CommanderTest.setUp(CommanderTest.java:35)
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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
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)
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:198)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:329)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:330)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
... 47 more
Caused by: java.io.FileNotFoundException: /home/administrateur/wsn/mavenEjb/mavenEjb/gfembed5988709257863980429tmp/lib/install/applications/jmsra
at com.sun.enterprise.deploy.shared.FileArchive.open(FileArchive.java:72)
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:183)
... 50 more
Feb 25, 2010 3:07:51 PM org.glassfish.api.ActionReport failure
SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:219)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78)
at com.toto.mavenejb.CommanderTest.setUp(CommanderTest.java:35)
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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
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)
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:172)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1064)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:276)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:180)
at com.sun.ejb.containers.MessageBeanContainer.(MessageBeanContainer.java:199)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:115)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
... 41 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:198)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:329)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:330)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
... 47 more
Caused by: java.io.FileNotFoundException: /home/administrateur/wsn/mavenEjb/mavenEjb/gfembed5988709257863980429tmp/lib/install/applications/jmsra
at com.sun.enterprise.deploy.shared.FileArchive.open(FileArchive.java:72)
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:183)
... 50 more
Feb 25, 2010 3:07:51 PM org.glassfish.api.ActionReport failure
SEVERE: Exception while loading the app
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:219)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:197)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:63)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:175)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:216)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78)
at com.toto.mavenejb.CommanderTest.setUp(CommanderTest.java:35)
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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
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)
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:172)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1064)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:276)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:180)
at com.sun.ejb.containers.MessageBeanContainer.(MessageBeanContainer.java:199)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:115)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:207)
... 41 more
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to read the connector deployment descriptors
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:198)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:329)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:330)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:164)
... 47 more
Caused by: java.io.FileNotFoundException: /home/administrateur/wsn/mavenEjb/mavenEjb/gfembed5988709257863980429tmp/lib/install/applications/jmsra
at com.sun.enterprise.deploy.shared.FileArchive.open(FileArchive.java:72)
at com.sun.enterprise.connectors.util.ConnectorDDTransformUtils.getConnectorDescriptor(ConnectorDDTransformUtils.java:183)
... 50 more
Feb 25, 2010 3:07:51 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
INFO: [EJBContainerProviderImpl] Cleaning up on failure ...
Feb 25, 2010 3:07:51 PM org.glassfish.admin.mbeanserver.JMXStartupService shutdown
INFO: JMXStartupService and JMXConnectors have been shut down.
Feb 25, 2010 3:07:51 PM com.sun.enterprise.v3.server.AppServerStartup stop
INFO: Shutdown procedure finished
Feb 25, 2010 3:07:51 PM AppServerStartup run
INFO: [Thread[GlassFish Kernel Main Thread,5,main]] exiting
Feb 25, 2010 3:07:51 PM org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
SEVERE: ejb.embedded.exception_instantiating
javax.ejb.EJBException: Failed to deploy EJB modules - see log for details
at org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:135)
at org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:78)
at com.toto.mavenejb.CommanderTest.setUp(CommanderTest.java:35)
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.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
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: 8.244 sec <<< FAILURE!

Any help ?

brunov
Offline
Joined: 2005-09-20

It Looks like I have a problem with my Message driven Bean
It works if I comment out the MDB annotation (and the code that send a message to the MDB).

//@MessageDriven(mappedName = "ParamCalculatorQueue", activationConfig = {
// @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
// @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
// @ActivationConfigProperty(propertyName="destination", propertyValue="queue/paramCalculatorQueue")
// })
public class ParamCalculatorBean implements MessageListener {

But the same code is working with OpenEJB.

mvatkina
Offline
Joined: 2005-04-04

Only EJB Lite features are guaranteed to work with EJB 3.1 Embeddable support in GlassFish. That said, most of the features will work when run against an existing installation. /home/administrateur/wsn/mavenEjb/mavenEjb/gfembed5988709257863980429tmp/lib/install/applications/jmsra seems like a -embedded-all use case.

Regards,
-marina

brunov
Offline
Joined: 2005-09-20

Is it the item EMB-2-7 "embedded + JMS" here :
http://wikis.sun.com/display/GlassFish/GlassFish3.1Embedded#GlassFish3.1...

Also looking at the Schedule for 3.1 here : http://wikis.sun.com/display/GlassFish/GlassFishV3Schedule#GlassFishV3Sc......

We may be able to test MDB with the Glassfish embedded in november hopefully

??
Bruno

hwellmann
Offline
Joined: 2008-08-16

A while ago, I wrote some glue code to test EJBs with JUnit4 and Embedded Glassfish:
http://code.google.com/p/jeeunit/

See the Wiki pages there for more details.

You may also want to look at http://jboss.org/arquillian (which I haven't tried myself, but it looks similiar, only a good deal more heavy-weight than jeeunit.)

Regards,
Harald

Dominik Dorn

I'm too interested in whats the best practice to test ejb apps with
maven/junit4...

On Fri, Dec 25, 2009 at 3:59 PM, Abdrabba Yassine wrote:

> Hi,
> Im wondering if there's a way to test EJB 3.1 with maven using the
> glassfish embeddable dependency.
> I looked to the post of Alexi s
> but with no success. I have an exception
>
> 25 déc. 2009 15:45:27 org.glassfish.ejb.embedded.EJBContainerProviderImpl
> createEJBContainer
> GRAVE: ejb.embedded.no_modules_found
>
> I ha
>
> --
> Abdrabba Yassine
> Software Architect
> blog: http://a-yassine.blogspot.com
> twitter: ayassinov
>

--
Dominik Dorn
http://dominikdorn.com
[att1.html]

Alexis Moussine-Pouchkine

Are you facing the same error as Yassine?
Have you checked http://blogs.sun.com/alexismp/entry/testing_ejb_3_1_s ?
-Alexis

On 25 déc. 2009, at 19:28, Dominik Dorn wrote:

> I'm too interested in whats the best practice to test ejb apps with maven/junit4...
>
>
>
> On Fri, Dec 25, 2009 at 3:59 PM, Abdrabba Yassine wrote:
> Hi,
> Im wondering if there's a way to test EJB 3.1 with maven using the glassfish embeddable dependency.
> I looked to the post of Alexis but with no success. I have an exception
>
> 25 déc. 2009 15:45:27 org.glassfish.ejb.embedded.EJBContainerProviderImpl createEJBContainer
> GRAVE: ejb.embedded.no_modules_found
>
> I ha
>
> --
> Abdrabba Yassine
> Software Architect
> blog: http://a-yassine.blogspot.com
> twitter: ayassinov
>
>
>
> --
> Dominik Dorn
> http://dominikdorn.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net