7 Replies Latest reply on May 24, 2013 3:37 AM by Patrick Andreas Näf

    ModuleLoadError: org.apache.lucene:main

    Patrick Andreas Näf Newbie

      Hello

       

      I upgraded from jboss-7.1.1 with modeshape 3.1 and primefaces 3.5.4  to eap 6.1 with modeshape 3.2.0 with primefaces 3.5.4.

       

      I then tried to upload some files and insert them into the jcr. Then I got the following error (see dump.txt for details):

       

      WARN  [org.jboss.modules] (http-localhost/127.0.0.1:8080-1) Failed to define class org.apache.commons.io.output.DeferredFileOutputStream in Module "org.apache.solr:3.6.2" from local module loader @2a56ac (finder: local module finder @1a03d77 (roots: C:\JavaProgramme\jboss-eap-6.1\modules,C:\JavaProgramme\jboss-eap-6.1\modules\system\layers\base)): org.jboss.modules.ModuleLoadError: org.apache.lucene:main

       

      and

       

      ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/WebShop].[Faces Servlet]] (http-localhost/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet Faces Servlet threw exception: javax.enterprise.event.ObserverException

       

       

      I removed as much overhead as I could. As far as I know it is not related to modeshape itself.

      The error persists, if I take the standalone.xml from the eap 6.1 - zip and only add the mysql - datasource. I also remove as much overhead from the xhtml - file.

      See the attachements for details.

       

      Hope someone can help?

       

      Best Regards

       

      Patrick

        • 1. Re: ModuleLoadError: org.apache.lucene:main
          Nicklas Karlsson Master

          How is the org.apache.lucene module defined?

          • 2. Re: ModuleLoadError: org.apache.lucene:main
            jaikiran pai Master
            20:03:22,276 WARN  [org.jboss.modules] (http-localhost/127.0.0.1:8080-1) Failed to define class org.apache.commons.io.output.DeferredFileOutputStream in Module "org.apache.solr:3.6.2" from local module loader @2a56ac (finder: local module finder @1a03d77 (roots: C:\JavaProgramme\jboss-eap-6.1\modules,C:\JavaProgramme\jboss-eap-6.1\modules\system\layers\base)): org.jboss.modules.ModuleLoadError: org.apache.lucene:main 
                at org.jboss.modules.ModuleLoadException.toError(ModuleLoadException.java:78) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.Module.getPathsUnchecked(Module.java:1290) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.Module.loadModuleClass(Module.java:521) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_17] 
                at java.lang.ClassLoader.defineClass(Unknown Source) [rt.jar:1.7.0_17] 
                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:422) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:75) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.Module.loadModuleClass(Module.java:526) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:188) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:444) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:432) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:374) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:119) [jboss-modules.jar:1.2.0.Final-redhat-1] 
                at org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(DiskFileItemFactory.java:195) [commons-fileupload-1.3.jar:1.3]
            

             

             

            This looks more like a ModeShape thing than EAP 6.1 issue. Apparently ModeShape ships this module.xml https://github.com/ModeShape/modeshape/blob/master/deploy/jbossas/kit/jboss-eap61/org/apache/solr/3.6.2/module.xml#L38 which has a dependency on

             

            <dependencies>
                    <module name="org.apache.lucene" slot="3.6.2"/>
            

             

            But I don't see a org.apache.lucene module around. Are you sure it's there?

            • 3. Re: ModuleLoadError: org.apache.lucene:main
              Patrick Andreas Näf Newbie

              Thank you very much for your answers.

               

              I downloaded eap6.1, added modeshape from that download:

              http://downloads.jboss.org/modeshape/3.2.0.Final/modeshape-3.2.0.Final-jbosseap-61-dist.zip

              Then I only added a mysql-datasource too.

               

              In the modeshape distro (link) is a lucene - module. I copied that.

               

              The module is defined as follows:

              module slot="3.6.2" name="org.apache.lucene" xmlns="urn:jboss:module:1.1">-<resources><resource-root path="lucene-core-3.6.2.jar"/><resource-root path="lucene-core-3.6.2.jar"/><resource-root path="lucene-analyzers-3.6.2.jar"/><resource-root path="lucene-highlighter-3.6.2.jar"/><resource-root path="lucene-memory-3.6.2.jar"/><resource-root path="lucene-kuromoji-3.6.2.jar"/><resource-root path="lucene-misc-3.6.2.jar"/><resource-root path="lucene-phonetic-3.6.2.jar"/><resource-root path="lucene-spatial-3.6.2.jar"/><resource-root path="lucene-spellchecker-3.6.2.jar"/><resource-root path="lucene-grouping-3.6.2.jar"/><resource-root path="lucene-smartcn-3.6.2.jar"/><resource-root path="lucene-stempel-3.6.2.jar"/><resource-root path="lucene-facet-3.6.2.jar"/><resource-root path="lucene-regex-3.0.3.jar"/><resource-root path="jakarta-regexp-1.4.jar"/></resources>-<dependencies><module name="javax.api" optional="true"/></dependencies></module>

               

              mayb there is something wrong?

               

              Thank you very much for your help

              • 4. Re: ModuleLoadError: org.apache.lucene:main
                jaikiran pai Master

                The ModeShape distribution has a bug. The org.apache.solr module xml looks like this:

                 

                <module xmlns="urn:jboss:module:1.2" name="org.apache.solr" slot="3.6.2">
                    <resources>
                        <resource-root path="solr-analysis-extras-3.6.2.jar" />
                        <resource-root path="solr-core-3.6.2.jar" />
                        <resource-root path="solr-solrj-3.6.2.jar" />
                        <resource-root path="guava-r05.jar" />
                        <!--//TODO author=Horia Chiorean date=4/10/13 description=https://issues.jboss.org/browse/MODE-1895-->
                        <resource-root path="commons-io-1.4.jar" />
                        <resource-root path="commons-codec-1.5.jar" />
                        <resource-root path="commons-lang-2.6.jar" />
                    </resources>
                    <dependencies>
                        <module name="org.apache.lucene" />
                        <module name="org.jboss.logging" />
                    </dependencies>
                </module>
                
                

                 

                Notice that the dependency on org.apache.lucene, in that above content, doesn't specify the slot, which means JBoss Modules will look for the "main" slot for the org.apache.lucene module. However, the ModeShape distribution just ships a "3.6.2" slot for org.apache.lucene. One way to fix this is to update the above module.xml to:

                 

                <module name="org.apache.lucene"  slot="3.6.2"/>
                
                • 5. Re: ModuleLoadError: org.apache.lucene:main
                  jaikiran pai Master

                  I've now moved this thread to ModeShape forum so that the ModeShape dev team can help you with this and take a look at the issue.

                  • 6. Re: ModuleLoadError: org.apache.lucene:main
                    Horia Chiorean Master

                    Thanks. It has already been fixed upstream and will be available in 3.3

                    • 7. Re: ModuleLoadError: org.apache.lucene:main
                      Patrick Andreas Näf Newbie

                      Thank you very much. Now everything works great!