Skip to content

[native-image] Missing support for StackWalker.walk in Java 11 #1172

Closed
@johanvos

Description

@johanvos

The missing support for StackWalker.walk (Target_java_lang_StackWalker.walk() throws an UnsupportedFeature) causes java.util.logging to fail, e.g.

import java.util.logging.Logger;

public class Log {

    public static void main(String[] args) throws Exception  {
        Logger l = Logger.getLogger("foo");
        l.info("hello");
    }
}

will result in this:

Exception in thread "main" com.oracle.svm.core.jdk.UnsupportedFeatureError: JDK9OrLater: Target_java_lang_StackWalker.walk(Function<? super Stream<StackFrame>, ? extends T>)
	at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:102)
	at java.lang.StackWalker.walk(StackWalker.java:41)
	at java.util.logging.LogRecord$CallerFinder.get(LogRecord.java:709)
	at java.util.logging.LogRecord.inferCaller(LogRecord.java:683)
	at java.util.logging.LogRecord.getSourceClassName(LogRecord.java:352)
	at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:160)
	at java.util.logging.StreamHandler.publish(StreamHandler.java:199)
	at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:95)
	at java.util.logging.Logger.log(Logger.java:979)
	at java.util.logging.Logger.doLog(Logger.java:1006)
	at java.util.logging.Logger.log(Logger.java:1029)
	at java.util.logging.Logger.info(Logger.java:1802)
	at Log.main(Log.java:7)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions