title: org.hibernate.HibernateException: get is not valid without active transaction
body: <p>I'm new to Hibernate.</p>
  
  <ul>
  <li>Automatically created hibernate.cfg.xml (Netbeans wizard)</li>
  <li>Automatically created HibernateUtil.java</li>
  <li>Automatically created POJO class with annotations</li>
  </ul>
  
  <p>Trying to get object from database but getting error:</p>
  
  <pre><code>Exception in thread "pool-1-thread-1" org.hibernate.HibernateException: get is not valid without active transaction
      at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
  </code></pre>
  
  <p>getting an object:</p>
  
  <pre><code>Session session = HibernateUtil.getSessionFactory().getCurrentSession();
  CallInfo ci = (CallInfo) session.get(CallInfo.class, ucid);
  </code></pre>
  
  <p>hibernate.cfg.xml</p>
  
  <pre><code>&lt;property name="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
  &lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
  &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost:3306/sochi_feedback&lt;/property&gt;
  &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
  &lt;property name="hibernate.connection.password"&gt;root&lt;/property&gt;
  &lt;property name="hibernate.show_sql"&gt;true&lt;/property&gt;
  &lt;property name="hibernate.query.factory_class"&gt;org.hibernate.hql.classic.ClassicQueryTranslatorFactory&lt;/property&gt;
  &lt;property name="hibernate.current_session_context_class"&gt;thread&lt;/property&gt;
  </code></pre>