5 Replies Latest reply on May 31, 2011 11:35 AM by rhauch

    New error with Modeshape 2.5.0

    sjahan

      Hi everyone,

       

      I freshly installed Modeshape 2.5.0 and i get a nullpointer at the beginning:

       

      17:18:56,830 ERROR [SOAPFaultHelperJAXWS] SOAP request exception

      java.lang.NullPointerException

          at org.modeshape.graph.request.CompositeRequest.<init>(CompositeRequest.java:205)

          at org.modeshape.graph.request.CompositeRequest.with(CompositeRequest.java:128)

          at org.modeshape.graph.request.BatchRequestBuilder.pop(BatchRequestBuilder.java:122)

          at org.modeshape.graph.Graph$Batch.execute(Graph.java:4963)

          at org.modeshape.repository.ModeShapeConfiguration.save(ModeShapeConfiguration.java:567)

          at org.modeshape.jcr.JcrConfiguration.save(JcrConfiguration.java:516)

          at org.modeshape.jcr.JcrConfiguration.build(JcrConfiguration.java:528)

          at org.oea.jcr.storage.AbstractStorage.initialize(AbstractStorage.java:45)

          ...

       

      This worked before but not anymore. Did the repository schema changed? -> Should i purge the DB and turn the mode:autoGenerateSchema="validate" to create? (i'd like to test it but i have to request the DBA to perform a change if necessary, that's why i can't do the test right now on my own)

       

      Thank you for your support,

       

      SJ.

        • 1. Re: New error with Modeshape 2.5.0
          bcarothers

          Something in your configuration file is invalid and 'Shape is not doing a good job of returning a meaningful error.  Any chance that you could post your config file so that we can try to debug the issue?

          • 2. Re: New error with Modeshape 2.5.0
            sjahan

            Well, retesting freshly this morning, i have a different exception. I think the previously posted one was because of my eclipse environment was kind of tired at the end of the last week... I didn't reproduce successfully the exception i posted.

            However, i reboot my dev environment and after a few tests, i always get the same error:

             

            java.lang.NoSuchMethodError: org.apache.lucene.analysis.CharArraySet.copy(Lorg/apache/lucene/util/Version;Ljava/util/Set;)Lorg/apache/lucene/analysis/CharArraySet;

                at org.apache.lucene.analysis.StopwordAnalyzerBase.<init>(StopwordAnalyzerBase.java:63)

                at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:86)

                at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:73)

                at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:63)

                at org.modeshape.jcr.RepositoryQueryManager$SelfContained.<init>(RepositoryQueryManager.java:294)

                at org.modeshape.jcr.JcrRepository.<init>(JcrRepository.java:862)

                at org.modeshape.jcr.JcrEngine.doCreateJcrRepository(JcrEngine.java:484)

                at org.modeshape.jcr.JcrEngine.getRepository(JcrEngine.java:298)

                at org.oea.jcr.storage.AbstractStorage.getRepository(AbstractStorage.java:57)

             

            This is strange because i never encountered some trouble with the lucene part til now.

             

            Here is the configuration file we use:

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

            <configuration xmlns:mode="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">

                <mode:sources jcr:primaryType="nt:unstructured">

                    <mode:source jcr:name="Portal" mode:classname="org.modeshape.connector.store.jpa.JpaSource" mode:dataSourceJndiName="java:OEAPortal" mode:dialect="org.hibernate.dialect.MySQL5Dialect" mode:model="Simple" mode:maximumConnectionsInPool="1" mode:largeValueSizeInBytes="10000" mode:retryLimit="3" mode:compressData="false" mode:showSql="true" mode:autoGenerateSchema="validate" mode:creatingWorkspacesAllowed="true" mode:defaultWorkspaceName="workspace">

                        <mode:predefinedWorkspaceNames>system</mode:predefinedWorkspaceNames>

                        <mode:predefinedWorkspaceNames>workspace</mode:predefinedWorkspaceNames>

                    </mode:source>

                </mode:sources>

                <mode:sequencers>

                </mode:sequencers>

                <mode:mimeTypeDetectors>

                    <mode:mimeTypeDetector jcr:name="Detector">

                        <mode:description>Standard extension-based MIME type detector</mode:description>

                        <mode:classname>org.modeshape.graph.mimetype.ExtensionBasedMimeTypeDetector</mode:classname>

                        <mode:classpath/>

                        <mode:classpath/>

                    </mode:mimeTypeDetector>

                </mode:mimeTypeDetectors>

                <mode:repositories>       

                    <mode:repository jcr:name="Portal">

                        <mode:source>Portal</mode:source>

                        <mode:options jcr:primaryType="mode:options">

                            <systemSourceName jcr:primaryType="mode:option" mode:value="system@Portal"/>

                            <jaasLoginConfigName jcr:primaryType="mode:option" mode:value="modeshape-jcr"/>

                        </mode:options>

                        <mode:nodeTypes jcr:primaryType="mode:nodeTypes"/>

                        <namespaces jcr:primaryType="mode:namespaces">

                            <oea jcr:primaryType="mode:namespace" mode:uri="http://www.oea.org"/>

                        </namespaces>

                    </mode:repository>

                </mode:repositories>

            </configuration>

             

            Debugging a little bit, i found something strange that could eventually be related to the problem:

            In the thread http://community.jboss.org/message/587515 i created, you can see that i wanted to add some new nodetypes to manage my OPVs/versioning feature. Well, it seems that my nodetypes aren't working anymore

            On the line 792 of JCRRepository.java (this.repositoryTypeManager.refreshFromSystem();), i get a catched error:

            10:25:16,613 ERROR [RepositoryNodeTypeManager] Node types were read from the system content, and appear to be inconsistent or invalid: org.modeshape.jcr.nodetype.InvalidNodeTypeDefinitionException: Supertype 'nt:base' from type 'oea:unstructured' does not exist

             

            Maybe that's not related, maybe that is, i don't really know how modeshape works that deeply. I just get this error message a few lines before the RepositoryQueryManager initalization (which seems troublesome). What i know is that i had no problems with 2.4.0 and my nodetypes were ok. You can find the CND files we use in the mentioned thread.

             

            Hoping you can help me on this topic,

            Thank you very much for your support and have a good day.

             

            SJ.

            • 3. Re: New error with Modeshape 2.5.0
              rhauch

              java.lang.NoSuchMethodError: org.apache.lucene.analysis.CharArraySet.copy(Lorg/apache/lucene/util/Version;Ljava/util/Set;)Lorg/apache/lucene/analysis/CharArraySet;

                  at org.apache.lucene.analysis.StopwordAnalyzerBase.<init>(StopwordAnalyzerBase.java:63)

                  at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:86)

                  at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:73)

                  at org.apache.lucene.analysis.en.EnglishAnalyzer.<init>(EnglishAnalyzer.java:63)

                  at org.modeshape.jcr.RepositoryQueryManager$SelfContained.<init>(RepositoryQueryManager.java:294)

                  at org.modeshape.jcr.JcrRepository.<init>(JcrRepository.java:862)

                  at org.modeshape.jcr.JcrEngine.doCreateJcrRepository(JcrEngine.java:484)

                  at org.modeshape.jcr.JcrEngine.getRepository(JcrEngine.java:298)

                  at org.oea.jcr.storage.AbstractStorage.getRepository(AbstractStorage.java:57)

               

              This error sounds like you have an incorrect version of Lucene on the classpath. Note that ModeShape 2.5.0 started using Lucene 3.1, as described in our release notes (see MODE-1143 in the "Component Upgrade" section).

              • 4. Re: New error with Modeshape 2.5.0
                sjahan

                Thank you very much Randall,

                That was actually that: another part of the project use Lucene and this was 3.0.0.

                I switch the lucene-core jar to the proper version and there is no conflicts anymore!

                 

                Thank you once again!

                 

                SJ.

                • 5. Re: New error with Modeshape 2.5.0
                  rhauch

                  Good to hear it was that simple!