Hello Everybody
I wrote a little Junit test case that does the following
public class MyTest extends TestCase {
public void testExec() {
try
{
Class dialectClass = Class.forName("org.hibernate.dialect.MySQLInnoDBDialect");
MySQLInnoDBDialect dialect = (MySQLInnoDBDialect)dialectClass.newInstance();
SessionFactory sessionFactory = new Configuration()
.configure("hibernate.cfg.xml")
.buildSessionFactory();
....
}
catch(Exception ex)
{
}
}
When the program try to configure the hibernate SessionFactory gets a HibernateException with a detailMessage = "Could not instantiate dialect class". The dialect class is MySQLInnoDBDialect and I'm sure it is in the classpath (the first two rows of the program have no problems).
If I try to run the example as a standalone main, no problems, all ok.
Thank you in advance for all hints
Loris
|