title: How to fix “No Dialect mapping for JDBC type: -1” error in java
body: <p>i'm getting one error 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>I'm trying to get XML column in that column data is in format of XML</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 <code>List li =  qu.list();</code> line.</p>