13 Replies Latest reply on Jan 28, 2013 7:56 AM by Sam W

    how to add hibernate-search-4.2.0.jar file to application container

    Sam W Expert

      Hi, With jboss 7.1.1.Final and hibernate-search-4.2.0, I want to exclude the hibernate-search jar file in my pom.xml file by adding its scope as "provided" to it like so:

       

       

      <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate-search</artifactId>

                  <version>4.2.0.Final</version>

                  <scope>provided</scope>

       

              </dependency>

       

       

      but it failed with the following error during compile time:

       

       

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project ForestSurf-web: Compilation failure

      [ERROR] Failure executing javac, but could not parse the error:

      [ERROR] An exception has occurred in the compiler (1.6.0_31). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.

      [ERROR] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.hibernate.search.annotations.SpatialMode not found

       

       

      I am wondering how to add hibernate-search-4.2.0 jar file to the editor libraries or application container so that during its compile-time, it can find the file and also exclude the file from being packaged into the ear / jar file.

       

      Appreciate for any suggestion.

      Thanks

      sam

        • 1. Re: how to add hibernate-search-4.2.0.jar file to application container
          Sam W Expert

          I tried to add the excluded clause to the pom.xml file but I found the hibernate-search-4.2.0.jar file still present in my package list.

           

          Here is the my pom.xml file where I tried to exculde the jar file:

           

           

          <plugin>

                          <groupId>org.hibernate</groupId>

                          <artifactId>hibernate-search</artifactId>

                          <version>4.2.0.Final</version>

                          <configuration>

                             <modules>

                               <javaModule>

                                 <groupId>org.hibernate</groupId>

                                 <artifactId>hibernate-search</artifactId>

                                 <version>4.2.0.Final</version>

                                 <excluded>true</excluded>

                               </javaModule>

                            </modules>

                          </configuration>

                        </plugin>

           

          The hibernate jar files are still in the package:

           

           

          jar tf ForestSurf-ear-1.0.ear

          META-INF/

          META-INF/MANIFEST.MF

          lib/

          ForestSurf-ejb-1.0.jar

          ForestSurf-web-1.0.war

          lib/antlr-2.7.7.jar

          lib/aopalliance-1.0.jar

          lib/avro-1.6.3.jar

          lib/commons-codec-1.6.jar

          lib/commons-io-2.1.jar

          lib/commons-lang-2.6.jar

          lib/commons-logging-1.1.1.jar

          lib/dom4j-1.6.1.jar

          lib/guava-r05.jar

          lib/hibernate-commons-annotations-4.0.1.Final.jar

          lib/hibernate-core-4.1.9.Final.jar

          lib/hibernate-jpa-2.0-api-1.0.1.Final.jar

          lib/hibernate-search-4.2.0.Final.jar

          lib/hibernate-search-analyzers-4.2.0.Final.jar

          lib/hibernate-search-engine-4.2.0.Final.jar

          lib/hibernate-search-orm-4.2.0.Final.jar

           

          Any suggestion is very much appreciated.

          Thanks

          Sam

          • 2. Re: how to add hibernate-search-4.2.0.jar file to application container
            Nicklas Karlsson Master

            You might want to check the maven dependecy tree to see what is pulling it in and then exclude it there. Most probably some of the other hibernate stuff (which I think you shouldn't have there in the first place)

            • 3. Re: how to add hibernate-search-4.2.0.jar file to application container
              Sam W Expert

              if I don't put those hibernate there at all, my ear project can't get compiled.

              The following error in compile-time is caused by missing hibernate-search-4.2.0 in the pom.xml file.

               

              com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.hibernate.search.annotations.SpatialMode

              • 4. Re: how to add hibernate-search-4.2.0.jar file to application container
                Nicklas Karlsson Master

                maven dependencied scoped "provided" (or "compiled") should satisfy the compile-time deps without going into the target artifact

                • 5. Re: how to add hibernate-search-4.2.0.jar file to application container
                  Sam W Expert

                  Hi thank you for the suggestion.

                  I have added provided and compile cope to it, but it thrown the following exception when I tried to deploy the ear module:

                   

                   

                  16:45:19,970 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "ForestSurf-ear-1.1.ear"

                  16:45:21,283 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Starting deployment of "ForestSurf-web-1.0.war"

                  16:45:21,283 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ForestSurf-ejb-1.0.jar"

                  16:45:21,458 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for ForestSurfPU

                  16:45:21,666 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.subunit."ForestSurf-ear-1.1.ear"."ForestSurf-ejb-1.0.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ForestSurf-ear-1.1.ear"."ForestSurf-ejb-1.0.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "ForestSurf-ejb-1.0.jar" of deployment "ForestSurf-ear-1.1.ear"

                          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                          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]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_07]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_07]

                          at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

                  Caused by: java.lang.RuntimeException: Error getting reflective information for class ForestSurf.entity.facade.MyisamProductArticleFacade with ClassLoader ModuleClassLoader for Module "deployment.ForestSurf-ear-1.1.ear.ForestSurf-ejb-1.0.jar:main" from Service Module Loader

                          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                          at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

                          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)

                          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)

                          at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)

                          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                          ... 5 more

                  Caused by: java.lang.NoClassDefFoundError: org/hibernate/search/spatial/impl/DistanceSortField

                          at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_07]

                          at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [rt.jar:1.6.0_07]

                          at java.lang.Class.getDeclaredFields(Class.java:1743) [rt.jar:1.6.0_07]

                          at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                          at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                          ... 10 more

                  Caused by: java.lang.ClassNotFoundException: org.hibernate.search.spatial.impl.DistanceSortField from [Module "deployment.ForestSurf-ear-1.1.ear.ForestSurf-ejb-1.0.jar:main" from Service Module Loader]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

                          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) [rt.jar:1.6.0_07]

                   

                   

                  Here is the modules listed under jboss:

                   

                   

                  -rw-r--r--  1 jboss  jboss    81271 Jan 23 23:04 hibernate-commons-annotations-4.0.1.Final.jar

                  -rw-r--r--  1 jboss  jboss      487 Jan 23 23:16 hibernate-commons-annotations-4.0.1.Final.jar.index

                  -rw-r--r--  1 jboss  jboss  4507245 Jan 23 23:04 hibernate-core-4.1.9.Final.jar

                  -rw-r--r--  1 jboss  jboss     6159 Jan 23 23:16 hibernate-core-4.1.9.Final.jar.index

                  -rw-r--r--  1 jboss  jboss   479539 Jan 23 23:16 hibernate-entitymanager-4.1.9.Final.jar

                  -rw-r--r--  1 jboss  jboss      527 Jan 23 23:16 hibernate-entitymanager-4.1.9.Final.jar.index

                  -rw-r--r--  1 jboss  jboss    62411 Jan 23 23:16 hibernate-infinispan-4.1.9.Final.jar

                  -rw-r--r--  1 jboss  jboss      479 Jan 23 23:16 hibernate-infinispan-4.1.9.Final.jar.index

                  -rw-r--r--  1 jboss  jboss     2277 Jan 23 23:20 hibernate-search-4.2.0.Final.jar

                  -rw-r--r--  1 jboss  jboss      100 Jan 23 23:20 hibernate-search-4.2.0.Final.jar.index

                  -rw-r--r--  1 jboss  jboss     2290 Jan 24 16:00 module.xml

                   

                   

                  The pom.xml file:

                   

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

                      <modelVersion>4.0.0</modelVersion>

                      <parent>

                      <artifactId>ForestSurf</artifactId>

                      <groupId>ForestSurf</groupId>

                      <version>1.0</version>

                    </parent>

                   

                   

                      <groupId>ForestSurf</groupId>

                      <artifactId>ForestSurf-ejb</artifactId>

                      <version>1.0</version>

                      <packaging>ejb</packaging>

                   

                   

                      <name>ForestSurf-ejb</name>

                   

                   

                      <properties>

                          <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

                          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

                          <log4j.version>1.2.14</log4j.version>

                          <hibernate.version>4.1.7.Final</hibernate.version>

                          <org.springframework-version>3.0.7.RELEASE</org.springframework-version>

                      </properties>

                   

                   

                      <dependencies>

                          <dependency>

                              <groupId>org.hibernate</groupId>

                              <artifactId>hibernate-core</artifactId>

                              <version>4.1.9.Final</version>

                              <scope>provided</scope>

                          </dependency>

                          <dependency>

                              <groupId>org.hibernate</groupId>

                              <artifactId>hibernate-annotations</artifactId>

                              <version>3.5.6-Final</version>

                              <scope>provided</scope>

                          </dependency>

                          <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-infinispan</artifactId>

                                  <version>4.1.9.Final</version>

                                  <scope>provided</scope>

                          </dependency>

                          <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-entitymanager</artifactId>

                                  <version>4.1.9.Final</version>

                                  <scope>provided</scope>

                          </dependency>

                             

                          <dependency>

                              <groupId>org.hibernate</groupId>

                              <artifactId>hibernate-search</artifactId>

                              <version>4.2.0.Final</version>

                              <exclusions>

                                  <exclusion>

                                      <groupId>org.hibernate.common</groupId>

                                      <artifactId>hibernate-commons-annotations</artifactId>

                                  </exclusion>

                                  <exclusion>

                                      <groupId>org.hibernate</groupId>

                                      <artifactId>hibernate-core</artifactId>

                                  </exclusion>

                                  <exclusion>

                                      <groupId>org.hibernate.javax.persistence</groupId>

                                      <artifactId>hibernate-jpa-2.0-api</artifactId>

                                  </exclusion>

                                 

                   

                              </exclusions>

                          </dependency>

                          <dependency>

                              <groupId>org.hibernate</groupId>

                              <artifactId>hibernate-envers</artifactId>

                              <version>4.1.9.Final</version>

                              <scope>provided</scope>

                   

                   

                              <exclusions>

                                  <exclusion>

                                      <groupId>dom4j</groupId>

                                      <artifactId>dom4j</artifactId>

                                  </exclusion>

                              </exclusions>

                          </dependency>

                   

                   

                          <dependency>

                              <groupId>org.springframework</groupId>

                              <artifactId>spring-orm</artifactId>

                              <version>3.2.0.RELEASE</version>

                          </dependency>

                          <dependency>

                              <groupId>javax</groupId>

                              <artifactId>javaee-api</artifactId>

                              <version>6.0</version>

                              <scope>provided</scope>

                          </dependency>

                   

                   

                          <dependency>

                                  <groupId>org.apache.lucene</groupId>

                                  <artifactId>lucene-snowball</artifactId>

                                  <version>3.0.3</version>

                          </dependency>

                          <dependency>

                              <groupId>org.apache.lucene</groupId>

                              <artifactId>lucene-core</artifactId>

                              <version>4.0.0</version>

                          </dependency>

                         

                          <dependency>

                                  <groupId>org.apache.lucene</groupId>

                                  <artifactId>lucene-analyzers-common</artifactId>

                                  <version>4.0.0</version>

                          </dependency>

                   

                          <dependency>

                              <groupId>commons-lang</groupId>

                              <artifactId>commons-lang</artifactId>

                              <version>2.6</version>

                          </dependency>

                          <dependency>

                              <groupId>joda-time</groupId>

                              <artifactId>joda-time</artifactId>

                              <version>2.1</version>

                          </dependency>

                          <dependency>

                              <groupId>org.slf4j</groupId>

                              <artifactId>slf4j-log4j12</artifactId>

                              <version>1.7.2</version>

                              <type>jar</type>

                          </dependency>

                          <dependency>

                              <groupId>junit</groupId>

                              <artifactId>junit</artifactId>

                              <version>4.8.1</version>

                              <scope>test</scope>

                          </dependency>

                      </dependencies>

                   

                   

                      <build>

                          <plugins>

                              <plugin>

                                  <groupId>org.apache.maven.plugins</groupId>

                                  <artifactId>maven-compiler-plugin</artifactId>

                                  <version>2.3.2</version>

                                  <configuration>

                                      <source>1.6</source>

                                      <target>1.6</target>

                                      <compilerArguments>

                                          <endorseddirs>${endorsed.dir}</endorseddirs>

                                      </compilerArguments>

                                  </configuration>

                              </plugin>

                              <plugin>

                                  <groupId>org.apache.maven.plugins</groupId>

                                  <artifactId>maven-ejb-plugin</artifactId>

                                  <version>2.3</version>

                                  <configuration>

                                      <ejbVersion>3.1</ejbVersion>

                                  </configuration>

                              </plugin>

                              <plugin>

                                  <groupId>org.apache.maven.plugins</groupId>

                                  <artifactId>maven-dependency-plugin</artifactId>

                                  <version>2.1</version>

                                  <executions>

                                      <execution>

                                          <phase>validate</phase>

                                          <goals>

                                              <goal>copy</goal>

                                          </goals>

                                          <configuration>

                                              <outputDirectory>${endorsed.dir}</outputDirectory>

                                              <silent>true</silent>

                                              <artifactItems>

                                                  <artifactItem>

                                                      <groupId>javax</groupId>

                                                      <artifactId>javaee-endorsed-api</artifactId>

                                                      <version>6.0</version>

                                                      <type>jar</type>

                                                  </artifactItem>

                   

                                              </artifactItems>

                                          </configuration>

                                      </execution>

                                     

                                  </executions>

                              </plugin>

                          </plugins>

                      </build>

                   

                   

                  </project>

                   

                   

                  Here are the import files:

                   

                   

                  import java.util.List;

                  import java.util.logging.Level;

                  import javax.ejb.Local;

                  import javax.ejb.Stateless;

                  import javax.persistence.EntityManager;

                  import javax.persistence.EntityManagerFactory;

                  import javax.persistence.PersistenceContext;

                  import javax.persistence.PersistenceUnit;

                  import org.apache.commons.lang.StringUtils;

                  import org.apache.log4j.Logger;

                  import org.apache.lucene.search.Sort;

                  import org.hibernate.search.jpa.FullTextEntityManager;

                  import org.hibernate.search.query.dsl.QueryBuilder;

                  import org.hibernate.search.query.dsl.Unit;

                  import org.hibernate.search.spatial.impl.DistanceSortField;

                  import org.springframework.transaction.annotation.Transactional;

                   

                   

                  Thanks

                  Sam

                  • 6. Re: how to add hibernate-search-4.2.0.jar file to application container
                    Nicklas Karlsson Master

                    Well if the search jar is placed in the hibernate core main module and included as a resource in the module.xml and the application has either an explicit or implicit dependecy to that module then it should work(tm)

                    • 7. Re: how to add hibernate-search-4.2.0.jar file to application container
                      Sam W Expert

                      Hi I removed the hibernate-search-* jar files from hibernate core main module, and added hibernate-search dependencies in the pom.xml file.

                      And now it thrown the following exception:

                       

                       

                      ServiceImplService from class ForestSurf.product.service.articlepointform.ArticlePointFormService

                      22:45:52,810 INFO  [org.hibernate.search.Version] (MSC service thread 1-7) HSEARCH000034: Hibernate Search 4.2.0.Final

                      22:45:52,825 WARN  [org.jboss.modules] (MSC service thread 1-7) Failed to define class org.hibernate.search.util.impl.DelegateNamedAnalyzer in Module "deployment.ForestSurf-ear-1.0.ear:main" from Service Module Loader: java.lang.VerifyError: class org.hibernate.search.util.impl.DelegateNamedAnalyzer overrides final method tokenStream.(Ljava/lang/String;Ljava/io/Reader;)Lorg/apache/lucene/analysis/TokenStream;

                              at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_07]

                              at java.lang.ClassLoader.defineClass(ClassLoader.java:620) [rt.jar:1.6.0_07]

                              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) [rt.jar:1.6.0_07]

                              at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

                              at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

                              at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

                              at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

                              at org.jboss.modules.Module.loadModuleClass(Module.java:517)

                              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

                              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]

                              at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:365) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                              at org.hibernate.search.spi.SearchFactoryBuilder.buildNewSearchFactory(SearchFactoryBuilder.java:222) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                              at org.hibernate.search.spi.SearchFactoryBuilder.buildSearchFactory(SearchFactoryBuilder.java:146) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]

                              at org.hibernate.search.event.impl.FullTextIndexEventListener.initialize(FullTextIndexEventListener.java:130) [hibernate-search-orm-4.2.0.Final.jar:4.2.0.Final]

                              at org.hibernate.search.hcore.impl.HibernateSearchIntegrator.integrate(HibernateSearchIntegrator.java:83) [hibernate-search-orm-4.2.0.Final.jar:4.2.0.Final]

                              at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]

                              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750) [hibernate-core-4.1.9.Final.jar:4.1.9.Final]

                              at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]

                              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]

                              at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [hibernate-entitymanager-4.1.9.Final.jar:4.1.9.Final]

                              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_07]

                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_07]

                              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

                       

                       

                      22:45:52,833 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.persistenceunit."ForestSurf-ear-1.0.ear/ForestSurf-ejb-1.0.jar#ForestSurfPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."ForestSurf-ear-1.0.ear/ForestSurf-ejb-1.0.jar#ForestSurfPU": Failed to start service

                              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_07]

                              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_07]

                              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.ForestSurf-ear-1.0.ear:main" from Service Module Loader]

                              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]

                              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]

                       

                       

                      Here is my pom.xml file:

                       

                       

                      <?xml version="1.0" encoding="UTF-8"?>

                      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

                          <modelVersion>4.0.0</modelVersion>

                          <parent>

                          <artifactId>ForestSurf</artifactId>

                          <groupId>ForestSurf</groupId>

                          <version>1.0</version>

                        </parent>

                       

                       

                          <groupId>ForestSurf</groupId>

                          <artifactId>ForestSurf-ejb</artifactId>

                          <version>1.0</version>

                          <packaging>ejb</packaging>

                       

                       

                          <name>ForestSurf-ejb</name>

                       

                       

                          <properties>

                              <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

                              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

                              <log4j.version>1.2.14</log4j.version>

                              <hibernate.version>4.1.7.Final</hibernate.version>

                              <org.springframework-version>3.0.7.RELEASE</org.springframework-version>

                          </properties>

                       

                       

                          <dependencies>

                              <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-core</artifactId>

                                  <version>4.1.9.Final</version>

                                  <scope>provided</scope>

                              </dependency>

                              <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-annotations</artifactId>

                                  <version>3.5.6-Final</version>

                                  <scope>provided</scope>

                              </dependency>

                              <dependency>

                                      <groupId>org.hibernate</groupId>

                                      <artifactId>hibernate-infinispan</artifactId>

                                      <version>4.1.9.Final</version>

                                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                      <groupId>org.hibernate</groupId>

                                      <artifactId>hibernate-entitymanager</artifactId>

                                      <version>4.1.9.Final</version>

                                      <scope>provided</scope>

                              </dependency>

                              <dependency>

                                      <groupId>org.hibernate.javax.persistence</groupId>

                                      <artifactId>hibernate-jpa-2.0-api</artifactId>

                                      <version>1.0.1.Final</version>

                                      <scope>provided</scope>

                              </dependency>

                                     

                              <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-search</artifactId>

                                  <version>4.2.0.Final</version>

                              </dependency>

                       

                       

                              <dependency>

                                      <groupId>org.hibernate</groupId>

                                      <artifactId>hibernate-search-orm</artifactId>

                                      <version>4.2.0.Final</version>

                              </dependency>

                              <dependency>

                                  <groupId>org.hibernate</groupId>

                                  <artifactId>hibernate-envers</artifactId>

                                  <version>4.1.9.Final</version>

                                  <scope>provided</scope>

                       

                       

                                  <exclusions>

                                      <exclusion>

                                          <groupId>dom4j</groupId>

                                          <artifactId>dom4j</artifactId>

                                      </exclusion>

                                  </exclusions>

                              </dependency>

                       

                       

                              <dependency>

                                  <groupId>org.springframework</groupId>

                                  <artifactId>spring-orm</artifactId>

                                  <version>3.2.0.RELEASE</version>

                              </dependency>

                              <dependency>

                                  <groupId>javax</groupId>

                                  <artifactId>javaee-api</artifactId>

                                  <version>6.0</version>

                                  <scope>provided</scope>

                              </dependency>

                       

                       

                              <dependency>

                                      <groupId>org.apache.lucene</groupId>

                                      <artifactId>lucene-snowball</artifactId>

                                      <version>3.0.3</version>

                              </dependency>

                              <dependency>

                                  <groupId>org.apache.lucene</groupId>

                                  <artifactId>lucene-core</artifactId>

                                  <version>4.0.0</version>

                              </dependency>

                             

                              <dependency>

                                      <groupId>org.apache.lucene</groupId>

                                      <artifactId>lucene-analyzers-common</artifactId>

                                      <version>4.0.0</version>

                              </dependency>

                             

                              <dependency>

                                  <groupId>commons-lang</groupId>

                                  <artifactId>commons-lang</artifactId>

                                  <version>2.6</version>

                              </dependency>

                              <dependency>

                                  <groupId>joda-time</groupId>

                                  <artifactId>joda-time</artifactId>

                                  <version>2.1</version>

                              </dependency>

                              <dependency>

                                  <groupId>org.slf4j</groupId>

                                  <artifactId>slf4j-log4j12</artifactId>

                                  <version>1.7.2</version>

                                  <type>jar</type>

                              </dependency>

                              <dependency>

                                  <groupId>junit</groupId>

                                  <artifactId>junit</artifactId>

                                  <version>4.8.1</version>

                                  <scope>test</scope>

                              </dependency>

                          </dependencies>

                       

                       

                          <build>

                              <plugins>

                                  <plugin>

                                      <groupId>org.apache.maven.plugins</groupId>

                                      <artifactId>maven-compiler-plugin</artifactId>

                                      <version>2.3.2</version>

                                      <configuration>

                                          <source>1.6</source>

                                          <target>1.6</target>

                                          <compilerArguments>

                                              <endorseddirs>${endorsed.dir}</endorseddirs>

                                          </compilerArguments>

                                      </configuration>

                                  </plugin>

                                  <plugin>

                                      <groupId>org.apache.maven.plugins</groupId>

                                      <artifactId>maven-ejb-plugin</artifactId>

                                      <version>2.3</version>

                                      <configuration>

                                          <ejbVersion>3.1</ejbVersion>

                                      </configuration>

                                  </plugin>

                                  <plugin>

                                      <groupId>org.apache.maven.plugins</groupId>

                                      <artifactId>maven-dependency-plugin</artifactId>

                                      <version>2.1</version>

                                      <executions>

                                          <execution>

                                              <phase>validate</phase>

                                              <goals>

                                                  <goal>copy</goal>

                                              </goals>

                                              <configuration>

                                                  <outputDirectory>${endorsed.dir}</outputDirectory>

                                                  <silent>true</silent>

                                                  <artifactItems>

                                                      <artifactItem>

                                                          <groupId>javax</groupId>

                                                          <artifactId>javaee-endorsed-api</artifactId>

                                                          <version>6.0</version>

                                                          <type>jar</type>

                                                      </artifactItem>

                      <!--                                <artifactItem>

                                                          <groupId>org.hibernate</groupId>

                                                          <artifactId>hibernate-search</artifactId>

                                                          <version>4.2.0.Final</version>

                                                          <type>jar</type>

                                                      </artifactItem>-->

                                                  </artifactItems>

                                              </configuration>

                                          </execution>

                                         

                                      </executions>

                                  </plugin>

                              </plugins>

                          </build>

                       

                       

                      </project>

                       

                       

                       

                      files in hibernate/modules:

                       

                       

                      -rw-r--r--  1 jboss  jboss    81271 Jan 23 23:04 hibernate-commons-annotations-4.0.1.Final.jar

                      -rw-r--r--  1 jboss  jboss      487 Jan 23 23:16 hibernate-commons-annotations-4.0.1.Final.jar.index

                      -rw-r--r--  1 jboss  jboss  4507245 Jan 23 23:04 hibernate-core-4.1.9.Final.jar

                      -rw-r--r--  1 jboss  jboss     6159 Jan 23 23:16 hibernate-core-4.1.9.Final.jar.index

                      -rw-r--r--  1 jboss  jboss   479539 Jan 23 23:16 hibernate-entitymanager-4.1.9.Final.jar

                      -rw-r--r--  1 jboss  jboss      527 Jan 23 23:16 hibernate-entitymanager-4.1.9.Final.jar.index

                      -rw-r--r--  1 jboss  jboss    62411 Jan 23 23:16 hibernate-infinispan-4.1.9.Final.jar

                      -rw-r--r--  1 jboss  jboss      479 Jan 23 23:16 hibernate-infinispan-4.1.9.Final.jar.index

                      -rw-r--r--  1 jboss  jboss   102661 Jan 24 20:46 hibernate-jpa-2.0-api-1.0.1.Final.jar

                      -rw-r--r--  1 jboss  jboss      242 Jan 24 20:48 hibernate-jpa-2.0-api-1.0.1.Final.jar.index

                      -rw-r--r--  1 jboss  jboss     2295 Jan 24 21:32 module.xml

                       

                       

                       

                      Any suggestion is very appreciated.

                      Thanks

                      sam

                      • 8. Re: how to add hibernate-search-4.2.0.jar file to application container
                        Sam W Expert

                        I am still stuck with setting up hibernate-search-4.2.0 in my ejb module.

                         

                        I am getting the following very strange exception when I deployed my ejb module:

                         

                         

                        Caused by: java.lang.ClassNotFoundException: org.hibernate.search.util.impl.DelegateNamedAnalyzer from [Module "deployment.ForestSurf-ear-1.0.ear:main" from Service Module Loader]

                         

                         

                        I searched around and found that the DelegateNamedAnalyzer is ONLY available in hibernate-search-engine-4.2.0.Final.jar.

                        Why hibernate-search-4.2.0 invoke DelegateNamedAnalyzer while this class is inclued in hibernate-search-engine-4.2.0?

                        I tried to include hibernate-search-engine-4.2.0 in the pom.xml in my project, but it ended up with other "class not found" exception as shown below during compile time:

                         

                         

                        import org.hibernate.search.annotations.Latitude;

                        import org.hibernate.search.annotations.Longitude;

                        import org.hibernate.search.annotations.Parameter;

                        import org.hibernate.search.annotations.Resolution;

                        import org.hibernate.search.annotations.Spatial;

                         

                         

                        The Latitude, LOngitude Spatial classes are not found when I include hibernate-sesarch-engine-4.2.0 in the build.

                         

                         

                        Can anyone please point me in the right direction how to setup my pom.xml file, so that it include the DelegateNamedAnalyzer class, Longitude, Latutde and Spatial class in the build?

                         

                         

                        Here is my pom.xml file:

                         

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                        <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

                            <modelVersion>4.0.0</modelVersion>

                            <parent>

                            <artifactId>ForestSurf</artifactId>

                            <groupId>ForestSurf</groupId>

                            <version>1.0</version>

                          </parent>

                         

                         

                            <groupId>ForestSurf</groupId>

                            <artifactId>ForestSurf-ejb</artifactId>

                            <version>1.0</version>

                            <packaging>ejb</packaging>

                         

                         

                            <name>ForestSurf-ejb</name>

                         

                         

                            <properties>

                                <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>

                                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

                                <log4j.version>1.2.14</log4j.version>

                                <hibernate.version>4.1.7.Final</hibernate.version>

                                <org.springframework-version>3.0.7.RELEASE</org.springframework-version>

                            </properties>

                         

                         

                            <dependencies>

                                <dependency>

                                    <groupId>org.hibernate</groupId>

                                    <artifactId>hibernate-core</artifactId>

                                    <version>4.1.9.Final</version>

                                    <scope>provided</scope>

                                </dependency>

                                <dependency>

                                    <groupId>org.hibernate</groupId>

                                    <artifactId>hibernate-annotations</artifactId>

                                    <version>3.5.6-Final</version>

                                    <scope>provided</scope>

                                </dependency>

                                <dependency>

                                        <groupId>org.hibernate</groupId>

                                        <artifactId>hibernate-infinispan</artifactId>

                                        <version>4.1.9.Final</version>

                                        <scope>provided</scope>

                                </dependency>

                                <dependency>

                                        <groupId>org.hibernate</groupId>

                                        <artifactId>hibernate-entitymanager</artifactId>

                                        <version>4.1.9.Final</version>

                                        <scope>provided</scope>

                                </dependency>

                                <dependency>

                                        <groupId>org.hibernate.javax.persistence</groupId>

                                        <artifactId>hibernate-jpa-2.0-api</artifactId>

                                        <version>1.0.1.Final</version>

                                        <scope>provided</scope>

                                </dependency>

                                       

                                <dependency>

                                    <groupId>org.hibernate</groupId>

                                    <artifactId>hibernate-search</artifactId>

                                    <version>4.2.0.Final</version>

                                </dependency>

                         

                         

                                <dependency>

                                        <groupId>org.hibernate</groupId>

                                        <artifactId>hibernate-search-orm</artifactId>

                                        <version>4.2.0.Final</version>

                                </dependency>

                                <dependency>

                                    <groupId>org.hibernate</groupId>

                                    <artifactId>hibernate-envers</artifactId>

                                    <version>4.1.9.Final</version>

                                    <scope>provided</scope>

                         

                         

                                    <exclusions>

                                        <exclusion>

                                            <groupId>dom4j</groupId>

                                            <artifactId>dom4j</artifactId>

                                        </exclusion>

                                    </exclusions>

                                </dependency>

                         

                         

                                <dependency>

                                    <groupId>org.springframework</groupId>

                                    <artifactId>spring-orm</artifactId>

                                    <version>3.2.0.RELEASE</version>

                                </dependency>

                                <dependency>

                                    <groupId>javax</groupId>

                                    <artifactId>javaee-api</artifactId>

                                    <version>6.0</version>

                                    <scope>provided</scope>

                                </dependency>

                         

                         

                                <dependency>

                                        <groupId>org.apache.lucene</groupId>

                                        <artifactId>lucene-snowball</artifactId>

                                        <version>3.0.3</version>

                                </dependency>

                                <dependency>

                                    <groupId>org.apache.lucene</groupId>

                                    <artifactId>lucene-core</artifactId>

                                    <version>4.0.0</version>

                                </dependency>

                               

                                <dependency>

                                        <groupId>org.apache.lucene</groupId>

                                        <artifactId>lucene-analyzers-common</artifactId>

                                        <version>4.0.0</version>

                                </dependency>

                               

                                <dependency>

                                    <groupId>commons-lang</groupId>

                                    <artifactId>commons-lang</artifactId>

                                    <version>2.6</version>

                                </dependency>

                                <dependency>

                                    <groupId>joda-time</groupId>

                                    <artifactId>joda-time</artifactId>

                                    <version>2.1</version>

                                </dependency>

                                <dependency>

                                    <groupId>org.slf4j</groupId>

                                    <artifactId>slf4j-log4j12</artifactId>

                                    <version>1.7.2</version>

                                    <type>jar</type>

                                </dependency>

                                <dependency>

                                    <groupId>junit</groupId>

                                    <artifactId>junit</artifactId>

                                    <version>4.8.1</version>

                                    <scope>test</scope>

                                </dependency>

                            </dependencies>

                         

                         

                            <build>

                                <plugins>

                                    <plugin>

                                        <groupId>org.apache.maven.plugins</groupId>

                                        <artifactId>maven-compiler-plugin</artifactId>

                                        <version>2.3.2</version>

                                        <configuration>

                                            <source>1.6</source>

                                            <target>1.6</target>

                                            <compilerArguments>

                                                <endorseddirs>${endorsed.dir}</endorseddirs>

                                            </compilerArguments>

                                        </configuration>

                                    </plugin>

                                    <plugin>

                                        <groupId>org.apache.maven.plugins</groupId>

                                        <artifactId>maven-ejb-plugin</artifactId>

                                        <version>2.3</version>

                                        <configuration>

                                            <ejbVersion>3.1</ejbVersion>

                                        </configuration>

                                    </plugin>

                                    <plugin>

                                        <groupId>org.apache.maven.plugins</groupId>

                                        <artifactId>maven-dependency-plugin</artifactId>

                                        <version>2.1</version>

                                        <executions>

                                            <execution>

                                                <phase>validate</phase>

                                                <goals>

                                                    <goal>copy</goal>

                                                </goals>

                                                <configuration>

                                                    <outputDirectory>${endorsed.dir}</outputDirectory>

                                                    <silent>true</silent>

                                                    <artifactItems>

                                                        <artifactItem>

                                                            <groupId>javax</groupId>

                                                            <artifactId>javaee-endorsed-api</artifactId>

                                                            <version>6.0</version>

                                                            <type>jar</type>

                                                        </artifactItem>

                        <!--                                <artifactItem>

                                                            <groupId>org.hibernate</groupId>

                                                            <artifactId>hibernate-search</artifactId>

                                                            <version>4.2.0.Final</version>

                                                            <type>jar</type>

                                                        </artifactItem>-->

                                                    </artifactItems>

                                                </configuration>

                                            </execution>

                                           

                                        </executions>

                                    </plugin>

                                </plugins>

                            </build>

                         

                         

                        </project>

                         

                         

                        Thanks

                        Sam

                        • 9. Re: how to add hibernate-search-4.2.0.jar file to application container
                          Sam W Expert

                          I have created a test project for reproducing this problem.

                          Can anyone please tell me how to uploade my sample project here? I can't find an upload file link in the post editor.

                           

                          Database schema is shown as below:

                           

                           

                          [quote]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;[/quote]

                           

                           

                           

                           

                          DataSource configuration:

                           

                           

                          [quote]<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>

                          [/quote]

                          • 10. Re: how to add hibernate-search-4.2.0.jar file to application container
                            Nicklas Karlsson Master

                            Use the advanced editor (upper right hand corner in normal editor)

                             

                            Easier would be if you made the tables auto-create against the ExampleDS.

                            • 11. Re: how to add hibernate-search-4.2.0.jar file to application container
                              Sam W Expert

                              Now I am having the following error:

                               

                               

                              20:43:51,272 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-5) Creating Service {http://myisamproductarticle.service.product.ForestSurf/}MyisamProductArticleServiceImplService from class ForestSurf.product.service.myisamproductarticle.MyisamProductArticleService

                              20:43:51,276 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-2) HHH000397: Using ASTQueryTranslatorFactory

                              20:43:51,344 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-5) Setting the server's publish address to be http://localhost:8080/ForestSurf-web/MyisamProductArticleServices

                              20:43:51,358 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-5) WSDL published to: file:/usr/local/users/jboss/jboss711Final/standalone/data/wsdl/ForestSurf-ear-1.0.ear/ForestSurf-web-1.0.war/MyisamProductArticleServiceImplService.wsdl

                              20:43:51,359 INFO  [org.hibernate.search.Version] (MSC service thread 1-2) HSEARCH000034: Hibernate Search 4.2.0.Final

                              20:43:51,360 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-5) Creating Service {http://product.service.product.ForestSurf/}ProductServiceImplService from class ForestSurf.product.service.product.ProductService

                              20:43:51,520 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-5) Setting the server's publish address to be http://localhost:8080/ForestSurf-web/ProductServices

                              20:43:51,525 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.persistenceunit."ForestSurf-ear-1.0.ear/ForestSurf-ejb-1.0.jar#ForestSurfPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."ForestSurf-ear-1.0.ear/ForestSurf-ejb-1.0.jar#ForestSurfPU": Failed to start service

                                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) [rt.jar:1.6.0_07]

                                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) [rt.jar:1.6.0_07]

                                      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_07]

                              Caused by: org.hibernate.search.SearchException: HSEARCH000159: Cannot find a Coordinates Interface nor Lat/Long annotations bound to default @Spatial for class ForestSurf.entity.MyisamProductArticle

                                      at org.hibernate.search.engine.spi.AbstractDocumentBuilder.bindSpatialAnnotation(AbstractDocumentBuilder.java:1038)

                                      at org.hibernate.search.engine.spi.AbstractDocumentBuilder.initializeClassLevelAnnotations(AbstractDocumentBuilder.java:462)

                                      at org.hibernate.search.engine.spi.AbstractDocumentBuilder.initializeClass(AbstractDocumentBuilder.java:376)

                                      at org.hibernate.search.engine.spi.AbstractDocumentBuilder.<init>(AbstractDocumentBuilder.java:174)

                                      at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.<init>(DocumentBuilderIndexedEntity.java:179)

                                      at org.hibernate.search.spi.SearchFactoryBuilder.initDocumentBuilders(SearchFactoryBuilder.java:422)

                                      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]

                               

                               

                              Entity class is annotated as:

                               

                               

                              @Column(name = "lat")

                                  @Latitude(of="location")

                                  private Double lat;

                                 

                                  @Column(name = "lon")

                                  @Longitude(of="location")

                                  private Double lon;

                               

                               

                              What other potentional error in my project configuration?
                              Thanks

                              Sam

                              • 12. Re: how to add hibernate-search-4.2.0.jar file to application container
                                Nicklas Karlsson Master

                                Is it possible that HS is looking for the annotations on the accessors (getters/setters)?

                                • 13. Re: how to add hibernate-search-4.2.0.jar file to application container
                                  Sam W Expert

                                  Hi Nick,

                                  Thank you for your suggestion.

                                  I just tried it, it is illegal.

                                  I 'd rather think there is missing configuration. But I don't know where it gone wrong.

                                  Thanks

                                  Sam