7 Replies Latest reply on Oct 12, 2012 8:42 AM by hchiorean

    3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot

    bwallis42

      The joys of working against a moving target.

       

      If you download a copy of the nightly build, the new CR2 release of modeshape won't work against it. On October 5th there was an update on the 7.2.0 jboss branch to upgrade Infinispan from 5.1.x to 5.2.0.Beta1 (AS7-5254). This causes a class not found error on startup.

       

      You also cannot build ModeShape 3.0.0.CR2 against the latest jboss alpha code. I tried by updating the infinispan version for the as72 profile in the parent pom to 5.2.0.Beta1 and I get the following compile error.

       

       

      {code}

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

      [ERROR] /users/bwallis/InfoMedix/JBoss/ModeShape/workspace/modeshape-src/modeshape/modeshape-jcr/src/test/java/org/modeshape/jcr/store/JdbcStringCacheStoreTest.java:[50,16] cannot find symbol

      [ERROR] symbol  : method addProperty(java.lang.String,java.lang.String)

      [ERROR] location: class java.lang.Object

      [ERROR] /users/bwallis/InfoMedix/JBoss/ModeShape/workspace/modeshape-src/modeshape/modeshape-jcr/src/test/java/org/modeshape/jcr/InfinispanUtilTest.java:[68,21] cannot find symbol

      [ERROR] symbol  : method purgeOnStartup(boolean)

      [ERROR] location: interface org.infinispan.configuration.cache.LoaderConfigurationBuilder

      [ERROR] /users/bwallis/InfoMedix/JBoss/ModeShape/workspace/modeshape-src/modeshape/modeshape-jcr/src/test/java/org/modeshape/jcr/store/JdbcBinaryCacheStoreTest.java:[57,16] cannot find symbol

      [ERROR] symbol  : method addProperty(java.lang.String,java.lang.String)

      [ERROR] location: class java.lang.Object

      {code}

       

      The nightly build from before Oct 5th is no longer available from the build server so I built the version mentioned in MODE-1601 by checking out jboss src like so:

       

      git checkout adaa66bbca6ef426bcb0b5fcdb86ed18f0757c9c

       

      and building jboss

       

      ./build.sh clean install -Prelease -DskipTests

       

      and then building the tip of the master branch of modeshape

       

      mvn clean install -o -DskipTests -Pintegration,as72

       

      Installed the jboss archive just built, unpacked the modeshape on top of it and I now have a working installation.

        • 1. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
          jaikiran

          Is this really because a class which ModeShape was using has been removed from Infinispan or is this for some other reason? The reason I ask is because if this is some other issue then this will have to be brought to the notice of the AS7 team for them to take a look.

          • 2. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
            hchiorean

            I've updated to the latest AS7.2 snapshot (abd6c3c7131599cfb56d0742a0633e5c4edb9747) and the CR2 kit runs fine, meaning that once unzipped, I'm able to start the server the play with the rest server, for example (http://localhost:8080/modeshape-rest)

            I agree that our tests may not be compiling against ISPN 5.2.0.Beta1, but imo that's another story

             

            EDIT: Actually, I take that back: I've been running using *my* locally built as72 kit, which I was under the impression is the same as what's in CR2, but it seems I'm mistaken. I will have a look to see what the differences are.

            • 3. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
              hchiorean

              The actual exception that I have locally, when overlaying the CR2.zip on top of the latest AS7.2.Alpha is:

               

              12:49:58,618 INFO  [org.jboss.modules] (main) JBoss Modules version 1.1.3.GA

              12:49:58,760 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.2.GA

              12:49:58,803 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss AS 7.2.0.Alpha1-SNAPSHOT "Steropes" starting

              12:49:59,448 ERROR [org.jboss.as.controller] (Controller Boot Thread) JBAS014601: Error booting the container: java.lang.NoSuchMethodError: org.jboss.as.controller.SimpleListAttributeDefinition$Builder.<init>(Ljava/lang/String;Lorg/jboss/as/controller/SimpleAttributeDefinition;)V

                      at org.modeshape.jboss.subsystem.MappedListAttributeDefinition$Builder.<init>(MappedListAttributeDefinition.java:388)

                      at org.modeshape.jboss.subsystem.MappedListAttributeDefinition$Builder.of(MappedListAttributeDefinition.java:393)

              • 4. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
                ctomc

                This bug in AS7 upstream as the signature of that constructor changed few months ago

                 

                from

                public Builder(final String name, final SimpleAttributeDefinition valueType) {

                 

                to

                from public Builder(final String name, final AttributeDefinition valueType) {

                that couses binary incompatibilty, but still  has source compatibilty.

                I will fix upstream to reflect this, but for time beeing if modeshape extension is build against AS72 it would work.

                 

                --

                tomaz

                • 5. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
                  hchiorean

                  Hi Tomaz,

                   

                  Since we need to support 7.1.1 as well, the fix would be using the factory method : SimpleListAttributeDefinition.Builder.of(..), right ?

                   

                  Actualy, maybe not, since all the setters have been moved to AbstractAttributeDefinitionBuilder. Is there a way to support, binary-wise, both 7.1.1 and 7.2 ?

                   

                  Message was edited by: Horia Chiorean

                  • 6. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
                    ctomc

                    Horia Chiorean wrote:

                     

                    Hi Tomaz,

                     

                    Since we need to support 7.1.1 as well, the fix would be using the factory method : SimpleListAttributeDefinition.Builder.of(..), right ?

                     

                    Actualy, maybe not, since all the setters have been moved to AbstractAttributeDefinitionBuilder. Is there a way to support, binary-wise, both 7.1.1 and 7.2 ?

                     

                     

                    Yes current if you would use Builder.of(..) it would work.

                    In any case I will reintroduce old constructor just to mentain binary compatibitly.

                     

                    as for methods go tha ware moved to AbstractAttributeDefinitionBuilder, most of what was used by outside impls ware also added back to Builders itself(mainly SimpleAttributeBuilder) but if there are any missing we can also add them beck

                     

                    --

                    tomaz

                    • 7. Re: 3.0.0.CR2 and JBoss AS 7.2.0.Alpha1 snapshot
                      hchiorean

                      The setters I'm referring to were in 7.1.1 on the SimpleListAttributeDefinition.Builder class (setMinSize, setMaxSize, etc). In the current 7.2 snapshot, they've moved to AbstractAttributeDefinitionBuilder, so for us to be binary compatible both with 7.1.1 and 7.2 we would need them back. I did look at the API, but I can't find any other workaround for this.