I am trying to set up the eclipse plugin for the hibernate tools. I already have my POJOs and mapping files.
I want to use this to test my HQL's.
Hibernate version:3.1.0
Hibernate.cfg.xml -- Content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="java:/hibernate/SessionFactory">
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5435/cmtestdb</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.default_schema">cmtestdb</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
</session-factory>
</hibernate-configuration>
The console configuration has all the mapping files, the path to the POJOS and postgres driver jar.
In Eclipse, when I try to right click on the configuration and say Create Session Factory, I get the following:
Code:
Problem while executing Create:
SessionFactory(org.hibernate.MappingException: No dialect mapping for JDBC type:-2)
Reason:
org.hibernate.MappingException: No Dialect mapping for JDBC type: -2
What am I doing wrong?
- Sanjeev