I am trying to add transaction support to an existing webapp via spring transactions.
i recently changed my session factory class from LocalSessionFactoryBean to AnnotationSessionFactoryBean.
now i get the following error when the webapp starts:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'txManager' defined in class path resource [context.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/lucene/analysis/standard/StandardAnalyzer
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
so the root cause it
nested exception is java.lang.NoClassDefFoundError: org/apache/lucene/analysis/standard/StandardAnalyzer
i dont understand why now i need to include lucene in my webapp. i dont plan to use it for search and it seems very wrong to me that this error occurs.