3

The same .war file deploys fine onto Glassfish v2.1. I don't know the last time I tried v3, but I was wanting to check out hot-deploy functionality as it's rumored to be working in netbeans 6.8 with glassfish v3. So, I deploy just like usual and I get the following error:

SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
....
SEVERE: Exception while loading the app
java.lang.RuntimeException: Unable to load EJB module.  DeploymentContext does not contain any EJB  Check archive to ensure correct packaging for c:\src\svn\trunk\gui\target\WEBAPP
    at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:134)
    at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:64)
    at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:153)
    at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:220)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:314)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:169)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1159)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1218)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1207)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:362)
    at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:201)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:241)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    at com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
    at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
    at java.lang.Thread.run(Thread.java:619)

I don't understand why it's complaining about anything EJB related since this is a .war file. Any ideas?

UPDATE: I filed a bug with glassfish: https://glassfish.dev.java.net/issues/show_bug.cgi?id=10592. Either this is a bug in glassfish or at the very least the error message is not helpful in tracking the problem down.

4 Answers 4

6

https://glassfish.dev.java.net/issues/show_bug.cgi?id=10592

From the bug:

Ok, found the cause (thanks much for providing the test case!):

  1. EjbSniffer was retrieved after scanning the archive: one (or more) of the library jars packaged in the archive contains EJBs with component annotations. So the ejb container was asked to load the module later.

  2. The ejb container was not able to find the corresponding metadata because the web.xml is 2.4 version so the meta-data processing skipped the annotation processing (we only process annotations for Java EE 5+ schema versions).

After I changed the web.xml to reference 2.5 schema (you can do 3.0 schema as well): http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

The app deployed successfully.

Please give it a try and let me know if it works for you.

0
2

I have 3_0 schema and I still get the error. What's more interesting is I have two wars, one is the example project from weld archetype, and the other is a customization of that. The custom war doesn't work.

I've checked side by side, it's the same except for more model classes and more properties in persistence.xml

1

Someone using the @Stateless annotations in ManagedBeans is reporting a similar problem on the java.net Forums.

I don't know if this applies to you but the given workaround was:

Go to the admin console, go to the update center, and install EJB.

I didn't test it myself so I can't confirm this will help.

3
  • Thanks Pascal, when I go to update tool, I do have glassfish ejb container & glassfish ejb lite container added. I can understand that there is perhaps something in the project that is making glassfish think that there are EJBs in the project, however from what I can tell ejb support is installed.
    – dpb
    Oct 26, 2009 at 18:46
  • This was more a guess than a serious lead. Actually, this really looks like a bug to me. Maybe you'll be more lucky if you report it in NetBeans' issue tracker. Oct 26, 2009 at 18:54
  • Good idea, I filed a bug: glassfish.dev.java.net/issues/show_bug.cgi?id=10592
    – dpb
    Oct 27, 2009 at 3:58
0

Just my $0.02...

I had the same error after I added the JaxMe library (version 0.5.2) to my application. This caused a deployment failure on one of my war modules - which confused the hell out of me, because I didn't make any changes to that module. Removing JaxMe fixed the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.