No Dialect mapping for JDBC type: -1 when using SQL Server 2008 and driver 3.0

Solution Verified - Updated -

Issue

  • We have a SQL Server 2008 database table that's comprised of several varchar columns, and two varbinary columns.  In our code, we're using entityManager.createNativeQuery(...) to query the varchar columns, and we're using Seam's injected entityManager to do it.  When the code is executed, though, we get the following error message in the console: 

    Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
         at org.hibernate.dialect.TypeNames.get(TypeNames.java:79)
         at org.hibernate.dialect.TypeNames.get(TypeNames.java:104)
         at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:393)
    ...
    

Environment

  • JBoss Enterprise Application Platform (EAP) 5.1
  • Seam 2.2.EAP5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.