title: java.lang.ClassNotFoundException: org.hibernate.collection.internal.PersistentBag for some EJBs
body: <p>I couldn't figure out how but after changing an entity class (added one more column) the methods operating on that entity started not to be found by the remote client. To be more precise:</p>
  
  <p>I have an entity class:</p>
  
  <pre><code>@Entity(name = "Ride_Offers")
  public class RideOffers implements Serializable{
  
  //declarations...
  
  //new added attribute:
  
  @Column(name = "Deadline")
  @Temporal(TemporalType.TIMESTAMP)
  private Date deadline;
  
  //getters-setters..
  }
  </code></pre>
  
  <p>An example method that doesn't start to work:</p>
  
  <pre><code>@Override
  public RideOffers getOfferByID(int OfferID) {
          return (RideOffers) entityManager.find(RideOffers.class, OfferID);
  }
  </code></pre>
  
  <p>At first I thought the stateless bean was problematic, but when I copied the method to another bean, it was still not working whereas other methods on the copied bean is working fine.</p>
  
  <p>Note that the problem happens on the webapp deployed in Tomcat server on the same computer. In offline Java Application everything works perfect. </p>
  
  <p>The business logic is deployed on JBoss AS 7. The JNDI context name lookup is fine. As I made some search, some posts pointed the problem as non-existence of hibernate libs in the client app, however all are added to the build path and was perfectly functioning until a few hours ago. I don't know what info I should provide more for the solution of the problem.
  Thanks in advance.</p>