org.hibernate.MappingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I'm working with Postgres while try to execute native SQL getting exception {code} private List<Map<String, Object>> executeQuery(final String pQuery) throws Exception { Session session =xxxxxDao.getSessionFactory().openSession(); List<Map<String, Object>> resultMapList = new ArrayList<Map<String, Object>>(); try { Query sqlQuery = session.createSQLQuery(pQuery); sqlQuery.setResultTransformer(AliasToEntityMapResultTransformer.INSTANCE); resultMapList = sqlQuery.list(); return resultMapList; } catch(Exception e) { e.printStackTrace(); } finally { session.close(); } } {code} Stacktrace: {noformat} org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 at org.hibernate.dialect.TypeNames.get(TypeNames.java:77) at org.hibernate.dialect.TypeNames.get(TypeNames.java:100) at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:378) at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:590) at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:516) at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:532) at org.hibernate.loader.Loader.getResultSet(Loader.java:1962) at org.hibernate.loader.Loader.doQuery(Loader.java:802) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157) {noformat}
    via by Gauri Shankar Choudhary,
  • No Dialect mapping for JDBC type: 7
    via Stack Overflow by Pavan
    ,
  • No Dialect mapping for JDBC type: -9
    via Stack Overflow by RVA
    ,
    • org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111 at org.hibernate.dialect.TypeNames.get(TypeNames.java:77) at org.hibernate.dialect.TypeNames.get(TypeNames.java:100) at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:378) at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:590) at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:516) at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:532) at org.hibernate.loader.Loader.getResultSet(Loader.java:1962) at org.hibernate.loader.Loader.doQuery(Loader.java:802) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2542) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    27 more bugmates