java.lang.IllegalArgumentException: Invalid ejb jar [myejb.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 | kikujiro | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Invalid ejb jar ... it contains zero ejb

    Oracle Community | 6 years ago | kikujiro
    java.lang.IllegalArgumentException: Invalid ejb jar [myejb.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

    Slf4j: Classpath Contains Multiple Slf4j Bindings Error While Starting Jboss

    wpthm.com | 2 years ago
    java.lang.IllegalArgumentException: Invalid ejb jar [NetBeansJunitTutorial.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.+
  3. 0

    Slf4j Binding In Weld-Servlet.Jar

    wpthm.com | 1 year ago
    java.lang.IllegalArgumentException: Invalid ejb jar [NetBeansJunitTutorial.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.+
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    jUnit test won't work when calling embeddable EJBContainer (EJB and other Java EE Technologies forum at JavaRanch)

    coderanch.com | 1 year ago
    java.lang.IllegalArgumentException: Invalid ejb jar [NetBeansJunitTutorial.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.
  6. 0

    jUnit test won't work when calling embeddable EJBContainer

    Oracle Community | 5 years ago | 903445
    java.lang.IllegalArgumentException: Invalid ejb jar [NetBeansJunitTutorial.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.+

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      Invalid ejb jar [myejb.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:76)
      2. com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:128)
      3. com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
      4. com.sun.enterprise.deployment.Application.visit(Application.java:1765)
      5. com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:816)
      6. com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:277)
      7. com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
      7 frames
    3. Deployment Related JavaEE Core Classes
      DolProvider.load
      1. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:171)
      2. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:93)
      2 frames
    4. Kernel Classes
      ApplicationLifecycle.deploy
      1. com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:828)
      2. com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:770)
      3. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
      4. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      4 frames
    5. Embedded GlassFish Web
      DeployCommand.execute
      1. org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
      1 frame
    6. Kernel Classes
      CommandRunnerImpl$ExecutionContext.execute
      1. com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
      2. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      3. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      4. com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      5. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      6. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      6 frames
    7. GlassFish Admin
      TemplateListOfResource.createResource
      1. org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:202)
      2. org.glassfish.admin.rest.ResourceUtil.runCommand(ResourceUtil.java:195)
      3. org.glassfish.admin.rest.resources.TemplateListOfResource.createResource(TemplateListOfResource.java:148)
      3 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:601)
      4 frames
    9. Jersey
      WebApplicationImpl.handleRequest
      1. com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
      2. com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
      3. com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
      4. com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
      5. com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
      6. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      7. com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
      8. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      9. com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
      10. com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
      11. com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
      12. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
      13. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
      14. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
      15. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
      15 frames
    10. jersey-bundle
      GrizzlyContainer.service
      1. com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer._service(GrizzlyContainer.java:182)
      2. com.sun.jersey.server.impl.container.grizzly.GrizzlyContainer.service(GrizzlyContainer.java:147)
      2 frames
    11. GlassFish Admin
      RestAdapter.service
      1. org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:184)
      1 frame
    12. Grizzly WS
      GrizzlyAdapter.service
      1. com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      1 frame
    13. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
      2 frames
    14. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      13 frames
    15. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:722)[/code]
      1 frame