title: Hibernate JPA maven
body: <p>I want to use Hibernate as JPA provider with glassfish server.
  I added hiberante-entitymanager dependency with maven but i keep getting this error every time i run the project. Am i missing another dependency.</p>
  
  <blockquote>
    <p>SEVERE: Exception while deploying the app [JobManager-ear] SEVERE:
    Invalid ejb jar [JobManager-ejb-1.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. java.lang.IllegalArgumentException: Invalid
    ejb jar [JobManager-ejb-1.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.  at
    com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:76)
      at
    com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:128)
      at
    com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:730)
      at
    com.sun.enterprise.deployment.Application.visit(Application.java:1765)
      at
    com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:830)
      at
    com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:277)
      at
    com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:240)
      at
    org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:175)
      at
    org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:94)
      at
    com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:827)
      at
    com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:769)
      at
    com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:368)
      at
    com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at
    org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
      at
    com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
      at
    com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
      at
    com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      at
    com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      at
    com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at
    com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
      at
    com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      at
    com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      at
    com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      at
    com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      at
    com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      at
    com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at
    com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at
    com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at
    com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at
    com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at
    com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at
    com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at
    com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:722)</p>
  </blockquote>
  
  <p>this is pom.xml content:</p>
  
  <blockquote>
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;4.1.10.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;antlr&lt;/groupId&gt;
          &lt;artifactId&gt;antlr&lt;/artifactId&gt;
          &lt;version&gt;2.7.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;dom4j&lt;/groupId&gt;
          &lt;artifactId&gt;dom4j&lt;/artifactId&gt;
          &lt;version&gt;1.6.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.common&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-commons-annotations&lt;/artifactId&gt;
          &lt;version&gt;4.0.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
          &lt;version&gt;4.1.10.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.0-api&lt;/artifactId&gt;
          &lt;version&gt;1.0.1.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.javassist&lt;/groupId&gt;
          &lt;artifactId&gt;javassist&lt;/artifactId&gt;
          &lt;version&gt;3.15.0-GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.logging&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-logging&lt;/artifactId&gt;
          &lt;version&gt;3.1.0.GA&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.transaction&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-transaction-api_1.1_spec&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.Final&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  </blockquote>
  
  <p>help please.</p>