title: How to resolve “No Dialect mapping for JDBC type: -1” error in java
body: <p>i'm getting <strong>No Dialect mapping for JDBC type: -1</strong> error.
  Previously i asked same question but i'm not catch correct solution.So again i'm asking.</p>
  
  <p>How to resolve this error i.e,</p>
  
  <pre><code>org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
  at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
  at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
  at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:393)
  </code></pre>
  
  <p>my code here:</p>
  
  <pre><code>Session session = null;
  session =  getHibernateTemplate().getSessionFactory().openSession();
  Query qu = session.createSQLQuery("select xml from details " +
          "where start_date between (select * from(select eventdate from emplyoeevent " +
          "where event='logout' and event_id in (select session_id from session " +
          "where session_emplyoee='"+Id+"') order by eventdate asc) " +
          "where rownum=1) and TO_DATE(SYSDATE, 'DD-MON-YYYY HH:MI:SS PM')");
  List li =  qu.list();
  </code></pre>
  
  <p>I'm getting error in List li =  qu.list(); line. What is the meaning of this error.</p>
  
  <p>Any suggestion would be appreciated</p>