Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0.5
I am using the following configuration file
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Attention: Generated code! Do not modify by hand!
Generated by: hibernate.cfg.xml.vsl in andromda-hibernate-cartridge.
-->
<!DOCTYPE
hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- properties -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.username">mdeyab</property>
<property name="connection.password">mdeyab</property>
<property name="connection.url">jdbc:mysql://localhost/timesheet</property>
<property name="jta.UserTransaction">UserTransaction</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
<property name="show_sql">true</property>
<property name="session_factory_name">java:/hibernate/SessionFactory</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="default_schema">timesheet</property>
<property name="jdbc.batch_size">0</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.cache.query_cache_factory">org.hibernate.cache.StandardQueryCacheFactory</property>
<!-- mapping files -->
<mapping resource="timesheet/hibernate/ProjectManagerWeeklyApproval.hbm.xml"/>
<mapping resource="timesheet/hibernate/TimeSheetEntry.hbm.xml"/>
<mapping resource="timesheet/hibernate/Task.hbm.xml"/>
<mapping resource="timesheet/hibernate/Allocation.hbm.xml"/>
<mapping resource="timesheet/hibernate/OperationManagerWeeklyApproval.hbm.xml"/>
<mapping resource="timesheet/hibernate/Project.hbm.xml"/>
</session-factory>
</hibernate-configuration>
when I try to execute the following statement
Code:
new Configuration().configure().buildSessionFactory();
the function buildDialect at the class org.hibernate.dialect.DialectFactory
throws a Class Cast Exception why is that
java.lang.ClassCastException
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:78)