3 Replies Latest reply on May 19, 2018 11:48 AM by erick.de.oliveira.leal

    WildFly 13: java.lang.NoSuchMethodError: org.hibernate.Session.createSQLQuery(Ljava/lang/String;)Lorg/hibernate/SQLQuery

    erick.de.oliveira.leal

      I'm updating my project to work with with WildFly 13 (ee8 preview enabled)

      and I'm facing an error on deploy. pom.xml is attached.

       

      java.lang.NoSuchMethodError: org.hibernate.Session.createSQLQuery(Ljava/lang/String;)Lorg/hibernate/SQLQuery

       

      Code:

      public Integer buscarCodUP() throws HibernateException {

      Session session = null;

      try {

      session = this.getSessionHibernate();

      Query query = session.createSQLQuery("SELECT GEN_ID(cod_up, 0) FROM RDB$DATABASE");

      BigInteger valorTotal = (BigInteger) query.uniqueResult();

      return valorTotal.intValue();

       

       

      } catch (Exception e) {

      e.printStackTrace();

      } finally {

      if (session != null) {

      session.clear();

      session.close();

      }

      }

      return null;

       

       

      }