Back Forum Reply New

Struts2 Spring JPA Ajax example problem

Hi All,
I am new to Struts 2 .
I followed the example given in 2.0.14/docs...-jpa-ajax.html.
All teh required jars also been added under WEB-INF/lib.

I completed all the steps but while trying to run inside JBoss 4.2.2 i get the following errors:

20:55:30,982 INFO  [XmlWebApplicationContext] Bean 'org..aop.config.internalAutoProxyC  reator' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:55:31,012 INFO  [XmlWebApplicationContext] Bean 'org..orm.jpa.support.PersistenceAn  notationBeanPostProcessor' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:55:31,092 INFO  [DriverManagerDataSource] Loaded JDBC driver: oracle.jdbc.driver.OracleDriver
20:55:31,092 INFO  [XmlWebApplicationContext] Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:55:31,132 INFO  [XmlWebApplicationContext] Bean 'org..orm.jpa.vendor.HibernateJpaVe  ndorAdapter#f72e77' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:55:31,172 INFO  [LocalContainerEntityManagerFactoryBean] Building JPA container EntityManagerFactory for persistence unit 'punit'
20:55:31,232 INFO  [Version] Hibernate Annotations 3.3.0.GA
20:55:31,252 INFO  [Environment] Hibernate 3.2.5
20:55:31,262 INFO  [Environment] hibernate.properties not found
20:55:31,262 INFO  [Environment] Bytecode provider name : javassist
20:55:31,272 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling
20:55:31,392 INFO  [Version] Hibernate EntityManager 3.3.1.GA
20:55:31,753 INFO  [Ejb3Configuration] found EJB3 Entity bean: quickstart.model.Person
20:55:31,883 INFO  [AnnotationBinder] Binding entity from annotated class: quickstart.model.Person
20:55:31,953 INFO  [EntityBinder] Bind entity quickstart.model.Person on table Person
20:55:32,063 INFO  [Version] Hibernate Validator 3.0.0.GA
20:55:32,133 INFO  [DefaultListableBeanFactory] Destroying singletons in org..beans.factory.support.DefaultL  istableBeanFactory@187a8e0: defining beans [org..orm.jpa.support.PersistenceAnn  otationBeanPostProcessor,personService,entityManag  erFactory,dataSource,transactionManager,org.spring  framework.aop.config.internalAutoProxyCreator,org.  .transaction.interceptor.Transactio  nAttributeSourceAdvisor,personAction]; root of factory hierarchy
20:55:32,133 ERROR [ContextLoader] Context initialization failed
org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'org..orm.jpa.support.PersistenceAn  notationBeanPostProcessor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'org..transaction.interceptor.Trans  actionAttributeSourceAdvisor': Cannot create inner bean '(inner bean)' of type [org..transaction.interceptor.Transa  ctionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
Caused by:
org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'org..transaction.interceptor.Trans  actionAttributeSourceAdvisor': Cannot create inner bean '(inner bean)' of type [org..transaction.interceptor.Transa  ctionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
Caused by:
org..beans.factory.BeanCreationExce  ption: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
Caused by:
org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
Caused by:
org..beans.factory.BeanCreationExce  ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
Caused by:
java.lang.ClassCastException: org.hibernate.search.event.FullTextIndexEventListe  ner cannot be cast to org.hibernate.event.PostInsertEventListener
at org.hibernate.cfg.AnnotationConfiguration.buildSes  sionFactory(AnnotationConfiguration.java:856)
at org.hibernate.ejb.Ejb3Configuration.buildEntityMan  agerFactory(Ejb3Configuration.java:730)
at org.hibernate.ejb.HibernatePersistence.createConta  inerEntityManagerFactory(HibernatePersistence.java  :127)
at org..orm.jpa.LocalContainerEntityMa  nagerFactoryBean.createNativeEntityManagerFactory(  LocalContainerEntityManagerFactoryBean.java:218)
at org..orm.jpa.AbstractEntityManagerF  actoryBean.af

Please help anyone???Also attached is the trace..(partial)

This is the forum for the Spring Integration project. You should try posting this question in the ORM forum or, better yet, in the Struts forum, since that is where the example came from. It looks like there is a conflicting version of some dependencies.
¥
Back Forum Reply New