Estou tentando acessar um banco de dados DB2 atraves hibernate e não estou tendo sucesso: estou fazendo desta forma:
hibernate.cfg.xml
<property name = "hibernate.connection.url">jdbc:db2:test</property>
<property name = "hibernate.dialect">net.sf.hibernate.dialect.DB2Dialect</property>
<property name = "hibernate.connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property>
<property name = "hibernate.connection.username">db2</property>
<property name = "hibernate.connection.password">db2</property>
estou obtendo a seguinte exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
at br.com.dovac.executavel.TestaConexao.main(TestaConexao.java:9)
Caused by: org.hibernate.HibernateException: JDBC Driver class not found: COM.ibm.db2.jdbc.app.DB2Driver
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:66)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:385)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:61)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1928)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1211)
at br.com.dovac.factory.HibernateSessionFactory.<clinit>(HibernateSessionFactory.java:17)
... 1 more
Caused by: java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:61)
... 8 more
Alguem tem uma idéia doque esta acontecendo?
Muito obrigado