Guice 4.1.0 throws an exception from within the embedded cglib with
this release:

>java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+135-jigsaw-nightly-h5500-20160914)
Java HotSpot(TM) 64-Bit Server VM (build
9-ea+135-jigsaw-nightly-h5500-20160914, mixed mode)

> [apptest]

   > Caused by: java.lang.NoClassDefFoundError: Could not initialize
class com.google.inject.internal.cglib.core.$ReflectUtils
   >    at 
com.google.inject.internal.cglib.reflect.$FastClass$Generator.getProtectionDomain(FastClass.java:73)
   >    at 
com.google.inject.internal.cglib.core.$AbstractClassGenerator.create(AbstractClassGenerator.java:206)
   >    at 
com.google.inject.internal.cglib.reflect.$FastClass$Generator.create(FastClass.java:65)
   >    at 
com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:252)
   >    at 
com.google.inject.internal.BytecodeGen.newFastClassForMember(BytecodeGen.java:203)
   >    at 
com.google.inject.internal.DefaultConstructionProxyFactory.create(DefaultConstructionProxyFactory.java:53)
   >    at com.google.inject.internal.ProxyFactory.create(ProxyFactory.java:158)
   >    at 
com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:90)
   >    at 
com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
   >    at 
com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
   >    at 
com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
   >    at 
com.google.inject.internal.FailableCache$1.load(FailableCache.java:37)
   >    at 
com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
   >    at 
com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
   >    at 
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
   >    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)

We had it working just fine with:

Java(TM) SE Runtime Environment (build 9-ea+129-jigsaw-nightly-h5343-20160802)
Java HotSpot(TM) 64-Bit Server VM (build
9-ea+129-jigsaw-nightly-h5343-20160802, mixed mode)

Dawid


On Thu, Sep 15, 2016 at 7:07 PM, Alan Bateman <alan.bate...@oracle.com> wrote:
> The EA download [1] has been refreshed with new builds that are mostly
> aligned with the current proposals for JPMS issues [2]. Not everything is
> there yet of course (and some areas need a few more iterations) but there is
> enough to test and try things out.
>
> For #ReflectiveAccessToNonExportedTypes and #AwkwardStrongEncapsulation then
> the initial support for `weak module` and `exports private` is in place.
> These are probably the highest priority changes to try out.
>
> The changes to setAccessible in #AwkwardStrongEncapsulation is going to be
> disruptive and will no doubt expose hacks in many areas. We've run into
> several of these already. The command line option to allow existing code to
> break into non-public types/members is --add-exports-private. The format of
> the value passed to this option is the same--add-exports. With
> #AddExportsInManifest then there are equivalents in the application JAR main
> manifest to try out too.
>
> As part of the #ClassLoaderNames then the format of the stack trace elements
> has changed.
>
> For #ServiceLoaderEnhancements then the implementation is mostly aligned,
> except for the static factory method which needs an update to javac and SL
> to align with the proposal (should be there soon, just not in this build).
>
> Several people have brought up #ResourceEncapsulation and
> #ClassFilesAsResources here so it would be good to try this out.
>
> As always, the most valuable feedback is from those trying out the builds so
> please let us know what you have tried and what works or doesn't work.
>
> -Alan
>
> [1] https://jdk9.java.net/jigsaw/
> [2]
> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2016-September/009365.html

Reply via email to