Java 17 Incompatibility
mibby opened this issue · 14 comments
Purpur git-Purpur-1383 (Paper 1.17.1)
ChatControlRed version 10.6.3
PlaceholderAPI-2.10.10-DEV-132
Javascript expansion [2.0.0]
I wasn't sure whether or not to report this to the main PAPI repo, but seeing as how Nashorn is used in the Javascript expansion and not in PAPI, here is probably best.
Java 17 came out as LTS.
PlaceholderAPI seems to break with ChatControlRed on 1.17.1 using the Javascript expansion placeholders. Temporarily downgrading back to Java 16, everything works fine.
Example prefix.js
var prefix = "%deluxetags_tag%";
function hasPrefix()
{
if (prefix == '')
{
return "&8<&7%luckperms_primary_group_name%&8>";
}
else {
return "%deluxetags_tag%";
}
}
hasPrefix();
More Information:
PlaceholderAPI failed to replace variables!
Player: mibby
Message: &7{javascript_prefix}
Error: %error
ExceptionInInitializerError (Unknown cause)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1449)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:759)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)
at com.extendedclip.papi.expansion.javascript.evaluator.NashornScriptEvaluator.execute(NashornScriptEvaluator.java:30)
at com.extendedclip.papi.expansion.javascript.JavascriptPlaceholder.evaluate(JavascriptPlaceholder.java:120)
at com.extendedclip.papi.expansion.javascript.JavascriptExpansion.onRequest(JavascriptExpansion.java:157)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.setPlaceholders(HookManager.java:2170)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.replacePlaceholders(HookManager.java:2104)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.HookManager.replacePlaceholders(HookManager.java:1193)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:271)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:221)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:405)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.buildOption(Format.java:337)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.build(Format.java:198)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:506)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:174)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:33)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.event.SimpleListener.execute(SimpleListener.java:89)
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234)
at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116)
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65)
RuntimeException java.lang.NoSuchMethodException: no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:335)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1449)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:759)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)
at com.extendedclip.papi.expansion.javascript.evaluator.NashornScriptEvaluator.execute(NashornScriptEvaluator.java:30)
at com.extendedclip.papi.expansion.javascript.JavascriptPlaceholder.evaluate(JavascriptPlaceholder.java:120)
at com.extendedclip.papi.expansion.javascript.JavascriptExpansion.onRequest(JavascriptExpansion.java:157)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.setPlaceholders(HookManager.java:2170)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.replacePlaceholders(HookManager.java:2104)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.HookManager.replacePlaceholders(HookManager.java:1193)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:271)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:221)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:405)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.buildOption(Format.java:337)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.build(Format.java:198)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:506)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:174)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:33)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.event.SimpleListener.execute(SimpleListener.java:89)
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234)
at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116)
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65)
NoSuchMethodException no such method: sun.misc.Unsafe.defineAnonymousClass(Class,byte[],Object[])Class/invokeVirtual
at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:976)
at java.base/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1117)
at java.base/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3649)
at java.base/java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2680)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:329)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1449)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:759)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)
at com.extendedclip.papi.expansion.javascript.evaluator.NashornScriptEvaluator.execute(NashornScriptEvaluator.java:30)
at com.extendedclip.papi.expansion.javascript.JavascriptPlaceholder.evaluate(JavascriptPlaceholder.java:120)
at com.extendedclip.papi.expansion.javascript.JavascriptExpansion.onRequest(JavascriptExpansion.java:157)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.setPlaceholders(HookManager.java:2170)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.replacePlaceholders(HookManager.java:2104)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.HookManager.replacePlaceholders(HookManager.java:1193)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:271)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:221)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:405)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.buildOption(Format.java:337)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.build(Format.java:198)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:506)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:174)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:33)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.event.SimpleListener.execute(SimpleListener.java:89)
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234)
at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116)
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65)
NoSuchMethodError 'java.lang.Class sun.misc.Unsafe.defineAnonymousClass(java.lang.Class, byte[], java.lang.Object[])'
at java.base/java.lang.invoke.MethodHandleNatives.resolve(Native Method)
at java.base/java.lang.invoke.MemberName$Factory.resolve(MemberName.java:1085)
at java.base/java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:1114)
at java.base/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3649)
at java.base/java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2680)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.lambda$getDefineAnonymousClass$0(Context.java:329)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.getDefineAnonymousClass(Context.java:327)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller.<clinit>(Context.java:317)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1449)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:759)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)
at com.extendedclip.papi.expansion.javascript.evaluator.NashornScriptEvaluator.execute(NashornScriptEvaluator.java:30)
at com.extendedclip.papi.expansion.javascript.JavascriptPlaceholder.evaluate(JavascriptPlaceholder.java:120)
at com.extendedclip.papi.expansion.javascript.JavascriptExpansion.onRequest(JavascriptExpansion.java:157)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.setPlaceholders(HookManager.java:2170)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.replacePlaceholders(HookManager.java:2104)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.HookManager.replacePlaceholders(HookManager.java:1193)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:271)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:221)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:405)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.buildOption(Format.java:337)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.build(Format.java:198)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:506)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:174)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:33)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.event.SimpleListener.execute(SimpleListener.java:89)
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234)
at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116)
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65)
----------------------------------------------------------------------------------------------
More Information:
PlaceholderAPI failed to replace variables!
Player: mibby
Message: &e{javascript_description}
Error: %error
NoClassDefFoundError Could not initialize class org.openjdk.nashorn.internal.runtime.Context$AnonymousContextCodeInstaller
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1509)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1449)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:759)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395)
at PlaceholderAPI-2.10.10-DEV-132.jar//org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151)
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262)
at com.extendedclip.papi.expansion.javascript.evaluator.NashornScriptEvaluator.execute(NashornScriptEvaluator.java:30)
at com.extendedclip.papi.expansion.javascript.JavascriptPlaceholder.evaluate(JavascriptPlaceholder.java:120)
at com.extendedclip.papi.expansion.javascript.JavascriptExpansion.onRequest(JavascriptExpansion.java:157)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.setPlaceholders(HookManager.java:2170)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.PlaceholderAPIHook.replacePlaceholders(HookManager.java:2104)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.HookManager.replacePlaceholders(HookManager.java:1193)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:271)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.model.Variables.replace(Variables.java:221)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:405)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.replaceVariables(Format.java:388)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.addInterativeElements(Format.java:352)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.buildOption(Format.java:340)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Format.build(Format.java:198)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:506)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:174)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.listener.ChatListener.execute(ChatListener.java:33)
at ChatControl-Red-10.6.3.jar//org.mineacademy.chatcontrol.lib.event.SimpleListener.execute(SimpleListener.java:89)
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624)
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:234)
at io.papermc.paper.adventure.ChatProcessor.processingLegacyFirst(ChatProcessor.java:116)
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:65)
----------------------------------------------------------------------------------------------
sun.misc.Unsafe::defineAnonymousClass
API has been removed in JDK 17.
The API replacement is java.lang.invoke.MethodHandles.Lookup::defineHiddenClass
and java.lang.invoke.MethodHandles.Lookup::defineHiddenClassWithClassData
.
Courtesy ping @darbyjack if you are in charge of this module since the rewrite commits.
So I use the JS Expansion with Java 17 and everything runs fine, I do not have ChatControlRed so the problem may be from them because PAPI worked fine for me.
sun.misc.Unsafe::defineAnonymousClass
API has been removed in JDK 17.
The API replacement isjava.lang.invoke.MethodHandles.Lookup::defineHiddenClass
andjava.lang.invoke.MethodHandles.Lookup::defineHiddenClassWithClassData
.
sun.misc.Unsafe::defineAnonymousClass
is not used anywhere directly inside the expansion. The stacktrace points to the issue being with Nashorn using it in some case. I'll look into this and get back to you (@mibby @darbyjack).
Courtesy ping @kangarko in case it's some weird nested issue with how ChatControlRed registers placeholders, since you also use Nashorn as an external library.
Further info on this issue => https://www.mail-archive.com/nashorn-dev@openjdk.java.net/msg06740.html
I'll be testing this on ChatControl's Red end this week and update accordingly.
Any follow-up to this issue with Javascript-Expansion & ChatControlRed on Java 17? I would like to update since it's LTS and this is the only blocker for me.
Sorry, I got busy with other stuff, haven't tested this yet, but after reading this it looks like we need to wait for the nashorn library to update. The email at mail-archive you posted above is one day before the last nashorn release 15.3 which we are currently using.
Seems that this problem will effect all plugins using javascript compiler, not just ours. I recommend staying on Java 16 until then.
Hi all! @Ipsk has just spent some time doing some changes and testing and says that this new jar will work on Java 17. Would you guys mind testing it out for us? Here's a direct download to the jar, try it out and let us know if it fixes any problems you're having. https://glare.dev/static/Javascript-Expansion-2.0.0-all.jar
I just tested your script @mibby, it appears to work now, thank you so much @darbyjack!
Thanks for testing. Closing this as I merged the PR and will release shortly to the eCloud.
I can confirm all seems to be fine now, thanks!