Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsupportedFeatureError running code that uses guice #579

Closed
timboudreau opened this issue Aug 1, 2018 · 1 comment
Closed

UnsupportedFeatureError running code that uses guice #579

timboudreau opened this issue Aug 1, 2018 · 1 comment

Comments

@timboudreau
Copy link

Doing further work on getting guice+netty applications working in substratevm, I'm running into an UnsupportedFeatureError when substratevm's own code attempts to invoke the 2-argument constructor of java.security.ProtectionDomain, in the getProtectionDomain() method of com.oracle.svm.core.hub.DynamicHub.

This seems likely to be a bug, since Graal's own code triggers the exception - presumably this code can never work as intended.

com.oracle.svm.core.jdk.UnsupportedFeatureError: Unsupported constructor java.security.ProtectionDomain.<init>(CodeSource, PermissionCollection) is reachable: The declaring class of this element has been substituted, but this element is not present in the substitution class
	at java.lang.Throwable.<init>(Throwable.java:265)
	at java.lang.Error.<init>(Error.java:70)
	at com.oracle.svm.core.jdk.UnsupportedFeatureError.<init>(UnsupportedFeatureError.java:31)
	at com.oracle.svm.core.jdk.Target_com_oracle_svm_core_util_VMError.unsupportedFeature(VMErrorSubstitutions.java:109)
	at java.security.ProtectionDomain.<init>(ProtectionDomain.java:137)
	at com.oracle.svm.core.hub.DynamicHub.getProtectionDomain(DynamicHub.java:969)
	at com.google.inject.internal.cglib.core.$ReflectUtils$4.run(ReflectUtils.java:147)
	at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:70)
	at com.google.inject.internal.cglib.core.$ReflectUtils.getProtectionDomain(ReflectUtils.java:145)
	at com.google.inject.internal.cglib.reflect.$FastClass$Generator.getProtectionDomain(FastClass.java:73)
	at com.google.inject.internal.cglib.core.$AbstractClassGenerator.generate(AbstractClassGenerator.java:331)
	at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
	at com.google.inject.internal.cglib.core.$AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
	at com.google.inject.internal.cglib.core.internal.$LoadingCache$2.call(LoadingCache.java:54)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.google.inject.internal.cglib.core.internal.$LoadingCache.createEntry(LoadingCache.java:61)
@cstancu
Copy link
Member

cstancu commented Aug 1, 2018

Thank you for reporting. This is a bug that has been reported before: #564. I will close this, you can follow the progress there. It should be fixed soon.

@cstancu cstancu closed this as completed Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants