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

Incompatible with Java 16 due to xodus-dnq #3

Closed
mooziii opened this issue Jul 11, 2021 · 4 comments
Closed

Incompatible with Java 16 due to xodus-dnq #3

mooziii opened this issue Jul 11, 2021 · 4 comments

Comments

@mooziii
Copy link
Contributor

mooziii commented Jul 11, 2021

Hi, im getting this error when running pacmc list or pacmc install <mod>
Im on manjaro linux with java 16

Exception in thread "main" java.lang.ExceptionInInitializerError
	at javassist.util.proxy.DefineClassHelper.<clinit>(DefineClassHelper.java:216)
	at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:128)
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:552)
	at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:475)
	at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:444)
	at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:721)
	at kotlinx.dnq.util.XdHierarchyNode$naturalPersistentClassInstance$2.invoke(XdHierarchyNode.kt:96)
	at kotlinx.dnq.util.XdHierarchyNode$naturalPersistentClassInstance$2.invoke(XdHierarchyNode.kt:33)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at kotlinx.dnq.util.XdHierarchyNode.getNaturalPersistentClassInstance(XdHierarchyNode.kt)
	at kotlinx.dnq.util.DNQMetaDataUtilKt.initMetaData(DNQMetaDataUtil.kt:46)
	at net.axay.pacmc.storage.Xodus.<clinit>(Xodus.kt:28)
	at net.axay.pacmc.commands.Archive$List.run(Archive.kt:54)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17)
	at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396)
	at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436)
	at net.axay.pacmc.ManagerKt.main(Manager.kt:10)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @5fb2de77
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at javassist.util.proxy.SecurityActions$3.run(SecurityActions.java:94)
	at javassist.util.proxy.SecurityActions$3.run(SecurityActions.java:90)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
	at javassist.util.proxy.SecurityActions.getMethodHandle(SecurityActions.java:89)
	at javassist.util.proxy.DefineClassHelper$SecuredPrivileged$2.getDefineClassMethodHandle(DefineClassHelper.java:143)
	at javassist.util.proxy.DefineClassHelper$SecuredPrivileged$2.<init>(DefineClassHelper.java:136)
	at javassist.util.proxy.DefineClassHelper$SecuredPrivileged.<clinit>(DefineClassHelper.java:134)
	... 22 more````

@jakobkmar
Copy link
Owner

Yes it occurs if you are trying to run pacmc with Java 16.

This is an issue with xodus-dnq, I have already created an issue there a while ago: JetBrains/xodus-dnq#75

For now I suggest to run pacmc with Java 11.

@jakobkmar jakobkmar changed the title InaccessibleObjectException Incompatible with Java 16 due to xodus-dnq Jul 11, 2021
@jakobkmar
Copy link
Owner

Im on manjaro linux with java 16

If you have installed multiple Java versions, you can switch between them like this:
https://wiki.archlinux.org/title/Java#Switching_between_JVM

@mooziii
Copy link
Contributor Author

mooziii commented Jul 11, 2021

Thanks, it works now with java 11

@mooziii mooziii closed this as completed Jul 11, 2021
@jakobkmar jakobkmar reopened this Jul 11, 2021
@jakobkmar
Copy link
Owner

Fixed with version 0.2.0.

@mooziii for you that means that you can just update pacmc from the AUR

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

No branches or pull requests

2 participants