8 Replies Latest reply on Jan 12, 2010 11:13 PM by seanrogers

    Help with building RichFaces 3.3.3 manually

    seanrogers

      After reinstalling my OS, I've been having trouble getting the RichFaces 3.3.3 docs to build. It looked like it was requiring the latest snapshot, so I'm now trying to build the whole framework locally and having different issues. I was hoping someone might be able to point out what I'm doing wrong.

       

      I'm using Maven 2.2.1 with Java OpenJDK 1.6.0.0 on Fedora 12. I've referenced the dependency profile in the Maven settings.xml.

       

      When I try to build from the root directory using 'mvn clean install', I get the error below.

       

      [INFO] ------------------------------------------------------------------------

      [ERROR] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Compilation failure


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[544,30] cannot find symbol

      symbol  : method hasParamOrVar(java.lang.String)

      location: class org.mozilla.javascript.FunctionNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[547,26] cannot find symbol

      symbol  : method addParam(java.lang.String)

      location: class org.mozilla.javascript.FunctionNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[591,39] cannot find symbol

      symbol  : method getParamOrVarIndex(java.lang.String)

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[902,27] createForIn(int,org.mozilla.javascript.Node,org.mozilla.javascript.Node,org.mozilla.javascript.Node,org.mozilla.javascript.Node,boolean) in org.mozilla.javascript.IRFactory cannot be applied to (org.mozilla.javascript.Node,org.mozilla.javascript.Node,org.mozilla.javascript.Node,org.mozilla.javascript.Node,boolean)


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1281,38] cannot find symbol

      symbol  : method addConst(java.lang.String)

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1285,41] cannot find symbol

      symbol  : method addVar(java.lang.String)

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1285,69] cannot find symbol

      symbol  : variable DUPLICATE_CONST

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1291,48] cannot find symbol

      symbol  : method addVar(java.lang.String)

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1292,46] cannot find symbol

      symbol  : variable DUPLICATE_CONST

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1294,51] cannot find symbol

      symbol  : variable DUPLICATE_PARAMETER

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1296,51] cannot find symbol

      symbol  : variable DUPLICATE_VAR

      location: class org.mozilla.javascript.ScriptOrFnNode


      /home/serogers/Working/3.3.X/cdk/maven-javascript-plugin/src/main/java/org/mozilla/javascript/Parser.java:[1967,21] createArrayLiteral(org.mozilla.javascript.ObjArray,int,int) in org.mozilla.javascript.IRFactory cannot be applied to (org.mozilla.javascript.ObjArray,int)

        • 1. Re: Help with building RichFaces 3.3.3 manually
          jbalunas

          Last night I retested the build for 3.3.X and it completed just fine.  I was using os-x with JDK 1.6 and maven 2.1.0.

           

          Could you attach the full maven output ( as a file attachment )?

           

          Also try building the module "cdk/maven-javascript-plugin" directly by runing "mvn clean install" in that directory.

          • 2. Re: Help with building RichFaces 3.3.3 manually
            seanrogers

            Thanks Jay.

             

            I've attached the complete Maven outputs as you suggested:

            root.txt is the output when attempting 'mvn clean install' in the root directory.

            maven-javascript-plugin.txt is the output when attempting 'mvn clean install' in the cdk/maven-javascript-plugin directory.

             

            If you're using Maven 2.1 and I'm using 2.2 do you think that could somehow be a problem?

            • 3. Re: Help with building RichFaces 3.3.3 manually
              nbelaevski

              Hi Sean,

               

              I suspect the problem is in the incorrect version of Rhino JS framework. Can you please do two things and post output here:

               

              - add -X switch to maven command in order to generate debug output and run mvn clean install -X

              - run mvn dependency:tree for the failing projects with the necessary profiles activated

               

              ?

              1 of 1 people found this helpful
              • 4. Re: Help with building RichFaces 3.3.3 manually
                seanrogers

                Thanks Nick.

                 

                Attached are the outputs of the 'mvn clean install -X' command in the root and maven-javascript-plugin directory, as well as the dependency:tree from the maven-javascript-plugin directory.

                • 5. Re: Help with building RichFaces 3.3.3 manually
                  nbelaevski

                  Sean,

                   

                  I've checked and have just the same version of Rhino .jar (1.6R7), however OpenJDK bundles its own version or Rhino (1.7), so versions conflict causes compilation errors: http://bugs.sun.com/view_bug.do?bug_id=6876736

                   

                  If it is crucial for you to stay on OpenJDK, then we can try to update the plugin code to use Rhino 1.7, however I would want to avoid this for 3.3.3 release. So, is it possible to use Sun JDK? Also you can try switching to older release of OpenJDK, however I don't think this will be a good solution.  

                  1 of 1 people found this helpful
                  • 6. Re: Help with building RichFaces 3.3.3 manually
                    seanrogers

                    Thanks Nick.

                     

                    I installed the Sun JDK and now running 'mvn clean install' in the maven-javascript-plugin directory is successful.

                     

                    If I try running 'mvn clean install' in the root directory, the tests fail. The surefire-report is as below, let me know if you need more details.

                    -------------------------------------------------------------------------------

                    Test set: org.richfaces.component.CalendarComponentTest

                    -------------------------------------------------------------------------------

                    Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.702 sec <<< FAILURE!

                    testCalendarRenderer(org.richfaces.component.CalendarComponentTest)  Time elapsed: 1.553 sec  <<< FAILURE!

                    junit.framework.ComparisonFailure: expected:<...1...> but was:<...0...>

                        at junit.framework.Assert.assertEquals(Assert.java:81)

                        at junit.framework.Assert.assertEquals(Assert.java:87)

                        at org.richfaces.component.CalendarComponentTest.testCalendarRenderer(CalendarComponentTest.java:231)

                     

                    However it seems to succeed if I run 'mvn clean install -Dmaven.test.skip=true'.

                     

                    So I can now get the whole framework building, but I am having a new problem building the docs

                    Now if I try running 'mvn clean install -Dmaven.test.skip=true -Pdocs' in the docs directory, I get a fatal error: invalid index. The output is attached.

                     

                    Thanks so much for your help so far.

                    • 7. Re: Help with building RichFaces 3.3.3 manually
                      nbelaevski

                      Sean,

                       

                      Yes, calendar unit test failure is a known issue, it's in JIRA and we'll fix it.

                       

                      Maye file is just broken because of download error? Let's try the following:

                       

                      - run build with -X switch to find out which docbook file is causing the problem

                      - find this file in Maven repository and check its correctness using any .zip archiver

                      - if its correct, I'll need to compare our files, please attach it here

                      • 8. Re: Help with building RichFaces 3.3.3 manually
                        seanrogers

                        Thanks for all your help, Nick. I found the docbook file that was causing the problem and tried just building it on its own. This must have caused the problem file it to fix itself (I'm still not entirely sure how), and now the documentation is building properly as a whole.

                         

                        EDIT: Just for completeness, the file in the Maven repository it was having trouble with was jbossorg-jdocbook-style-1.1.0.jdocbook-style. It checked out fine with my archiver, so I've attached it as requested.

                         

                        I should add that I still can't build the whole framework and docs together by running 'mvn clean install -Dmaven.test.skip=true -Pdocs' in the root directory. I can, however, build the framework with 'mvn clean install -Dmaven.test.skip=true', then change to the docs directory and build them with 'mvn clean install -Dmaven.test.skip=true -Pdocs', so that is OK.