2 Replies Latest reply on Jun 4, 2012 3:09 AM by dbinder

    Unable to deploy EJB jar to GF 3.1.2 remote

    dbinder

      First of all, hello to the arquillian community as I'm as much as new to this community as to arquillian.

       

      I have problems deploying tests for my EJB jar project. When deploying to the running remote server, I get an error that states that I have no EJBs declared in my archive and that I should check my web.xml or ejb-jar.xml for the schema version and to avoid setting "metadata-complete" to true. I checked the arquillian generated war and neither is there a web.xml nor a ejb-jar.xml anywhere.

       

      Can anybody help. I didn't google anything usefull and didn't find similar problem in the other discussions.

       

      By the way remember I'm a noob, I don't know what file excerpt would help finding out what's wrong, so please ask me whatever is needed. And finnally, I would have gladely paste the exception message but it's french localized, so I'll change my locale and will paste it latter

       

      David

        • 1. Re: Unable to deploy EJB jar to GF 3.1.2 remote
          dbinder

          here is the exception I get

           

           

          Grave: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for /home/dav/glassfish-3.1.2/glassfish/domains/domain1/applications/test.

          If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected

          java.lang.RuntimeException: Unable to load the EJB module. DeploymentContext does not contain any EJB. Check the archive to ensure correct packaging for /home/dav/glassfish-3.1.2/glassfish/domains/domain1/applications/test.

          If you use EJB component annotations to define the EJB, and an ejb or web deployment descriptor is also used, please make sure that the deployment descriptor references a Java EE 5 or higher version schema, and that the metadata-complete attribute is not set to true, so the component annotations can be processed as expected

              at org.glassfish.ejb.startup.EjbDeployer.prepare(EjbDeployer.java:195)

              at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:871)

              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:410)

              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)

              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1066)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)

              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)

              at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:214)

              at org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:207)

              at org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:321)

              at org.glassfish.admin.rest.resources.TemplateListOfResource.post(TemplateListOfResource.java:180)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:601)

              at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)

              at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)

              at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)

              at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)

              at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)

              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

              at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)

              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

              at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)

              at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)

              at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)

              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)

              at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)

              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)

              at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)

              at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)

              at com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)

              at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:148)

              at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)

              at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)

              at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)

              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)

              at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)

              at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)

              at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)

              at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)

              at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)

              at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)

              at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)

              at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)

              at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)

              at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)

              at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)

              at java.lang.Thread.run(Thread.java:722)

          • 2. Re: Unable to deploy EJB jar to GF 3.1.2 remote
            dbinder

            OK I found out that I either forgot to annotate my EJBs or anoted them with CDI singleton while injecting them with @EJB, now I need to find some really far and deep hole to hide in shame.