Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It probably means some of your queries were not executed. If you have many queries in transaction, e.g.</p> <ul> <li>begin transaction</li> <li>query1</li> <li>query2</li> <li>query3</li> <li>finish transaction</li> </ul> <p>and query2 throws error, then when you try to execute query3 you get this error.</p> <ul> <li>begin transaction</li> <li>query1 (succeeded)</li> <li>query2 (error, something went wrong)</li> <li>query3 (exception like yours is thrown)</li> <li>finish transaction</li> </ul> <p>You should handle exception thrown from query2 and handle it. Show some error to the user, rollback transaction, never try to execute query3.</p> <p>Look also here: <a href="http://www.faqs.org/docs/ppbook/x15040.htm" rel="noreferrer">http://www.faqs.org/docs/ppbook/x15040.htm</a></p> <p>UPDATE</p> <p>To finish transaction:</p> <pre><code>List object = null; try { org.hibernate.Transaction tx = session.beginTransaction(); try { Query q = session.createQuery("from Table where lower(translatedText) like lower('%" + term + "%') or lower(translatedAscii) like lower('%" + term + "%') or lower(originalAscii) like lower('%" + term + "%')"); object = (List&lt;Table&gt;) q.list(); } catch (Exception e) { e.printStackTrace(); } finally { //You can safely rollback here because you are not changing anything in the DB. //If you change something, you should commit transaction at the end of try block, //and here check if it is still active and rollback if it is. tx.rollback(); } return object; } catch (HibernateException e) { throw new RuntimeException("Could not begin transaction"); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload