NutzCN Logo
问答 在JAVA17环境中运行初始化Dao报错
发布于 1059天前 作者 qq_bf24651d 2062 次浏览 复制 上一个帖子 下一个帖子
标签:

迁移之前在Java 8 环境下运行一切正常

[01:33:47] [Server thread/ERROR]: Error occurred while enabling AncientTech v1.0-SNAPSHOT (Is it up to date?)
java.lang.ExceptionInInitializerError: null
	at org.nutz.json.entity.JsonEntityField.setGenericType(JsonEntityField.java:211) ~[?:?]
	at org.nutz.json.entity.JsonEntityField.eval(JsonEntityField.java:113) ~[?:?]
	at org.nutz.json.impl.JsonEntityFieldMakerImpl.make(JsonEntityFieldMakerImpl.java:25) ~[?:?]
	at org.nutz.json.AbstractJsonEntityFieldMaker.make(AbstractJsonEntityFieldMaker.java:18) ~[?:?]
	at org.nutz.json.entity.JsonEntity.<init>(JsonEntity.java:59) ~[?:?]
	at org.nutz.json.Json.getEntity(Json.java:319) ~[?:?]
	at org.nutz.mapl.impl.convert.ObjConvertImpl.injectObj(ObjConvertImpl.java:210) ~[?:?]
	at org.nutz.mapl.impl.convert.ObjConvertImpl.inject(ObjConvertImpl.java:91) ~[?:?]
	at org.nutz.mapl.impl.convert.ObjConvertImpl.convert(ObjConvertImpl.java:72) ~[?:?]
	at org.nutz.mapl.Mapl.maplistToObj(Mapl.java:34) ~[?:?]
	at org.nutz.json.Json.parse(Json.java:94) ~[?:?]
	at org.nutz.json.Json.fromJson(Json.java:73) ~[?:?]
	at org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:76) ~[?:?]
	at org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:187) ~[?:?]
	at org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:178) ~[?:?]
	at org.nutz.dao.impl.NutDao.<init>(NutDao.java:108) ~[?:?]
	at com.narcissu14.ancienttech.data.DaoHelper.getDao(DaoHelper.java:24) ~[?:?]
	at com.narcissu14.ancienttech.data.DaoHelper.initTables(DaoHelper.java:51) ~[?:?]
	at com.narcissu14.ancienttech.AncientTech.onEnable(AncientTech.java:43) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.18.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugin(CraftServer.java:526) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at org.bukkit.craftbukkit.v1_18_R1.CraftServer.enablePlugins(CraftServer.java:440) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:612) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:262) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:994) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.1-R0.1-SNAPSHOT.jar:3417-Spigot-862678e-1eeba6a]
	at java.lang.Thread.run(Thread.java:833) [?:?]
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 @5e9aa650
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
	at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
	at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
	at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
	at org.nutz.lang.reflect.ReflectTool$1.run(ReflectTool.java:37) ~[?:?]
	at java.security.AccessController.doPrivileged(AccessController.java:318) ~[?:?]
	at org.nutz.lang.reflect.ReflectTool.<clinit>(ReflectTool.java:24) ~[?:?]
	... 30 more
2 回复

使用的是此版本Nutz

<dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutz</artifactId>
            <version>1.r.68.v20190220</version>
        </dependency>

有更新版本

添加回复
请先登陆
回到顶部