k***@zworg.com
2009-04-30 07:45:44 UTC
Hi I'm working on a new project based on Spring, Hibernate, Struts, Maven connecting to a DB2Express instance on my machine.
Unfortunately I can't connect to the DB2 Express instance running on my localmachine (this is just for development and testing).
My spring-hibernate-conf file looks like this
{code}
-
-
-
-
- !-- com.ibm.db2.jdbc.app.DB2Driver
com.ibm.db2.jcc.DB2Driver
-
jdbc:db2://localhost:50000/soctar
-
db2admin
-
********
-
-
-
hibernate-config-soctardb.hbm.xml
-
-
org.hibernate.dialect.DB2Dialect
false
-
{code}
The error I'm getting is:
{code}java.lang.ClassNotFoundException: com.ibm.db2.jdbc.app.DB2Driver{code}
I guess I haven't put the right jdbc driver on the classpath. The one I added to the classpath is "db2java.jar" It's not added in the Maven repository, but as separate jar to the project.
When I connect to mysql (I have made the same database in Mysql) I can connect to it without any problems and it's returning the correct results.
If someone could tell what driver I exactly need and how to configure my hibernate conf I would be most happy :)
Thx in advance
Unfortunately I can't connect to the DB2 Express instance running on my localmachine (this is just for development and testing).
My spring-hibernate-conf file looks like this
{code}
-
-
-
-
- !-- com.ibm.db2.jdbc.app.DB2Driver
com.ibm.db2.jcc.DB2Driver
-
jdbc:db2://localhost:50000/soctar
-
db2admin
-
********
-
-
-
hibernate-config-soctardb.hbm.xml
-
-
org.hibernate.dialect.DB2Dialect
false
-
{code}
The error I'm getting is:
{code}java.lang.ClassNotFoundException: com.ibm.db2.jdbc.app.DB2Driver{code}
I guess I haven't put the right jdbc driver on the classpath. The one I added to the classpath is "db2java.jar" It's not added in the Maven repository, but as separate jar to the project.
When I connect to mysql (I have made the same database in Mysql) I can connect to it without any problems and it's returning the correct results.
If someone could tell what driver I exactly need and how to configure my hibernate conf I would be most happy :)
Thx in advance