File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes No Dialect mapping for JDBC type: -1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No Dialect mapping for JDBC type: -1" Watch "No Dialect mapping for JDBC type: -1" New topic

No Dialect mapping for JDBC type: -1

Praveen Javvaji

Joined: Dec 18, 2007
Posts: 4
Can anyone let me know, what is the cause for the exception type

org.hibernate.MappingException: No Dialect mapping for JDBC type: -1

The entire stack trace is given below:

org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
at org.hibernate.dialect.TypeNames.get(
at org.hibernate.dialect.TypeNames.get(
at org.hibernate.dialect.Dialect.getHibernateTypeName(
at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(
at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(
at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(
at org.hibernate.loader.Loader.getResultSet(
at org.hibernate.loader.Loader.doQuery(
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
at org.hibernate.loader.Loader.doList(
at org.hibernate.loader.Loader.listIgnoreQueryCache(
at org.hibernate.loader.Loader.list(
at org.hibernate.loader.custom.CustomLoader.list(
at org.hibernate.impl.SessionImpl.listCustomQuery(
at org.hibernate.impl.AbstractSessionImpl.list(
at org.hibernate.impl.SQLQueryImpl.list(
at test.SearchDAOTest.testSearch(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(
at junit.framework.TestCase.runBare(
at junit.framework.TestResult$1.protect(
at junit.framework.TestResult.runProtected(
at junit.framework.TestSuite.runTest(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Edvins Reisons
Ranch Hand

Joined: Dec 11, 2006
Posts: 364
For an exception, there may be any number of causes; this one has been discussed a few times in this forum, see here and here. If this does not apply to you, please post your code, mappings and any other relevant information.
[ January 28, 2008: Message edited by: Edvins Reisons ]
I agree. Here's the link:
subject: No Dialect mapping for JDBC type: -1
It's not a secret anymore!