title: I can not deploy the project into glassfish, when i used injections in entirymanager
body: <p>I can not deploy the project into glassfish, when i used injections in entirymanager. I use glassfish payara. 
  My persistence.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.1"
      xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"&gt;
      &lt;persistence-unit name="DT1"&gt;
          &lt;jta-data-source&gt;jdbc/diplomPool&lt;/jta-data-source&gt;
          &lt;class&gt;model.entity.ForeignSensor&lt;/class&gt;
          &lt;class&gt;model.entity.Hous&lt;/class&gt;
          &lt;class&gt;model.entity.Note&lt;/class&gt;
          &lt;class&gt;model.entity.RommSensor&lt;/class&gt;
          &lt;class&gt;model.entity.Room&lt;/class&gt;
          &lt;class&gt;model.entity.TemperatureData&lt;/class&gt;
          &lt;class&gt;model.entity.TemperatureStatistic&lt;/class&gt;
          &lt;class&gt;model.entity.User&lt;/class&gt;
          &lt;class&gt;model.entity.UsersInformation&lt;/class&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>my servlet</p>
  
  <pre><code>@WebServlet("/TS")
  public class TS extends HttpServlet {
      private static final long serialVersionUID = 1L;
  
  
      public TS() {
          super();
          // TODO Auto-generated constructor stub
      }
  
      @PersistenceUnit(unitName = "DT1")
      private EntityManagerFactory emf;
  
      protected void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
  
          EntityManager em = emf.createEntityManager();
          String results = null;
          Query q = em.createQuery("SELECT u.email FROM User u");
          List&lt;String&gt; names = q.getResultList();
          em.close();
          response.getWriter().append("Served at: ").append(names.toString());
      }
  
      protected void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
          // TODO Auto-generated method stub
          doGet(request, response);
      }
  
  }
  </code></pre>
  
  <p>and when i deploy project into glassfish, i have <a href="http://i.stack.imgur.com/8ras4.png" rel="nofollow">enter image description here</a> </p>
  
  <p>it is my log </p>
  
  <blockquote>
    <p>2016-03-15T13:48:38.725+0200|Severe: Exception while deploying the app
    [DT1] : Exception [EclipseLink-28019] (Eclipse Persistence Services -
    2.6.2.qualifier): org.eclipse.persistence.exceptions.EntityManagerSetupException
    Exception Description: Deployment of PersistenceUnit [DT1] failed.
    Close all factories for this PersistenceUnit. Internal Exception:
    Exception [EclipseLink-0] (Eclipse Persistence Services -
    2.6.2.qualifier): org.eclipse.persistence.exceptions.IntegrityException Descriptor
    Exceptions: 
    --------------------------------------------------------- Exception [EclipseLink-48] (Eclipse Persistence Services - 2.6.2.qualifier):
    org.eclipse.persistence.exceptions.DescriptorException Exception
    Description: Multiple writable mappings exist for the field
    [temperature_statistics.ID].  Only one may be defined as writable, all
    others must be specified read-only. Mapping:
    org.eclipse.persistence.mappings.OneToOneMapping[user] Descriptor:
    RelationalDescriptor(model.entity.TemperatureStatistic -->
    [DatabaseTable(temperature_statistics)]) Exception [EclipseLink-48]
    (Eclipse Persistence Services - 2.6.2.qualifier):
    org.eclipse.persistence.exceptions.DescriptorException Exception
    Description: Multiple writable mappings exist for the field
    [temperature_data.temperature_id].  Only one may be defined as
    writable, all others must be specified read-only. Mapping:
    org.eclipse.persistence.mappings.ManyToOneMapping[rommSensor]
    Descriptor: RelationalDescriptor(model.entity.TemperatureData -->
    [DatabaseTable(temperature_data)]) Exception [EclipseLink-48] (Eclipse
    Persistence Services - 2.6.2.qualifier):
    org.eclipse.persistence.exceptions.DescriptorException Exception
    Description: Multiple writable mappings exist for the field
    [users_information.ID].  Only one may be defined as writable, all
    others must be specified read-only. Mapping:
    org.eclipse.persistence.mappings.OneToOneMapping[user] Descriptor:
    RelationalDescriptor(model.entity.UsersInformation --></p>
    
    <h2>[DatabaseTable(users_information)]) Runtime Exceptions:</h2>
    
    <p>Blockquote</p>
  </blockquote>