1 Reply Latest reply on Jun 18, 2012 1:34 PM by Cdelahun-Oracle

    JPA AND HIBERNATE (createquery PB)


      I have an issue in jpa-hibernate program :
      List dmvs = em.createQuery("select c from Dmv as c order by c.num ASC").getResultList();
      System.err.println("found finsh");

      if (dmvs==null ||dmvs.size() == 0) {
           return -1;
      for (Iterator iter = dmvs.iterator(); iter.hasNext();) {
      Dmv element1 = (Dmv) iter.next();***


      }catch(Exception x){
      the problem is that the em.creatyQueury after 1 or 2 days is blocked and don't return data or exception error !!

      Edited by: user12936212 on 15 juin 2012 03:36

      Edited by: user12936212 on 15 juin 2012 03:45
        • 1. Re: JPA AND HIBERNATE (createquery PB)

          You will need to debug your application and obtain a java thread dump when the problem occurs, and possibly check out the locks in the database to see what might be causing the issue. As you are using Hibernate, you might want to post your product specific questions on the particular product forum - or try using TopLink/EclipseLink as the JPA provider and see if you get the same issue.

          Best Regards,