5 Replies Latest reply on Nov 7, 2014 9:48 AM by virchete

    Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final

    virchete

      Hi,

       

      For our project, Overlord, we are doing the integration with Wildfly that uses modeshape 4.0.0.Final.

       

      All our modeshape jcr tests are failing. Before we were using the version of modeshape used in eap 6.2 that i think is 3.8.2, or 3.8.0.

       

      THe error is:

      org.infinispan.CacheException: Unable to invoke method public void org.infinispan.marshall.jboss.ExternalizerTable.start() on object of type ExternalizerTable

       

      It happens when it is called  state = new RunningState(); inside of the org.modeshape.jcr.JcrRepository

       

      This class is called from the :

       

      JcrRepositoryFactory. getRepository( Map parameters )

       

      The parameters passed are:

       

      {org.modeshape.jcr.URL=file:/home/virchete/dev/workspace/s-ramp/s-ramp-repository-jcr/modeshape/target/test-classes/META-INF/modeshape-configs/junit-sramp-config.json}

       

      And the json value is:

       

      {

          "name" : "S-RAMP-Repository",

          "jndiName" : "",

          "workspaces" : {

              "predefined" : ["otherWorkspace"],

              "default" : "default",

              "allowCreation" : true

          },

          "storage" : {

              "binaryStorage" : {

                  "type"  : "transient",

                  "minimumBinarySizeInBytes" : 99999999,

                  "minimumStringSize" : 99999999,

              }

          },

          "security" : {

              "anonymous" : {

                  "roles" : ["readonly","readwrite","admin"],

                  "useOnFailedLogin" : false

              },

              "providers" : [

                  {

                      "classname" : "org.overlord.sramp.repository.jcr.modeshape.auth.MockAuthenticationProvider",

                      "policyName" : "overlord-idp"

                  }

               ]

          }

      }

        • 1. Re: Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final
          hchiorean

          I don't really understand from the above configuration what your setup is - you don't seem to be using the WF subsystem and you don't have an "cache" configuration in your JSON file, meaning you're using a default, in-memory configuration.

           

          If you're embedding ModeShape in your application & deploying that in Wildfly, are you sure you're using Infinispan 6 ? ModeShape 4 & Wildfly use Infinispan 6, which is not backwards compatible with 5 (i.e ModeShape 3.x and EAP).

          Not only that, but it's highly probable that cache-store data is not compatible either. So if you're trying to migrate data between ModeShape 3 and ModeShape 4, you should use backup & restore.

          • 2. Re: Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final
            virchete

            Well the above configuration is used for our junit tests. The version of infinispan used in the tests is the same that is used in wildfly 8.1: 6.0.2.Final.

             

            Maybe it is something in the json configuration that is missing, because the error happens when the JcrRepositoryFactory. getRepository( Map parameters ) is called. (I debugged internally the code), but i could not go much further than this line

             

            state = new RunningState(); inside of the org.modeshape.jcr.JcrRepository

             

            This error I am talking is related the junit tests that shoudl work, as before they were working with the 3.8 version. I expect here maybe something is missing in the json file.

            • 3. Re: Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final
              hchiorean

              The JSON configuration looks fine, the only significant changes from 3.x to 4.x are around indexes. The rest is pretty much unchanged.

              Do you have a full stack trace of the exception ?

              • 4. Re: Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final
                virchete

                Here it is:

                 

                org.infinispan.CacheException: Unable to invoke method public void org.infinispan.marshall.jboss.ExternalizerTable.start() on object of type ExternalizerTable

                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:205)

                    at org.infinispan.factories.AbstractComponentRegistry$PrioritizedMethod.invoke(AbstractComponentRegistry.java:886)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeStartMethods(AbstractComponentRegistry.java:657)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:226)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:158)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:296)

                    at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:161)

                    at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:246)

                    at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:86)

                    at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:814)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:220)

                    at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:188)

                    at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:175)

                    at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:101)

                    at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:80)

                    at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:64)

                    at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:682)

                    at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:649)

                    at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:545)

                    at org.infinispan.schematic.Schematic.get(Schematic.java:91)

                    at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1080)

                    at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:977)

                    at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:386)

                    at org.modeshape.jcr.JcrRepository.start(JcrRepository.java:310)

                    at org.modeshape.jcr.JcrRepositoriesContainer$UrlRepositoryLookup.repository(JcrRepositoriesContainer.java:212)

                    at org.modeshape.jcr.JcrRepositoriesContainer.getRepository(JcrRepositoriesContainer.java:90)

                    at org.modeshape.jcr.JcrRepositoryFactory.getRepository(JcrRepositoryFactory.java:123)

                    at org.overlord.sramp.repository.jcr.modeshape.ModeshapeRepository.doStartup(ModeshapeRepository.java:124)

                    at org.overlord.sramp.repository.jcr.JCRRepository.startup(JCRRepository.java:36)

                    at org.overlord.sramp.repository.jcr.JCRRepositoryFactory.getInstance(JCRRepositoryFactory.java:49)

                    at org.overlord.sramp.repository.jcr.JCRRepositoryFactory.getSession(JCRRepositoryFactory.java:79)

                    at org.overlord.sramp.repository.jcr.modeshape.JCRRepositoryCleaner.clean(JCRRepositoryCleaner.java:46)

                    at org.overlord.sramp.repository.jcr.modeshape.AbstractNoAuditingJCRPersistenceTest.prepForTest(AbstractNoAuditingJCRPersistenceTest.java:38)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                    at java.lang.reflect.Method.invoke(Method.java:606)

                    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

                    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

                    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

                    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)

                    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

                    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

                    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

                    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

                    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

                    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

                    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

                    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

                    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

                    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

                    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

                Caused by: java.lang.IncompatibleClassChangeError

                    at org.infinispan.marshall.jboss.ExternalizerTable.addInternalExternalizer(ExternalizerTable.java:318)

                    at org.infinispan.marshall.jboss.ExternalizerTable.loadInternalMarshallables(ExternalizerTable.java:294)

                    at org.infinispan.marshall.jboss.ExternalizerTable.start(ExternalizerTable.java:164)

                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                    at java.lang.reflect.Method.invoke(Method.java:606)

                    at org.infinispan.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:203)

                    ... 105 more

                 

                 

                 

                And the libraries we are using for this project are:

                 

                [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ s-ramp-repository-jcr-modeshape ---

                [INFO] org.overlord.sramp:s-ramp-repository-jcr-modeshape:bundle:0.7.0-SNAPSHOT

                [INFO] +- org.overlord:overlord-commons-services:jar:2.0.12-SNAPSHOT:compile

                [INFO] +- org.overlord.sramp:s-ramp-common:jar:0.7.0-SNAPSHOT:compile

                [INFO] |  +- org.overlord.sramp:s-ramp-api:jar:0.7.0-SNAPSHOT:compile

                [INFO] |  +- org.overlord:overlord-commons-config:jar:2.0.12-SNAPSHOT:compile

                [INFO] |  |  \- org.overlord:overlord-commons-auth:jar:2.0.12-SNAPSHOT:compile

                [INFO] |  \- org.overlord:overlord-commons-codec:jar:2.0.12-SNAPSHOT:compile

                [INFO] +- org.overlord.sramp:s-ramp-repository-jcr:jar:0.7.0-SNAPSHOT:compile

                [INFO] |  +- org.overlord.sramp:s-ramp-repository:jar:0.7.0-SNAPSHOT:compile

                [INFO] |  +- commons-codec:commons-codec:jar:1.4:compile

                [INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile

                [INFO] +- javax.jcr:jcr:jar:2.0:provided

                [INFO] +- org.osgi:org.osgi.core:jar:4.3.1:provided

                [INFO] +- org.infinispan:infinispan-commons:jar:6.0.2.Final:test

                [INFO] |  \- org.jboss.logging:jboss-logging:jar:3.1.4.GA:compile

                [INFO] +- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.2.Final:provided

                [INFO] +- org.modeshape:modeshape-jcr-api:jar:4.0.0.Final:compile

                [INFO] +- org.modeshape:modeshape-common:jar:4.0.0.Final:compile

                [INFO] +- org.modeshape:modeshape-jcr:jar:4.0.0.Final:compile

                [INFO] |  +- joda-time:joda-time:jar:2.1:compile

                [INFO] |  +- org.modeshape:modeshape-schematic:jar:4.0.0.Final:compile

                [INFO] |  |  \- org.infinispan:infinispan-core:jar:5.2.10.Final:compile

                [INFO] |  |     \- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.1.Final:compile

                [INFO] |  +- org.jgroups:jgroups:jar:3.2.13.Final:compile

                [INFO] |  +- org.mapdb:mapdb:jar:1.0.6:compile

                [INFO] |  \- org.apache.tika:tika-core:jar:1.3:compile

                [INFO] +- org.jboss.marshalling:jboss-marshalling:jar:1.4.6.Final:compile

                [INFO] +- org.jboss.marshalling:jboss-marshalling-river:jar:1.4.6.Final:compile

                [INFO] +- org.apache.lucene:lucene-core:jar:3.6.2:compile

                [INFO] +- org.jboss:staxmapper:jar:1.1.0.Final:compile

                [INFO] +- commons-configuration:commons-configuration:jar:1.6:compile

                [INFO] |  \- commons-collections:commons-collections:jar:3.2.1:compile

                [INFO] +- org.slf4j:slf4j-api:jar:1.7.2:compile

                [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.2:compile

                [INFO] +- log4j:log4j:jar:1.2.17:compile

                [INFO] +- org.apache.felix:org.apache.felix.scr.annotations:jar:1.7.0:compile

                [INFO] +- commons-io:commons-io:jar:2.1:compile

                [INFO] +- commons-lang:commons-lang:jar:2.6:compile

                [INFO] +- junit:junit:jar:4.11:test

                [INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test

                [INFO] \- xmlunit:xmlunit:jar:1.3:test

                 

                As you can see I attached org.infinispan:infinispan-commons:jar:6.0.2.Final:test. The reason is because there was a ClassNotFoundException of the class org.infinispan.commons.marshall.Externalizer

                 

                But as i can see the library org.modeshape:modeshape-jcr:jar:4.0.0.Final:compile has a dependency with org.infinispan:infinispan-core:jar:5.2.10.Final:compile that can be causing this problem.

                 

                Is this right?

                • 5. Re: Exception modeshape test migrating from version eap 6.2 to modesphape 4.0.0.Final
                  virchete

                  Solved the issue:

                   

                    <dependency>

                        <groupId>org.modeshape</groupId>

                        <artifactId>modeshape-jcr</artifactId>

                        <exclusions>

                            <exclusion>

                                <groupId>org.infinispan</groupId>

                              <artifactId>infinispan-core</artifactId>

                            </exclusion>

                        </exclusions>

                      </dependency>

                   

                  There is a dependency to the infinispan-core-5, what is an error. I added the infinispan-core 6.0.2 and exclude the one that is coming with modeshape.