Hi,
I have strange problem with deploy app to tomcat. I want to use Hibernate 3.5.x or 3.6.x and annotation configuration.
(hibernate dependency:
http://red.moskitek.pl/zrzut_ekranu.png)
When I deploy app to tomcat I get exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [galeriaContext.xml]:
Invocation of init method failed; nested exception is java.lang.IncompatibleClassChangeError: Implementing class
I read forums, and I saw that correct settings is i.e:
Code:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
<property name="configurationClass">
<value>org.hibernate.cfg.AnnotationConfiguration</value>
</property>
</bean>
I tried with:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
but it doesn't work too.
It still doesn't work on tomcat but on jetty works fine. And I don't know if it problem with configuration, in my pom(dependency)
or problem with tomcat(caching classes or something else)
Meybe somebady could help, here is my simple app (wicket 1.4.16,spring3.0.3,hibernate3.6.2,hsqldb):
http://red.moskitek.pl/g.zipfor jetty: mvn jetty:run
war for tomcat: mvn clean:clean package -Dmaven.test.skip=true