title: javax.ejb.EJBTransactionRolledbackException glassfish 3.1 with EJB
body: <p>I have create Entity,DAo and Façade in a Web app. I have no error on my codes but I am getting this exception while using find(T.class,id) method of JPA.An also it says that there is no @Entity annotation on my Entity. But this is not true.How to solve this problem.</p>
  
  <p>MyEntity</p>
  
  <pre><code>@Entity
  @Table(name = "uyeler")
  public class Uyeler implements Serializable {
  
  private static final long serialVersionUID = 1L;
  
  @Id
  @Column(name = "kullaniciadi")
  private String kullaniciadi;
  
  @Column(name = "sifre")
  private String sifre;
  
  @Column(name = "ad")
  private String ad;
  
  @Column(name = "soyad")
  private String soyad;
  
  @Column(name = "cinsiyet")
  private String cinsiyet;
  
  @Column(name = "ilgialanlari")
  private String ilgialanlari;
  
  @Column(name = "dogumtarihi")
  private String dogumtarihi;
  
  @Column(name = "eposta")
  private String eposta;
  
  @Column(name = "epostahaberdar")
  private String epostahaberdar;
  
  public String getKullaniciadi() {
      return kullaniciadi;
  }
  </code></pre>
  
  <p>MyDaoImpl;</p>
  
  <pre><code>public abstract class UyelerDaoImpl&lt;T&gt; {
  
  private final static String UNIT_NAME ="KutuphaneOtomasyonuEJB";
  
  @PersistenceUnit(unitName = UNIT_NAME)    
  private EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory(UNIT_NAME);
  private EntityManager em = emf.createEntityManager(); 
  
  public Uyeler findMemberByUserName(String username){
      return  em.find(Uyeler.class, username);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>persistence.xml</p>
  
  <pre><code>&lt;persistence-unit name="KutuphaneOtomasyonuEJB"
      transaction-type="RESOURCE_LOCAL"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
      &lt;non-jta-data-source&gt;jdbc/MySQLConnectionPool&lt;/non-jta-data-source&gt;
      &lt;class&gt;com.mesutemre.businesModel.Kitaplar&lt;/class&gt;
      &lt;class&gt;com.mesutemre.businesModel.Uyeler&lt;/class&gt;
      &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
          &lt;property name="eclipselink.logging.level" value="FINEST" /&gt;
          &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3307/kutuphane" /&gt;
          &lt;property name="javax.persistence.jdbc.user" value="root" /&gt;
          &lt;property name="javax.persistence.jdbc.password" value="root" /&gt;
          &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" /&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p></p>
  
  <p>Stacktrace;</p>
  
  <pre><code>WARNING: EJB5184:A system exception occurred during an invocation on EJB UyelerDAO, method: public com.mesutemre.businesModel.Uyeler com.mesutemre.businesDAOs.UyelerDAO.findMemberByUserName(java.lang.String)
  </code></pre>
  
  <p>WARNING: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean  at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5071) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4906)   at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1994) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:222)  at 
  SEVERE: Caused by: javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean
  SEVERE:     at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:5071)
  SEVERE:     at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4906)
  SEVERE:     at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2045)
  SEVERE:     ... 71 more
  SEVERE: Caused by: java.lang.IllegalArgumentException: Unknown entity bean class: class com.mesutemre.businesModel.Uyeler, please verify that this class has been marked with the @Entity annotation.
  SEVERE:     at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:648)
  SEVERE: </p>