ClassNotFoundException: org.hibernate.search.util.impl.DelegateNamedAnalyzer

Description

when I deployed the ear project to jboss 7.1.1.Final, jboss thrown the following exception:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07] Caused by: java.lang.NoClassDefFoundError: org/hibernate/search/util/impl/DelegateNamedAnalyzer at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:365) at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:222) at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:146) at org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:130) at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:83) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] ... 3 more Caused by: java.lang.ClassNotFoundException: org.hibernate.search.util.impl.DelegateNamedAnalyzer from [Module "deployment.HibernateSearchTest-ear-1.0.ear:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [rt.jar:1.6.0_07]

Database schema is shown as below:

1 2 3 4 5 6 7 8 9 10 CREATE TABLE IF NOT EXISTS myisam_product_article ( article_id int AUTO_INCREMENT, a_desc text, FULLTEXT(a_desc), lat double, lon double, creation_date date, primary key(article_id) ) engine=myisam;

DataSource configuration:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 <datasource jndi-name="java:jboss/datasources/HibernateSearchTest" pool-name="HibernateSearchTest" enabled="true" use-java-context="true"> <connection-url>jdbc:mysql://localhost:3306/hibernatedb</connection-url> <driver>com.mysql</driver> <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>myname</user-name> <password>mypass</password> </security> </datasource>

Please see attached sample project for details.
Best regards
Samuel

Environment

UNix/Linux/Freebsd, JBOSS 7.1.1.Final, Hibernate-Search-4.2.0

Status

Assignee

Sanne Grinovero

Reporter

samw

Labels

Suitable for new contributors

Yes, likely

Pull Request

None

Feedback Requested

None

Components

Affects versions

4.2.0.Final

Priority

Critical