title: Hibernate 3.0 + ElementCollection class missing
body: <p>I created a small desktop project using Hibernate, to understand how enterprise patterns are applied in there.</p>
  
  <p>I'm using annotations, and wrote a class to wrap my session factory</p>
  
  <pre><code>public class Hibernation {
  
      private static final SessionFactory sessionFactory;
  
      static{
          try{
              //sesionFactory = new org.hibernate.cfg.Configuration().configure().buildSessionFactory();
              sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
          }
          catch(Throwable e){
              throw new ExceptionInInitializerError(e);
          }
      }
  
      public static Session getSession(){
          return sessionFactory.openSession();
      }
  
  }
  </code></pre>
  
  <p>However, whenever i try to run it, I get this error: </p>
  
  <p>Caused by: java.lang.ClassNotFoundException: javax.persistence.ElementCollection</p>
  
  <p>The jars in my classpath do not seem to have that class inside them</p>
  
  <pre><code>hibernate3.jar
  jpa.jar
  log4j-1.2.15.jar
  persistence-api-1.0.jar
  slf4j-log4j12-1.0.1.jar
  </code></pre>
  
  <p>I've looked around for that class, but I can't find where to download it from. Any idea what jar file i'm missing? I looked inside <a href="http://www.java2s.com/Code/Jar/GHI/Downloadjavaeejar.htm" rel="nofollow noreferrer">javaee.jar</a>, where there are many javax.persistence.*** clases, but its not there either.</p>
  
  <p>Thanks in advance.</p>