I am a beginner to hibernate, trying to learn this with MS access.. I have the configurations set and the programs ready. When I try to the use the dialect as defined below.
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="dialect">NHibernate.JetDriver.JetDialect, NHibernate.JetDriver</property>
<property name="connection.driver_class">NHibernate.JetDriver.JetDriver, NHibernate.JetDriver</property>
<property name="connection.connection_string">Provider=Microsoft.Jet.OLEDB.4.0;Data Source=YourDatabaseFilePathHere.mdb</property>
</session-factory>
</hibernate-configuration>
I get the below exception.
Code:
org.hibernate.HibernateException: Dialect class not found: NHibernate.JetDriver.JetDialect, NHibernate.JetDriver
at org.hibernate.dialect.resolver.DialectFactory.constructDialect(DialectFactory.java:159)
at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:108)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:152)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2836)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2832)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
at FirstHiber.main(FirstHiber.java:14)
Caused by: java.lang.ClassNotFoundException: NHibernate.JetDriver.JetDialect, NHibernate.JetDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
I believe it doesnt contain the proper jar or something. Can someone advise