Hi,
I'm new to Hibernate and I'm implementing persistence in an application that uses JUnit and FitNesse for testing. The JUnit tests are working fine, but when trying to run the FitNesse tests I get this error:
Code:
java.lang.NoClassDefFoundError: org/hibernate/Session
I think the problem is that FitNesse runs outside of the container, while Hibernate runs on the inside. Supposedly I can have two different .properties files with special configurations, one for running inside the container, and one for running on the outside (according to this article:
http://butunclebob.com/ArticleS.DavidChelimsky.FitNesseAndHibernate). The problem is I have no idea which properties to change/add to make this work. Does anyone here know how I can solve this?
(Thanks in advance :)
Here is my hibernate.properties file:
Code:
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://127.0.0.1/db
hibernate.connection.username=user
hibernate.connection.password=password
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.c3p0.min_size=5
hibernate.c3p0.max_size=20
hibernate.c3p0.timeout=1800
hibernate.c3p0.max_statements=50
============================================
I have resolved this myself, I found out that it had nothing to do with the container at all, it was as simlpe as explicitly importing the jar files into the FitNesse tests... (just in case anyone else gets the same problem sometime) :o)