4 Replies Latest reply on Jan 12, 2013 5:16 AM by samwun9988

    .ClassNotFoundException: org.hibernate.search.reader.impl.CacheableMultiReader

    samwun9988

      HI, with jboss 7.1.1.Final and Hibernate-core 4.1.4.Final, Hibernate-search 4.1.1.Final, and lucene-core 3.6.0, my ejb module thrown the following exception:

       

       

      Caused by: java.lang.RuntimeException: javax.ejb.EJBException: Unexpected Error

              at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:81) [classes:]

              ... 39 more

      Caused by: javax.ejb.EJBException: Unexpected Error

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:163) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at ForestSurf.entity.facade.MyisamProductArticleFacadeLocal$$$view190.search(Unknown Source) [ForestSurf-ejb-1.0.jar:]

              at ForestSurf.product.service.myisamproductarticle.MyisamProductArticleServiceImpl.search(MyisamProductArticleServiceImpl.java:79) [classes:]

              ... 39 more

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/search/reader/impl/CacheableMultiReader

              at org.hibernate.search.query.engine.impl.HSQueryImpl.buildSearcher(HSQueryImpl.java:596) [hibernate-search-engine-4.1.1.Final.jar:4.1.1.Final]

              at org.hibernate.search.query.engine.impl.HSQueryImpl.buildSearcher(HSQueryImpl.java:495) [hibernate-search-engine-4.1.1.Final.jar:4.1.1.Final]

              at org.hibernate.search.query.engine.impl.HSQueryImpl.queryEntityInfos(HSQueryImpl.java:239) [hibernate-search-engine-4.1.1.Final.jar:4.1.1.Final]

              at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:209) [hibernate-search-orm-4.1.1.Final.jar:4.1.1.Final]

              at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:147) [hibernate-search-orm-4.1.1.Final.jar:4.1.1.Final]

              at ForestSurf.entity.facade.MyisamProductArticleFacade.search(MyisamProductArticleFacade.java:122) [ForestSurf-ejb-1.0.jar:]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_07]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_07]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_07]

              at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_07]

              at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

              at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

              ... 60 more

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

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

       

       

      This is the pom.xml file:

       

       

      <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate-envers</artifactId>

                  <version>${hibernate.version}</version>

       

       

                  <exclusions>

                      <exclusion>

                          <groupId>dom4j</groupId>

                          <artifactId>dom4j</artifactId>

                      </exclusion>

                  </exclusions>

              </dependency>

             

              <dependency>

                  <groupId>org.hibernate</groupId>

                  <artifactId>hibernate-entitymanager</artifactId>

                  <version>${hibernate.version}</version>

                  <type>jar</type>

       

       

              </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-analyzers</artifactId>

                      <version>4.0.0</version>

              </dependency>

                 

              <dependency>

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

                  <artifactId>lucene-core</artifactId>

                  <version>4.0.0</version>

              </dependency>

              <dependency>

                      <groupId>org.hibernate</groupId>

                      <artifactId>hibernate-search</artifactId>

                      <version>4.1.1.Final</version>

              </dependency>

              <dependency>

                      <groupId>org.hibernate</groupId>

                      <artifactId>hibernate-search-engine</artifactId>

                      <version>4.1.1.Final</version>

              </dependency>

       

       

      Any suggestion is very appreciated.

      Thanks

      Sam

        • 1. Re: .ClassNotFoundException: org.hibernate.search.reader.impl.CacheableMultiReader
          smarlow

          Show us the contents of your deployment.ForestSurf-ear-1.0.ear (jar tf deployment.ForestSurf-ear-1.0.ear). 

          • 2. Re: .ClassNotFoundException: org.hibernate.search.reader.impl.CacheableMultiReader
            samwun9988

            Thank you for the quick response.

            Here is the contect of the ear file:

             

             

            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.5.1.jar

            lib/commons-codec-1.5.jar

            lib/commons-io-1.4.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-annotations-3.5.6-Final.jar

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

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

            lib/hibernate-core-4.1.4.Final.jar

            lib/hibernate-entitymanager-4.1.7.Final.jar

            lib/hibernate-envers-4.1.7.Final.jar

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

            lib/hibernate-search-4.1.1.Final.jar

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

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

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

            lib/jackson-core-asl-1.7.3.jar

            lib/jackson-mapper-asl-1.7.3.jar

            lib/javassist-3.15.0-GA.jar

            lib/jboss-logging-3.1.0.GA.jar

            lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar

            lib/joda-time-2.0.jar

            lib/log4j-1.2.14.jar

            lib/lucene-analyzers-3.5.0.jar

            lib/lucene-core-3.6.0.jar

            lib/lucene-grouping-3.5.0.jar

            lib/lucene-highlighter-3.5.0.jar

            lib/lucene-memory-3.5.0.jar

            lib/lucene-misc-3.5.0.jar

            lib/lucene-smartcn-3.5.0.jar

            lib/lucene-snowball-3.0.3.jar

            lib/lucene-spatial-3.5.0.jar

            lib/lucene-spellchecker-3.5.0.jar

            lib/lucene-stempel-3.5.0.jar

            lib/paranamer-2.3.jar

            lib/slf4j-api-1.5.8.jar

            lib/slf4j-log4j12-1.5.8.jar

            lib/snappy-java-1.0.1-rc3.jar

            lib/solr-analysis-extras-3.5.0.jar

            lib/solr-commons-csv-3.5.0.jar

            lib/solr-core-3.5.0.jar

            lib/solr-solrj-3.5.0.jar

            lib/spring-aop-3.0.7.RELEASE.jar

            lib/spring-asm-3.0.7.RELEASE.jar

            lib/spring-beans-3.0.7.RELEASE.jar

            lib/spring-context-3.0.7.RELEASE.jar

            lib/spring-core-3.0.7.RELEASE.jar

            lib/spring-expression-3.0.7.RELEASE.jar

            lib/spring-jdbc-3.0.7.RELEASE.jar

            lib/spring-orm-3.0.7.RELEASE.jar

            lib/spring-tx-3.0.7.RELEASE.jar

            META-INF/application.xml

            META-INF/jboss-app.xml

            META-INF/maven/

            META-INF/maven/ForestSurf/

            META-INF/maven/ForestSurf/ForestSurf-ear/

            META-INF/maven/ForestSurf/ForestSurf-ear/pom.xml

            META-INF/maven/ForestSurf/ForestSurf-ear/pom.properties

             

             

            Thanks

            Sam

            • 3. Re: .ClassNotFoundException: org.hibernate.search.reader.impl.CacheableMultiReader
              samwun9988

              I think this is the causes of the exception:

               

               

              log/server.log:18:19:18,797 WARN  [org.jboss.modules] (http--192.168.1.20-8080-7) Failed to define class org.hibernate.search.reader.impl.CacheableMultiReader in Module "deployment.ForestSurf-ear-1.0.ear:main" from Service Module Loader: java.lang.VerifyError: class org.hibernate.search.reader.impl.CacheableMultiReader overrides final method incRef.()V

               

              But why?

              Sam

              • 4. Re: .ClassNotFoundException: org.hibernate.search.reader.impl.CacheableMultiReader
                samwun9988

                I found lucene 3.6 is buggy. AFter reverted back to 3.5.0, the exception is gone.