Bug#982539: jaxb: Runtime error with OpenJDK 17: NoSuchMethodException Unsafe.defineClass() in com.sun.xml.bind.v2.runtime.reflect.opt.Injector

Emmanuel Bourg ebourg at apache.org
Thu Feb 11 11:18:03 GMT 2021


Package: jaxb
Version: 2.3.0.1-9
Severity: important
Tags: sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17

jaxb doesn't work with OpenJDK 17, it breaks at runtime with the following error:


  java.lang.NoSuchMethodException: sun.misc.Unsafe.defineClass(java.lang.String,[B,int,int,java.lang.ClassLoader,java.security.ProtectionDomain)
          at java.base/java.lang.Class.getMethod(Class.java:2195)
          at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:201)
          at com.sun.xml.bind.v2.runtime.reflect.opt.Injector$3.run(Injector.java:197)
          at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
          ... 52 more


This issue was fixed upstream:
https://github.com/javaee/jaxb-v2/commit/9805bc91473a9f4dee95e7192998a5bbb61350f2



More information about the pkg-java-maintainers mailing list