Details

    • Story
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 0.20.0
    • Scheduler
    • None
    • 3

    Description

      Guice 4.0 has been released. Among the new features, probably the most significant is Java 8 support - in Guice 3.0 stack traces are obfuscated by https://github.com/google/guice/issues/757. As our code expands use of lambdas and method references this will become even more critical.

      Attachments

        Issue Links

          Activity

            zmanji Zameer Manji added a comment -

            I think upgrading guice will be hard unless we address AURORA-1213 first.

            zmanji Zameer Manji added a comment - I think upgrading guice will be hard unless we address AURORA-1213 first.
            zmanji Zameer Manji added a comment -

            I attempted to do this after the changes related to AURORA-1213 landed. Forcing the guice, guice-multibindings and guice-servlet artifacts to 4.0 results in the following dependency tree related to guice:

            com.google.inject:guice:4.0 (forced)
            +--- compile
            +--- project :commons
            |    \--- compile
            +--- com.google.inject.extensions:guice-assistedinject:4.0
            |    \--- compile
            +--- com.google.inject.extensions:guice-multibindings:4.0
            |    +--- project :commons (*)
            |    \--- org.apache.shiro:shiro-guice:1.2.3
            |         \--- compile
            \--- com.google.inject.extensions:guice-servlet:4.0
                 \--- com.sun.jersey.contribs:jersey-guice:1.18.1
                      +--- compile
                      \--- project :commons (*)
            
            com.google.inject:guice:3.0 -> 4.0
            +--- com.sun.jersey.contribs:jersey-guice:1.18.1
            |    +--- compile
            |    \--- project :commons
            |         \--- compile
            \--- org.apache.shiro:shiro-guice:1.2.3
                 \--- compile
            
            com.google.inject.extensions:guice-assistedinject:4.0
            \--- compile
            
            com.google.inject.extensions:guice-multibindings:4.0 (forced)
            \--- project :commons
                 \--- compile
            
            com.google.inject.extensions:guice-multibindings:3.0 -> 4.0
            \--- org.apache.shiro:shiro-guice:1.2.3
                 \--- compile
            
            com.google.inject.extensions:guice-servlet:4.0 (forced)
            
            com.google.inject.extensions:guice-servlet:3.0 -> 4.0
            \--- com.sun.jersey.contribs:jersey-guice:1.18.1
                 +--- compile
                 \--- project :commons
                      \--- compile
            
            com.sun.jersey.contribs:jersey-guice:1.18.1
            +--- compile
            \--- project :commons
                 \--- compile
            
            org.apache.shiro:shiro-guice:1.2.3
            \--- compile
            
            org.mybatis:mybatis-guice:3.6
            \--- compile
            

            Unfortunately there are binary incompatibilities between guice 3.x and 4.x resulting in class not found errors from the jersey-guice and shiro-guice artifacts.

            zmanji Zameer Manji added a comment - I attempted to do this after the changes related to AURORA-1213 landed. Forcing the guice, guice-multibindings and guice-servlet artifacts to 4.0 results in the following dependency tree related to guice: com.google.inject:guice:4.0 (forced) +--- compile +--- project :commons | \--- compile +--- com.google.inject.extensions:guice-assistedinject:4.0 | \--- compile +--- com.google.inject.extensions:guice-multibindings:4.0 | +--- project :commons (*) | \--- org.apache.shiro:shiro-guice:1.2.3 | \--- compile \--- com.google.inject.extensions:guice-servlet:4.0 \--- com.sun.jersey.contribs:jersey-guice:1.18.1 +--- compile \--- project :commons (*) com.google.inject:guice:3.0 -> 4.0 +--- com.sun.jersey.contribs:jersey-guice:1.18.1 | +--- compile | \--- project :commons | \--- compile \--- org.apache.shiro:shiro-guice:1.2.3 \--- compile com.google.inject.extensions:guice-assistedinject:4.0 \--- compile com.google.inject.extensions:guice-multibindings:4.0 (forced) \--- project :commons \--- compile com.google.inject.extensions:guice-multibindings:3.0 -> 4.0 \--- org.apache.shiro:shiro-guice:1.2.3 \--- compile com.google.inject.extensions:guice-servlet:4.0 (forced) com.google.inject.extensions:guice-servlet:3.0 -> 4.0 \--- com.sun.jersey.contribs:jersey-guice:1.18.1 +--- compile \--- project :commons \--- compile com.sun.jersey.contribs:jersey-guice:1.18.1 +--- compile \--- project :commons \--- compile org.apache.shiro:shiro-guice:1.2.3 \--- compile org.mybatis:mybatis-guice:3.6 \--- compile Unfortunately there are binary incompatibilities between guice 3.x and 4.x resulting in class not found errors from the jersey-guice and shiro-guice artifacts.
            kevints Kevin Sweeney added a comment -

            For those dependencies that are Apache foundation projects can you file upstream tickets to upgrade and link them as blockers here?

            kevints Kevin Sweeney added a comment - For those dependencies that are Apache foundation projects can you file upstream tickets to upgrade and link them as blockers here?
            zmanji Zameer Manji added a comment -

            Un assigning this ticket from me because this appears to be blocked on improving shiro-guice. Once that has been completed we just need to apply the following patch to build.gradle:

            [tw-mbp-zmanji asf-aurora (zmanji/upgrade-guice)]$ git diff master
            diff --git a/build.gradle b/build.gradle
            index 9c78aff..eb87e3f 100644
            --- a/build.gradle
            +++ b/build.gradle
            @@ -85,7 +85,7 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
               ext.guavaRev = '18.0'
               ext.slf4jRev = '1.7.12'
               ext.thriftRev = '0.9.1'
            -  ext.guiceRev = '3.0'
            +  ext.guiceRev = '4.0'
               ext.servletRev = '2.5'
               ext.stringTemplateRev = '3.2.1'
               ext.zookeeperRev = '3.3.4'
            @@ -110,6 +110,10 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
                     force "org.hamcrest:hamcrest-core:1.3"
                     force "org.apache.thrift:libthrift:${thriftRev}"
                     force "org.slf4j:slf4j-jdk14:${slf4jRev}"
            +        force "com.google.guava:guava:${guavaRev}"
            +        force "com.google.inject:guice:${guiceRev}"
            +        force "com.google.inject.extensions:guice-multibindings:${guiceRev}"
            +        force "com.google.inject.extensions:guice-servlet:${guiceRev}"
                   }
                 }
               }
            @@ -153,6 +157,7 @@ project(':commons') {
                 compile "com.google.code.gson:gson:${gsonRev}"
                 compile "com.google.guava:guava:${guavaRev}"
                 compile "com.google.inject.extensions:guice-multibindings:${guiceRev}"
            +    compile "com.google.inject.extensions:guice-servlet:${guiceRev}"
                 compile "com.google.inject:guice:${guiceRev}"
                 compile "com.sun.jersey.contribs:jersey-guice:${jerseyRev}"
                 compile "com.sun.jersey:jersey-core:${jerseyRev}
            
            zmanji Zameer Manji added a comment - Un assigning this ticket from me because this appears to be blocked on improving shiro-guice. Once that has been completed we just need to apply the following patch to build.gradle: [tw-mbp-zmanji asf-aurora (zmanji/upgrade-guice)]$ git diff master diff --git a/build.gradle b/build.gradle index 9c78aff..eb87e3f 100644 --- a/build.gradle +++ b/build.gradle @@ -85,7 +85,7 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169 ext.guavaRev = '18.0' ext.slf4jRev = '1.7.12' ext.thriftRev = '0.9.1' - ext.guiceRev = '3.0' + ext.guiceRev = '4.0' ext.servletRev = '2.5' ext.stringTemplateRev = '3.2.1' ext.zookeeperRev = '3.3.4' @@ -110,6 +110,10 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169 force "org.hamcrest:hamcrest-core:1.3" force "org.apache.thrift:libthrift:${thriftRev}" force "org.slf4j:slf4j-jdk14:${slf4jRev}" + force "com.google.guava:guava:${guavaRev}" + force "com.google.inject:guice:${guiceRev}" + force "com.google.inject.extensions:guice-multibindings:${guiceRev}" + force "com.google.inject.extensions:guice-servlet:${guiceRev}" } } } @@ -153,6 +157,7 @@ project(':commons') { compile "com.google.code.gson:gson:${gsonRev}" compile "com.google.guava:guava:${guavaRev}" compile "com.google.inject.extensions:guice-multibindings:${guiceRev}" + compile "com.google.inject.extensions:guice-servlet:${guiceRev}" compile "com.google.inject:guice:${guiceRev}" compile "com.sun.jersey.contribs:jersey-guice:${jerseyRev}" compile "com.sun.jersey:jersey-core:${jerseyRev}
            zmanji Zameer Manji added a comment -

            The upstream ticket SHIRO-493 has been resolved and an RC/Release for shiro 1.4 is soon.

            We will be able to close this ticket then.

            zmanji Zameer Manji added a comment - The upstream ticket SHIRO-493 has been resolved and an RC/Release for shiro 1.4 is soon. We will be able to close this ticket then.
            zmanji Zameer Manji added a comment -

            The vote is out for a Shiro 1.4 release.

            zmanji Zameer Manji added a comment - The vote is out for a Shiro 1.4 release.
            StephanErb Stephan Erb added a comment - Resolved in https://reviews.apache.org/r/64362/

            People

              wfarner Bill Farner
              kevints Kevin Sweeney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: