Search code examples
javaglassfishclasspathjava-ee-6packaging

Can deploy the app from Netbeans but not from the Glassfish AdminConsole


I have an Enterprise project with an EJB module and a Web module. I am trying to deploy these modules separately on Glassfish server (local) on my machine. If I right click and deploy these projects from Netbeans, they get deployed and run good. But if I try to deploy them from the Glassfish AminConsole,

  • the ejb module gets deployed successfully without any problem.
  • but the web module deployment fails.
  • The ClassDefinitionNotFoundException is thrown for all the EJBs in the ejb module.
  • But the ejb module jar is in the war file (in the WEB-INF/lib folder).

I am using Netbeans7.0 and Glassfish 3.1.

What's the right way to handle this problem?

Thank you.


Solution

  • It was actually the Netbeans that did not include the ejb-jar inside my war when build the application as ear. And the fix was to build them (jar and war) individually.