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.

Oracle Community | glassfisher | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Failed to run test GF ejb-embedded example?

    Oracle Community | 7 years ago | glassfisher
    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.
  2. 0

    JEE6 Maven Enterprise project

    Oracle Community | 7 years ago | marceloverdijk
    java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; The EAR file contained the commons-logging jar in the root. This is what the Glassfish log contains: Jun 29, 2010 9:37:17 PM com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Felix platform Welcome to Felix ================ INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: Starting Grizzly Framework 1.9.18-o - Tue Jun 29 21:37:22 CEST 2010 INFO: Starting Grizzly Framework 1.9.18-o - Tue Jun 29 21:37:22 CEST 2010 INFO: Grizzly Framework 1.9.18-o started in: 68ms listening on port 8181 INFO: Grizzly Framework 1.9.18-o started in: 60ms listening on port 4848 INFO: Grizzly Framework 1.9.18-o started in: 18ms listening on port 7676 INFO: Grizzly Framework 1.9.18-o started in: 115ms listening on port 8080 INFO: Grizzly Framework 1.9.18-o started in: 42ms listening on port 3700 INFO: The Admin Console is already installed, but not yet loaded. INFO: GlassFish Server Open Source Edition 3.0.1 (22) startup time : Felix(4079ms) startup services(1277ms) total(5356ms) INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: Binding RMI port to *:8686 INFO: Grizzly Framework 1.9.18-o started in: 23ms listening on port 8080 INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://192.168.0.100:8686/jndi/rmi://192.168.0.100:8686/jmxrmi SEVERE: Class [ Lorg/apache/commons/logging/Log; ] not found. Error while loading [ class nl.kabisa.rsstank.ejb.ImportBean ] WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: Lorg/apache/commons/logging/Log; SEVERE: Exception while deploying the app java.lang.IllegalArgumentException: Invalid ejb jar [rsstank-ejb-2.0.0-SNAPSHOT.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.

    Root Cause Analysis

    1. 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()
    2. Deployment Object Library
      ApplicationFactory.openWith
      1. com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:72)
      2. com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:124)
      3. com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:722)
      4. com.sun.enterprise.deployment.Application.visit(Application.java:1744)
      5. com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:774)
      6. com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:253)
      7. com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
      7 frames
    3. Deployment Related JavaEE Core Classes
      DolProvider.load
      1. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:152)
      2. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:79)
      2 frames
    4. Kernel Classes
      EmbeddedDeployerImpl.deploy
      1. com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
      2. com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554)
      3. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
      4. org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
      5. org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144)
      5 frames
    5. Embedded GlassFish Web
      EJBContainerProviderImpl.createEJBContainer
      1. org.glassfish.ejb.embedded.EJBContainerImpl.deploy(EJBContainerImpl.java:128)
      2. org.glassfish.ejb.embedded.EJBContainerProviderImpl.createEJBContainer(EJBContainerProviderImpl.java:120)
      2 frames
    6. JavaEE 7
      EJBContainer.createEJBContainer
      1. javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:102)
      1 frame
    7. ejb.embedded.client
      SimpleEjbTest.test
      1. ejb.embedded.client.SimpleEjbTest.test(SimpleEjbTest.java:55)
      1 frame