title: java.lang.RuntimeException: Invalid application. EJB ServiceEjb exposes a Remote client view. This feature is not part of the EJB 3.1 Lite API
body: <p>I am trying to get a list of student from the table Etudiant throug an Ejb but i am getting this errors and the application won't deploy:</p>
  
  <pre><code>java.lang.RuntimeException: EJB Container initialization error
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:234)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:356)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
      at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
      at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      at java.lang.Thread.run(Thread.java:724)
  Caused by: java.lang.RuntimeException: Invalid application.  EJB ServiceEjb exposes a Remote client view. This feature is not part of the EJB 3.1 Lite API
      at com.sun.ejb.containers.BaseContainer.assertFullProfile(BaseContainer.java:1105)
      at com.sun.ejb.containers.BaseContainer.&lt;init&gt;(BaseContainer.java:588)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:143)
      at com.sun.ejb.containers.StatelessSessionContainer.&lt;init&gt;(StatelessSessionContainer.java:137)
      at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
      at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      ... 38 more
  </code></pre>
  
  <p>This my EJB class code:</p>
  
  <pre><code>@Stateless(name="ServiceEjb")
  @Local
  @Remote
  public class EtudiantEjb implements EtudiantEjbRemote, EtudiantEjbLocal { 
  
      public EtudiantEjb() { }
  
      @PersistenceContext(unitName="PortailEjb")
      private EntityManager em;
  
      public List&lt;Etudiant&gt; ListEtudiant() {
  
          TypedQuery&lt;Etudiant&gt; query = em.createNamedQuery("Etudiant.listertous", Etudiant.class);
          List&lt;Etudiant&gt; etudiants = query.getResultList();
          return etudiants ;
      }
  </code></pre>
  
  <p>And this is my <em>ejb-jar</em> code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
          xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
          xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee  http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd" version="3.2"&gt;
      &lt;display-name&gt;PortailEjb &lt;/display-name&gt;
      &lt;ejb-client-jar&gt;PortailEjbClient.jar&lt;/ejb-client-jar&gt;
  &lt;/ejb-jar&gt;     
  </code></pre>
  
  <p>I am using an Oracle connection and its working. I am using Eclipse and Glassfish4.</p>