Skip to content

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

@stuartwdouglas

Description

@stuartwdouglas

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)

Activity

self-assigned this
on Jul 24, 2018
cstancu

cstancu commented on Jul 24, 2018

@cstancu
Member

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

sdeleuze

sdeleuze commented on Sep 6, 2018

@sdeleuze
Collaborator

I have created a repro project for this issue.

cstancu

cstancu commented on Sep 28, 2018

@cstancu
Member

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @sdeleuze@stuartwdouglas@cstancu

      Issue actions

        DynamicHub.getProtectionDomain() fails at native image build time · Issue #564 · oracle/graal