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

DynamicHub.getProtectionDomain() fails at native image build time #564

Closed
stuartwdouglas opened this issue Jul 23, 2018 · 3 comments
Closed
Assignees

Comments

@stuartwdouglas
Copy link

While trying to get JAXB working I ran into the following error. It looks like this constructor that is being called from DynamicHub is not present on the substitution class.

I am not really sure how this should actually work, but it seems like a bug that a substitution is referencing a constructor that has been removed.

Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: 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
To diagnose the issue, you can add the option -H:+ReportUnsupportedElementsAtRuntime. The unsupported element is then reported at run time when it is accessed the first time.
Trace:
	at parsing com.oracle.svm.core.hub.DynamicHub.getProtectionDomain(DynamicHub.java:941)
Call path from entry point to java.lang.Class.getProtectionDomain():
	at com.oracle.svm.core.hub.DynamicHub.getProtectionDomain(DynamicHub.java:938)
	at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:311)
	at com.sun.xml.bind.v2.runtime.reflect.opt.Injector.inject(Injector.java:97)
	at com.sun.xml.bind.v2.runtime.reflect.opt.AccessorInjector.prepare(AccessorInjector.java:87)
	at com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(OptimizedAccessorFactory.java:179)
	at com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(Accessor.java:285)
	at com.sun.xml.bind.v2.runtime.property.SingleMapNodeProperty.<init>(SingleMapNodeProperty.java:105)
	at com.oracle.svm.reflect.proxies.Proxy_3174_SingleMapNodeProperty_SingleMapNodeProperty.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at io.undertow.server.protocol.http.HttpRequestParser.instance(HttpRequestParser.java:219)
	at com.oracle.svm.reflect.proxies.Proxy_2750_HttpRequestParser_instance.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:173)
	at com.oracle.svm.core.code.CEntryPointCallStubs.com_002eoracle_002esvm_002ecore_002eJavaMainWrapper_002erun_0028int_002corg_002egraalvm_002enativeimage_002ec_002etype_002eCCharPointerPointer_0029(generated:0)
@cstancu
Copy link
Member

cstancu commented Jul 24, 2018

@stuartwdouglas yes, this looks like a bug. Thank you for reporting!

@sdeleuze
Copy link
Collaborator

sdeleuze commented Sep 6, 2018

I have created a repro project for this issue.

@cstancu
Copy link
Member

cstancu commented Sep 28, 2018

This issue is fixed in e3ef4f3. The java.security.ProtectionDomain substitution is now removed. It didn't make the cut for rc7 so it will be available in rc8 or you can build from source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants