java.lang.NoClassDefFoundError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Failed to run test GF ejb-embedded example?
    via by glassfisher,
  • JEE6 Maven Enterprise project
    via by marceloverdijk,
    • java.lang.NoClassDefFoundError: build/jar/ejb/embedded/SimpleEjb (wrong name: ejb/embedded/SimpleEjb) org.glassfish.api.ActionReport failure SEVERE: Exception while deploying the app java.lang.IllegalArgumentException: Invalid ejb jar [ejb-embedded.jar]: it contains zero ejb. Note: 1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. 2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly. at com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:72) at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:124) at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:722) at com.sun.enterprise.deployment.Application.visit(Application.java:1744) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:774) at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:253) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:152) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:79) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262) 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 ejb.embedded.client.SimpleEjbTest.test(SimpleEjbTest.java:55)
    No Bugmate found.