[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1468) No Dialect mapping for JDBC type: 3 Exception

Brian Viveiros (JIRA) noreply at atlassian.com
Wed Sep 27 12:01:27 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1468?page=comments#action_24647 ] 

Brian Viveiros commented on HHH-1468:
-------------------------------------

I'm having the same problem when running a createSQLQuery("select count(some_id) from some_table').  The some_id column is an Int.

MySQL 5.0
MySQL Connector 3.1.11

> No Dialect mapping for JDBC type: 3 Exception
> ---------------------------------------------
>
>          Key: HHH-1468
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1468
>      Project: Hibernate3
>         Type: Bug

>     Reporter: Bhumika Thakkar

>
>
> I get an exception when the following native query returns a decimal type.
>  
> sample code
> @SqlResultSetMapping(name = "scalar", columns = @ColumnResult(name = "amount"))
> @NamedNativeQuery(name = "getAmount", query = "select sum(amount) as amount from billing where id=1", resultSetMapping = "scalar")
> $RCSfile: ExceptionHandler.java,v $.execute Exception
> org.hibernate.MappingException: No Dialect mapping for JDBC type: 3
>         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:192)
>         at org.hibernate.loader.custom.CustomLoader.getHibernateType(CustomLoader.jav
> a:170)
>         at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.ja
> va:152)
>         at org.hibernate.loader.Loader.getResultSet(Loader.java:1678)
>         at org.hibernate.loader.Loader.doQuery(Loader.java:662)
>         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.
> java:224)
>         at org.hibernate.loader.Loader.doList(Loader.java:2150)
>         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
>         at org.hibernate.loader.Loader.list(Loader.java:2024)
>         at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:117)
>         at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1672)
>         at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:147)
>         at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:169)
>         at org.springframework.orm.hibernate3.HibernateTemplate$33.doInHibernate(Hibe
> rnateTemplate.java:920)
>         at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemp
> late.java:365)
>         at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNa
> medParam(HibernateTemplate.java:911)
>                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Ao
> pUtils.java:335)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoi
> nt(ReflectiveMethodInvocation.java:181)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle
> ctiveMethodInvocation.java:148)
>         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
> TransactionInterceptor.java:96)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle
> ctiveMethodInvocation.java:170)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopP
> roxy.java:176)
>         at $Proxy76.getTotalLeadPayout(Unknown Source)
>                at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProc
> essor.java:419)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:22
> 4)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
>         at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.
> java:99)
>         at com.caucho.server.security.SecurityFilterChain.doFilter(SecurityFilterChai
> n.java:135)
>         at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:20
> 9)
>         at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java
> :163)
>         at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.jav
> a:208)
>         at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
>         at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
>         at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
>         at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
>         at java.lang.Thread.run(Thread.java:595)
> $RCSfile: ExceptionHandler.java,v $.execute Exception Cause 1
> org.hibernate.MappingException: No Dialect mapping for JDBC type: 3
>         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:192)
>         at org.hibernate.loader.custom.CustomLoader.getHibernateType(CustomLoader.jav
> a:170)
>         at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.ja
> va:152)
>         at org.hibernate.loader.Loader.getResultSet(Loader.java:1678)
>         at org.hibernate.loader.Loader.doQuery(Loader.java:662)
>         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.
> java:224)
>         at org.hibernate.loader.Loader.doList(Loader.java:2150)
>         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
>         at org.hibernate.loader.Loader.list(Loader.java:2024)
>         at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:117)
>         at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1672)
>         at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:147)
>         at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:169)
>         at org.springframework.orm.hibernate3.HibernateTemplate$33.doInHibernate(Hibe
> rnateTemplate.java:920)
>         at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemp
> late.java:365)
>         at org.springframework.orm.hibernate3.HibernateTemplate.findByNamedQueryAndNa
> medParam(HibernateTemplate.java:911)
>               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(Ao
> pUtils.java:335)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoi
> nt(ReflectiveMethodInvocation.java:181)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle
> ctiveMethodInvocation.java:148)
>         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
> TransactionInterceptor.java:96)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Refle
> ctiveMethodInvocation.java:170)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopP
> roxy.java:176)
>         at $Proxy76.getTotalLeadPayout(Unknown Source)
>         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProc
> essor.java:419)
>         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:22
> 4)
>         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
>         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:115)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
>         at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.
> java:99)
>         at com.caucho.server.security.SecurityFilterChain.doFilter(SecurityFilterChai
> n.java:135)
>         at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:20
> 9)
>         at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java
> :163)
>         at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.jav
> a:208)
>         at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:259)
>         at com.caucho.server.port.TcpConnection.run(TcpConnection.java:363)
>         at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
>         at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list