I'm using springmodules annotations to the validation, and hibernate annotations to the persistent layer. With another application server, i haven't got any problem with my app, but in jboss it sends a exception, and don't deploy the war.
My configuration
in the dao layer:
<!-- Hibernate SessionFactory --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="configurationClass"> <value>org.hibernate.cfg.AnnotationConfiguration</value> </property> <property name="configLocation" value="classpath:hibernate.cfg.xml"/> <property name="hibernateProperties"> <value> hibernate.dialect=${hibernate.dialect} hibernate.query.substitutions=true 'Y', false 'N' </value> </property> </bean> <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) --> <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory"/> </bean> <bean id="abstractDao" abstract="true"> <property name="sessionFactory" ref="sessionFactory"/> </bean>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/C:/java/jboss-4.0.3SP1/server/default/tmp/deploy/tmp1447mamba-webapp-1.0-M1-SNAPSHOT-exp.war/WEB-INF/lib/mamba-core-1.0-M1-SNAPSHOT.jar!/applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener Caused by: java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:783)
See sticky, hence moving it to bad post.
btw: this sounds more of a Spring forum post