Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8217153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:22:09+00:00 2026-06-07T12:22:09+00:00

I am getting org.hibernate.MappingException: No Dialect mapping for JDBC type: -1 error while fetching

  • 0

I am getting org.hibernate.MappingException: No Dialect mapping for JDBC type: -1 error while fetching row from database.

ERROR details

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause

org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
    org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
    org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
    org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:370)
    org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:559)
    org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:485)
    org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:501)
    org.hibernate.loader.Loader.getResultSet(Loader.java:1796)
    org.hibernate.loader.Loader.doQuery(Loader.java:674)
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
    org.hibernate.loader.Loader.doList(Loader.java:2213)
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
    org.hibernate.loader.Loader.list(Loader.java:2099)
    org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
    org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
    org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
    org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
    com.report.dao.BestSellerReportDAO.getBestSellReport(BestSellerReportDAO.java:82)
    com.report.service.BestSellerService.getBestSellReport(BestSellerService.java:21)
    com.report.service.BestSellerService$$FastClassByCGLIB$$3c172a2c.invoke(<generated>)
    net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
    org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625)
    com.report.service.BestSellerService$$EnhancerByCGLIB$$1ca7eb9d_2.getBestSellReport(<generated>)
    com.report.controller.BestSellerReportController.onSubmit(BestSellerReportController.java:55)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
    org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
    org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Using code:

query = sessionFactory.getCurrentSession().createSQLQuery("CALL my_sp_test(:gender_id,:category_id,:is_date_criteria_on,:from_date,:to_date,:unit_sold_above)");
query.setParameter("gender_id",bestSellCriteriaForms[0].getSelectedGender());       query.setParameter("category_id",bestSellCriteriaForms[0].getSelectedDepartment());
query.setParameter("unit_sold_above", 200);
query.setParameter("is_date_criteria_on", true);
query.setParameter("from_date", date);
query.setParameter("to_date", date);

//Get query as list
reportList = query.list();

I am searching about this error, but coudn’t found any solution yet.

How can I resolve this issue? (And honestly saying, I couldn’t understand why it’s occurring)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:22:10+00:00Added an answer on June 7, 2026 at 12:22 pm

    I resoled my answer by writing my own dialect class as

    import java.sql.Types;
    
    import org.hibernate.Hibernate;
    import org.hibernate.dialect.MySQLDialect;
    import org.hibernate.dialect.function.StandardSQLFunction;
    
    public class CustomeDialect extends MySQLDialect {
    
    
    public CustomeDialect(){
        registerFunction("group_concat", new StandardSQLFunction("group_concat", Hibernate.STRING));
        registerFunction("coalesce", new StandardSQLFunction("coalesce", Hibernate.STRING));
        registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
    
    }
    }
    

    and added to disptcher-servlet.xml as

    <bean id="MySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="dataSource" ref="mydbDatasource"/>
         <property name="configurationClass">
                <value>org.hibernate.cfg.AnnotationConfiguration</value>
         </property>
         <property name="packagesToScan" value="com.example.entity" />
         <property name="hibernateProperties">
          <value>
            hibernate.dialect=com.example.utils.CustomeDialect
          </value>
        </property>
      </bean>
    

    And its working fine for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting an exception: org.hibernate.MappingException: No Dialect mapping for JDBC type: -9 I
I'm getting this Hibernate error: org.hibernate.MappingException: Could not determine type for: a.b.c.Results$BusinessDate, for columns:
I am getting the following exception while adding data into database: org.hibernate.HibernateException: The database
Getting a strange error on bundle install.. bundle install Fetching gem metadata from http://rubygems.org/.....
Im getting following error while running the query. org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found 'LIMIT' near
Just updated from Hibernate 3.6 to Hibernate 4, now getting 10-Feb-2012 14:12:31 org.hibernate.dialect.DerbyDialect <init>
I am getting the following error org.springframework.orm.hibernate3.HibernateSystemException: could not deserialize; nested exception is org.hibernate.type.SerializationException:
I am getting error: org.hibernate.TypeMismatchException: Provided id of the wrong type for class BEntity.
I am using Hibernate and getting Exception in thread main org.hibernate.ObjectNotFoundException: No row with
After attaching newly backuped database, I'm getting an exception: Caused by: org.hibernate.PropertyAccessException: exception setting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.