Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_dev
    • Component/s: build_system
    • Labels:
      None

      Description

      If you try to build GlassFish with JDK7 you will probably scratch your head wondering what the problem is. It's one of those situations where you have to have a mental mapping like this:

      <Enormous Weird Bizarre Error Message about HK2> ===> You forgot to set your JDK back to 6!!

      =======
      Instead why not simply FORBID compiling with 7 – then we will get a nice error message that says exactly what the problem is?

      Eventually when the problem is fixed – remove the restriction.

      Here is the actual compile error:

      [INFO] Building in d:\gf\main\nucleus\common\common-util
      [INFO] ------------------------------------------------------------------------
      [INFO] [antrun:run

      {execution: default}

      ]
      [INFO] Executing tasks
      [delete] Deleting: D:\gf\main\nucleus\common\common-util\src\main\java\com\sun\appserv\server\util\Version.java
      [copy] Copying 1 file to D:\gf\main\nucleus\common\common-util\src\main\java\com\sun\appserv\server\util
      [INFO] Executed tasks
      [INFO] [resources:resources

      {execution: default-resources}

      ]
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 22 resources
      -----------------------------------------------------
      this realm = app0.child-container[org.glassfish.hk2:hk2-maven-plugin:1.6.17]
      urls[0] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/hk2-maven-plugin/1.6.17/hk2-maven-plugin-1.6.17.jar
      urls[1] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/hk2-maven/1.6.17/hk2-maven-1.6.17.jar
      urls[2] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/hk2-core/1.6.17/hk2-core-1.6.17.jar
      urls[3] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/class-model/1.6.17/class-model-1.6.17.jar
      urls[4] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/config/1.6.17/config-1.6.17.jar
      urls[5] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/auto-depends/1.6.17/auto-depends-1.6.17.jar
      urls[6] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/external/javax.inject/1.6.17/javax.inject-1.6.17.jar
      urls[7] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/external/asm-all-repackaged/1.6.17/asm-all-repackaged-1.6.17.jar
      urls[8] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/hk2-api/1.6.17/hk2-api-1.6.17.jar
      urls[9] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar
      urls[10] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/jvnet/tiger-types/1.4/tiger-types-1.4.jar
      urls[11] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/external/bean-validator/1.6.17/bean-validator-1.6.17.jar
      urls[12] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/com/googlecode/jtype/jtype/0.1.0/jtype-0.1.0.jar
      urls[13] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
      urls[14] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/maven/maven-archiver/2.0.4/maven-archiver-2.0.4.jar
      urls[15] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-4/plexus-archiver-1.0-alpha-4.jar
      urls[16] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/osgi/osgi_R4_core/1.0/osgi_R4_core-1.0.jar
      urls[17] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/hk2-dependency-verifier/1.6.17/hk2-dependency-verifier-1.6.17.jar
      urls[18] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/osgi-adapter/1.6.17/osgi-adapter-1.6.17.jar
      urls[19] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/bcel/bcel/5.2/bcel-5.2.jar
      urls[20] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/config-generator/1.6.17/config-generator-1.6.17.jar
      urls[21] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/glassfish/hk2/auto-depends-plugin/1.6.17/auto-depends-plugin-1.6.17.jar
      urls[22] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.1.3/jaxb-xjc-2.1.3.jar
      urls[23] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.3/jaxb-impl-2.1.3.jar
      urls[24] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar
      urls[25] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/javax/xml/stream/stax-api/1.0/stax-api-1.0.jar
      urls[26] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar
      urls[27] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/com/sun/xml/stream/sjsxp/1.0/sjsxp-1.0.jar
      urls[28] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar
      urls[29] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-compiler-api/1.5.3/plexus-compiler-api-1.5.3.jar
      urls[30] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/1.5.3/plexus-compiler-manager-1.5.3.jar
      urls[31] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/1.5.3/plexus-compiler-javac-1.5.3.jar
      urls[32] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
      urls[33] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
      urls[34] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.jar
      urls[35] = file:/C:/Users/wnevins.ST-USERS/.m2/repository/biz/aQute/bndlib/0.0.203/bndlib-0.0.203.jar
      Number of imports: 10
      import: org.codehaus.classworlds.Entry@a6c57a42
      import: org.codehaus.classworlds.Entry@12f43f3b
      import: org.codehaus.classworlds.Entry@20025374
      import: org.codehaus.classworlds.Entry@f8e44ca4
      import: org.codehaus.classworlds.Entry@92758522
      import: org.codehaus.classworlds.Entry@ebf2705b
      import: org.codehaus.classworlds.Entry@bb25e54
      import: org.codehaus.classworlds.Entry@bece5185
      import: org.codehaus.classworlds.Entry@3fee8e37
      import: org.codehaus.classworlds.Entry@3fee19d8

      this realm = plexus.core
      urls[0] = file:/C:/bin/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
      Number of imports: 10
      import: org.codehaus.classworlds.Entry@a6c57a42
      import: org.codehaus.classworlds.Entry@12f43f3b
      import: org.codehaus.classworlds.Entry@20025374
      import: org.codehaus.classworlds.Entry@f8e44ca4
      import: org.codehaus.classworlds.Entry@92758522
      import: org.codehaus.classworlds.Entry@ebf2705b
      import: org.codehaus.classworlds.Entry@bb25e54
      import: org.codehaus.classworlds.Entry@bece5185
      import: org.codehaus.classworlds.Entry@3fee8e37
      import: org.codehaus.classworlds.Entry@3fee19d8
      -----------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Internal error in the plugin manager executing goal 'org.glassfish.hk2:hk2-maven-plugin:1.6.17:hk2-compile': Unable to load the mojo 'org.glass
      fish.hk2:hk2-maven-plugin:1.6.17:hk2-compile' in the plugin 'org.glassfish.hk2:hk2-maven-plugin'. A required class is missing: com/sun/mirror/apt/Anno
      tationProcessorFactory
      com.sun.mirror.apt.AnnotationProcessorFactory
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 5 seconds
      [INFO] Finished at: Fri Sep 09 11:48:33 PDT 2011
      [INFO] Final Memory: 33M/245M
      [INFO] ------------------------------------------------------------------------

      1. building_gf_with_jdk7_changes.tar.gz
        2 kB
        Romain Grécourt
      2. glassfish_tests_ignores.diff
        10 kB
        Romain Grécourt
      3. glassfish_tests_ignores-update1.diff
        11 kB
        Romain Grécourt
      4. glassfish_tests_ignores-update2.diff
        10 kB
        Romain Grécourt
      5. glassfish_tests_ignores-update3.diff
        11 kB
        Romain Grécourt
      6. glassfish_tests_ignores-update4.diff
        6 kB
        Romain Grécourt
      There are no Sub-Tasks for this issue.

        Activity

        Hide
        janey added a comment -

        Assign to Romain. He is working on this and has made good progress.

        Show
        janey added a comment - Assign to Romain. He is working on this and has made good progress.
        Hide
        Romain Grécourt added a comment - - edited

        Here are all the changes made in HK2,glassfishbuild and GlassFish (see building_gf_with_jdk7_changes.tar.gz) in order to have the GlassFish workspace buildable with the JDK7. New versions of HK2 (1.6.18) and glassfishbuild (3.2.2) have been released, they are now used in the GlassFish trunk (see r49613).

        Furthermore the GlassFish workspace still requires some workaround to build from scratch with the JDK7 because of some unit tests that fail randomly (see http://wiki.apidesign.org/wiki/OrderOfElements#JUnit_and_Switch_to_JDK7). You can use the attached diff file to avoid these unit tests and so build GlassFish from scratch with JDK7.

        I'll create separate issues for each of these unit tests.

        Show
        Romain Grécourt added a comment - - edited Here are all the changes made in HK2,glassfishbuild and GlassFish (see building_gf_with_jdk7_changes.tar.gz) in order to have the GlassFish workspace buildable with the JDK7. New versions of HK2 (1.6.18) and glassfishbuild (3.2.2) have been released, they are now used in the GlassFish trunk (see r49613). Furthermore the GlassFish workspace still requires some workaround to build from scratch with the JDK7 because of some unit tests that fail randomly (see http://wiki.apidesign.org/wiki/OrderOfElements#JUnit_and_Switch_to_JDK7 ). You can use the attached diff file to avoid these unit tests and so build GlassFish from scratch with JDK7. I'll create separate issues for each of these unit tests.
        Hide
        Romain Grécourt added a comment - - edited

        The behavior observed regarding the unit tests that fail is random. Even if I was able to build several times (about 10 times) from scratch with the first set of ignores, I discovered a new one just after having updated the issue...

        Here is a diff file to ignores these failing tests (glassfish_tests_ignores-update1.diff), available as attachment.

        Show
        Romain Grécourt added a comment - - edited The behavior observed regarding the unit tests that fail is random. Even if I was able to build several times (about 10 times) from scratch with the first set of ignores, I discovered a new one just after having updated the issue... Here is a diff file to ignores these failing tests (glassfish_tests_ignores-update1.diff), available as attachment.
        Hide
        Romain Grécourt added a comment - - edited

        since Cheng resolve one the subtask #17306 (unit tests from nucleus/common/glassfish-naming) the set of ignores changed. Here is a new update of the ignore diff file that can be used with revison 49672 and above (glassfish_tests_ignores-update2.diff available as attachment).

        Show
        Romain Grécourt added a comment - - edited since Cheng resolve one the subtask #17306 (unit tests from nucleus/common/glassfish-naming) the set of ignores changed. Here is a new update of the ignore diff file that can be used with revison 49672 and above (glassfish_tests_ignores-update2.diff available as attachment).
        Hide
        Romain Grécourt added a comment -

        Reopened the sub task #17306 as some other unit test from nucleus/common/glassfish-naming are failing.

        I've found a way to reproduce the issues each time by running the test methods individually.

        $ cd [glassfishWorkspace]/[module]
        $ mvn -Dtest=fullClassName#testMethodName org.apache.maven.plugins:maven-surefire-plugin:2.8:test
        

        You must use a version of the surefire plugin greater or equals to 2.7.3. For more information see this link

        Show
        Romain Grécourt added a comment - Reopened the sub task #17306 as some other unit test from nucleus/common/glassfish-naming are failing. I've found a way to reproduce the issues each time by running the test methods individually. $ cd [glassfishWorkspace]/[module] $ mvn -Dtest=fullClassName#testMethodName org.apache.maven.plugins:maven-surefire-plugin:2.8:test You must use a version of the surefire plugin greater or equals to 2.7.3. For more information see this link
        Hide
        Romain Grécourt added a comment -

        Last diff file for ignoring the unit tests. (glassfish_tests_ignores-update3.diff)

        Show
        Romain Grécourt added a comment - Last diff file for ignoring the unit tests. (glassfish_tests_ignores-update3.diff)
        Hide
        Romain Grécourt added a comment -

        attaching last version of the diff file to ignore the unit test.

        Show
        Romain Grécourt added a comment - attaching last version of the diff file to ignore the unit test.
        Hide
        Romain Grécourt added a comment -

        GlassFish trunk is build-able with JDK7 since revision #53208 (03/28/12).

        Show
        Romain Grécourt added a comment - GlassFish trunk is build-able with JDK7 since revision #53208 (03/28/12).

          People

          • Assignee:
            Romain Grécourt
            Reporter:
            Byron Nevins
          • Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: